I have modified my local version of extractSubMessage to have extra parameters for “case independence”, “occurrence count” and “headers only” (i.e. start of a line only). That would probably suit what you are trying to do.

 

It’s probably harder to extract just the occurrence count than just to take all three changes (but obviously three options to add to scenario.cpp and other places). If there is general consensus that it would be worth adding these to the public SIPP (and willingness by one of the maintainers to spend the time putting them in). Then I’ll find some time to extract and circulate them.

 

(Apologies if I’ve missed some better answer to this question.)

 

Peter Higginson

Newport Networks Ltd,

Direct line 01494 470694

http://www.newport-networks.com/


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ???
Sent: 21 October 2006 09:16
To: sipp-users
Subject: [Sipp-users] Regular _expression_ problems in the actions

 

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>

 

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




---------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden.
---------------
-------------------------------------------------------------------------
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

Reply via email to