On Sep 08, 2003 at 13:15, Felix Schmid <felix(a)belugalounge.net> wrote:
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:
[...]
Why isn't the request in a rewritten state after subst() returns?
Because the re-write happens only once, just before sending the message
(for performance reasons).
BTW: if you are using linux + a very new glibc you might have problems
with REs matching CR when they shouldn't (bug in recent glibc versions).
Andrei