hi, all
when uas received an INVITE request, i want to search the branch ID of one proxy in the Via headers. However, it seems that i can just get the first branch ID in the Via headers or it may not work. the content of the received message is:
INVITE sip:[EMAIL PROTECTED]:5060;user=phone;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.0.2.222:5060;branch=fjo123f3fj3-3323kkk-323jj333-23jk33-1
Record-Route:<sip:[EMAIL PROTECTED]:5060;maddr=10.0.2.222>
Via: SIP/2.0/UDP 10.0.2.333:5060;branch=z9hG4bkterm-23-sipp-47910098-2438, SIP/2.0/UDP 10.0.2.222:5060;branch=feoiefw334k-23kfj3fjlfd-3f3224jj-23jlr3jf33-1, SIP/2.0/UDP
10.0.100.202:5060;received=10.0.100.202;branch=z9hG4bK-1-0
From:sipp <sip:[EMAIL PROTECTED]:5060;user=phone>;tag=234234232
To:..............
My question is that i want to get the second branch ID in the Via headers, so i wrote the script:
<recv response="INVITE" start_rtd="true" rrs="true">
<action>
<ereg regexp="branch=z9hG4bKterm.*" search_in="hdr" header="Via:" assign_to="1" />
</action>
</recv>
<action>
<ereg regexp="branch=z9hG4bKterm.*" search_in="hdr" header="Via:" assign_to="1" />
</action>
</recv>
However, the variable $1 is blank and nothing i got.
any idea to find the correct way to use the COMMAND actions? thanks a lot
--
Cheers!
Xuesong Du
B0503493 NO.800 Dongchuan RD. Jiaotong Univ. Shanghia, China
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Sipp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sipp-users
