[Serdev] Possible Bug in textopt.so / subst(///)

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Fri Mar 18 20:56:46 UTC 2005


On Mar 16, 2005 at 11:38, reticent <tavis.lists at galaxytelecom.net> wrote:
> This is running under the latest CVS code as of March 15.
> 
> It seems that the subst(///) function provided by textopt.so doesn't 
> actually substitute, rather it prepends what its supposed to be 
> substituting with.
> 
> Substitution Rule:
> subst('/^Contact:.*sip:([0-9]+)@.*$/Contact: <sip:\1 at 1.1.1.1>/');
> 
> Original Text String: "Contact: <sip:200010001000 at 192.168.1.75:5070>."
> 
> It matches properly, but inspecting the packet as its routed out (using 
> ngrep) shows the following contact field
> 
> "Contact: <sip:200010001000 at 1.1.1.1>sip:200010001000 at 192.168.1.75:5070."
> 
> Where it should have been:
> "Contact: <sip:200010001000 at 1.1.1.1>."
> 
> Is this a bug, or am i doing somthing wrong?

Most likely you are using something that tries to modify the same thing
(Contact: ...). Are you using fix_nated_contact, or do you have another
subst that might match the same line?


Andrei




More information about the Serdev mailing list