[OpenSIPS-Users] End of line matching character using subst()

Mariana Arduini marianarduini at gmail.com
Mon Jul 23 17:08:49 CEST 2012


Hello all,

I'm trying subst('/^Supported: *timer$//ig') to remove a "Supported" header
which contains only one tag "timer", but I can't seem to make it match the
word "timer" in the end of line.

This is the INVITE I'm sending using SIPp:

      INVITE sip:[service]@fed.com;user=phone SIP/2.0
      FROM: <sip:+551931121300 at fed2.connect.com
;user=phone>;epid=99B24E3DE7;tag=uac[call_number][local_ip]
      TO: <sip:[service]@fed.com;user=phone>
      CSEQ: 1 INVITE
      CALL-ID: [call_id]
      Max-Forwards: 70
      VIA: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      CONTACT:
<sip:[local_ip]:[local_port];transport=[transport];maddr=[local_ip];ms-opaque=5a6c67fdaeeb8367>
      CONTENT-LENGTH: [len]
      SUPPORTED: [supported]
      USER-AGENT: RTCC/4.0.0.0 MediationServer
      CONTENT-TYPE: application/sdp
      Session-Expires: 1800
      Min-SE: 90

And the command line is:

sipp -sf uac_A_hangs_up.xml -i 192.168.16.54 -p 5060 192.168.16.148 -s
'test_user' -l 0 -t t1 -max_socket 6 -m 1 -key supported timer

Am I using the correct character for end of line? I'm also using function
avp_subst with "\r\n" for matching end of line and works fine there, but
not with subst.

Any help will be greatly appreciated.
Mariana.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120723/62dc3742/attachment.htm>


More information about the Users mailing list