[Sipp-users] How to extract the second the second string from the VIA: header
HI All, I was simulating a conference scenario with Sipp. The Switch sends me a update message with following Information. UPDATE sip:5...@148.147.171.54:64478;transport=tcp SIP/2.0 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE From: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=-2cee5336498317ae-c_F148.147.171.54 Via: SIP/2.0/TCP 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0,SIP/2.0/TLS 148.147.171.28:6001 ;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 Content-Length: 0 Contact: CONFERENCE 2 sip:148.147.171.28:6001;transport=tls;isfocus Max-Forwards: 69 User-Agent: Avaya CM/R015x.01.2.416.4 Allow: INVITE,CANCEL,BYE,ACK,PRACK,SUBSCRIBE,NOTIFY,REFER,OPTIONS,INFO,PUBLISH Supported: 100rel,timer,replaces,join,histinfo Min-SE: 180 Session-Expires: 180;refresher=uac Record-Route: sip:148.147.171.28:5060;transport=tcp;lr Correct response . SIP/2.0 200 OK From: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=-2cee5336498317ae-c_F148.147.171.54 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE *Via: sip/2.0/tcp 148.147.171.28:5060 ;branch=z9hG4bK83138303530393F5334001b.0 Via: SIP/2.0/TLS 148.147.171.28:6001 ;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 * Record-Route: sip:148.147.171.28:5060;transport=tcp;lr User-Agent: Avaya one-X Deskphone Content-Length: 0 As Sipp is receiving the UPDATE successfully but While sending the 200OK for UPDATE the SES does not process the 200OK as it wants that the 200OK which sipp sends should contains two separate via headers . In my case i send 200OK which contains the following dump SIP/2.0 200 OK From: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=-2cee5336498317ae-c_F148.147.171.54 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE * Via: sip/2.0/tcp 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0,SIP/2.0/TLS 148.147.171.28:6001 ;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 * Record-Route: sip:148.147.171.28:5060;transport=tcp;lr User-Agent: Avaya one-X Deskphone Content-Length: 0 My final approach which i used to send was followed the regular expression path . I have used two regular expression commands to separate two strings from the Via : header The Regular expression = 1. ereg regexp= .[^,]+ search_in=hdr header=Via: assign_to =2/ 2. ereg regexp=\,([A-Z]{3}/2\.[0-9]/[A-Z]{3}) search_in=hdr header=Via: assign_to =3/ the variable $2 gets *sip/2.0/tcp 148.147.171.28:5060 ;branch=z9hG4bK83138303530393F5334001b.0* and the variable $3 gets *,SIP/2.0/TLS 148.147.171.28:6001 ;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 The problem is i was unable to erase the , (comma) from the string which is stored in the $3 . the sample of 200OK is shown below after applying the regular expression : *SIP/2.0 200 OK From: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com sip%3a5...@avaya.com ;tag=-2cee5336498317ae-c_F148.147.171.54 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE *Via: sip/2.0/tcp 148.147.171.28:5060 ;branch=z9hG4bK83138303530393F5334001b.0 Via: ,SIP/2.0/TLS Via:148.147.171.28:6001 ;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 * Record-Route: sip:148.147.171.28:5060;transport=tcp;lr User-Agent: Avaya one-X Deskphone Content-Length: 0 * If somebody has any idea how to get the second string without , . Please advice . Thanks Pratap Nath * -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users
Re: [Sipp-users] How to extract the second the second string from the VIA: header
You need to have parenthesis to capture just the part after the comma. Something like. ereg regexp=,(foo) assign_to=dummy,foovalue / Charles Pratap Nath pratapn...@gmail.com 02/02/2009 08:43 AM To sipp-users@lists.sourceforge.net cc Subject [Sipp-users] How to extract the second the second string from the VIA: header HI All, I was simulating a conference scenario with Sipp. The Switch sends me a update message with following Information. UPDATE sip:5...@148.147.171.54:64478;transport=tcp SIP/2.0 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE From: sip:5...@avaya.com;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com;tag=-2cee5336498317ae-c_F148.147.171.54 Via: SIP/2.0/TCP 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0,SIP/2.0/TLS 148.147.171.28:6001;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 Content-Length: 0 Contact: CONFERENCE 2 sip:148.147.171.28:6001;transport=tls;isfocus Max-Forwards: 69 User-Agent: Avaya CM/R015x.01.2.416.4 Allow: INVITE,CANCEL,BYE,ACK,PRACK,SUBSCRIBE,NOTIFY,REFER,OPTIONS,INFO,PUBLISH Supported: 100rel,timer,replaces,join,histinfo Min-SE: 180 Session-Expires: 180;refresher=uac Record-Route: sip:148.147.171.28:5060;transport=tcp;lr Correct response . SIP/2.0 200 OK From: sip:5...@avaya.com;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com;tag=-2cee5336498317ae-c_F148.147.171.54 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE Via: sip/2.0/tcp 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0 Via: SIP/2.0/TLS 148.147.171.28:6001;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 Record-Route: sip:148.147.171.28:5060;transport=tcp;lr User-Agent: Avaya one-X Deskphone Content-Length: 0 As Sipp is receiving the UPDATE successfully but While sending the 200OK for UPDATE the SES does not process the 200OK as it wants that the 200OK which sipp sends should contains two separate via headers . In my case i send 200OK which contains the following dump SIP/2.0 200 OK From: sip:5...@avaya.com;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com;tag=-2cee5336498317ae-c_F148.147.171.54 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE Via: sip/2.0/tcp 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0,SIP/2.0/TLS 148.147.171.28:6001;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 Record-Route: sip:148.147.171.28:5060;transport=tcp;lr User-Agent: Avaya one-X Deskphone Content-Length: 0 My final approach which i used to send was followed the regular expression path . I have used two regular expression commands to separate two strings from the Via : header The Regular expression = 1. ereg regexp= .[^,]+ search_in=hdr header=Via: assign_to =2/ 2. ereg regexp=\,([A-Z]{3}/2\.[0-9]/[A-Z]{3}) search_in=hdr header=Via: assign_to =3/ the variable $2 gets sip/2.0/tcp 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0 and the variable $3 gets ,SIP/2.0/TLS 148.147.171.28:6001;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 The problem is i was unable to erase the , (comma) from the string which is stored in the $3 . the sample of 200OK is shown below after applying the regular expression : SIP/2.0 200 OK From: sip:5...@avaya.com;tag=8038c7bbbebdd17a3497b5ad100 To: sip:5...@avaya.com;tag=-2cee5336498317ae-c_F148.147.171.54 Call-ID: 15_374cb53-41c226674cf7e31...@148.147.171.54 CSeq: 2 UPDATE Via: sip/2.0/tcp 148.147.171.28:5060;branch=z9hG4bK83138303530393F5334001b.0 Via: ,SIP/2.0/TLS Via:148.147.171.28:6001;psrrposn=1;received=148.147.171.28;branch=z9hG4bK809229ebbebdd1893497b5ad100 Record-Route: sip:148.147.171.28:5060;transport=tcp;lr User-Agent: Avaya one-X Deskphone Content-Length: 0 If somebody has any idea how to get the second string without , . Please advice . Thanks Pratap Nath -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users
[Sipp-users] [ sipp-Bugs-2548571 ] Incorrect destination RTP port used by pcap play
Bugs item #2548571, was opened at 2009-01-30 11:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=637564aid=2548571group_id=104305 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: w_szab (w_szab) Assigned to: Nobody/Anonymous (nobody) Summary: Incorrect destination RTP port used by pcap play Initial Comment: I experienced the following behaviour. SIPP Softswitch/MGW INVITE - ... - 200OK with SDP m line: audio 34340 RTP/AVP 8 ... RTP sent to port 3434 - - RTP coming from port 34340 ... It looks like the string conatining RTP port is cut to 4 chars by SIPP. SIPp v3.1-PCAP (Trace attached) -- You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=637564aid=2548571group_id=104305 -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com ___ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users