Hello,
I am having trouble with the textops' subst method. I am trying to rewrite the Contact header field for certain requests - and according to the debug output it seems to work (apart from the fact the the log output is scrambled):
-- textops: subst_f: replacing at offset 341 [Contact: sip:felix@192.168.0.66:5064;transport=udp;methods="INVIT] with [Contact: sip:felix@beluga.homeunix.org:5064;transport=udp;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, B]E, CANCEL, NOTIFY, ACK" ---
However, if I dump out the whole request directly after calling subst(), using 'exec_msg("echo REQUEST: ; cat - ; echo");', I get this: --- REQUEST: REGISTER sip:beluga.homeunix.org SIP/2.0 Via: SIP/2.0/UDP 192.168.0.66:5064 CSeq: 7656 REGISTER To: "Felix Schmid" sip:felix@beluga.homeunix.org Expires: 900 From: "Felix Schmid" sip:felix@beluga.homeunix.org Call-ID: 742144068@192.168.0.66 Content-Length: 0 User-Agent: KPhone/3.11 Event: registration Allow-Events: presence Contact: sip:felix@192.168.0.66:5064;transport=udp;methods="INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK" ---
Why isn't the request in a rewritten state after subst() returns?
regards, felix