Hi,

I'm new to sipp, and I encounter a problem when trying to store the Via headers 
with multiple line using regexp.

Here's the call scenario on the uas side:
----> INVITE
<---- 180
----> PRACK
<---- 200 (PRACK)
<---- 200 (INVITE)
----> ACK

The format of the Via header I'm using is like this:
Via: SIP/2.0/UDP 130.100.100.1:5060;branch=z9hG4bK9ohfjksa,
       SIP/2.0/UDP 130.100.101.1:5060;branch=z9hG4bK45fs54e

What I'm trying to do is to store the Via header in the INVITE so I can insert 
it back in the 200 OK for the INVITE.

In the XML file I tried:
<recv request="INVITE" crlf="true">
  <action>
    <ereg regexp="Via: .*">
             search_in="hdr"
             assign_to="1"/>
  </action>
</recv>

This only stores the first line of the Via header. And I have tried many other 
regexp but with no luck, like:
    <ereg regexp="Via: (.*)[\n](.*)">

I guess the problem is also I can't seem to find which is the "newline" 
character.
\n, \z, \Z and $ all don't seems to work.

Please let me know what I did wrong, or if there is any other way to store this.

Best Regards,
Tonny

 _______________________________________
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to