Redirecting to Sipp Users.
Thanks
Pratap nath
---------- Forwarded message ----------
From: Pratap Nath <[email protected]>
Date: Wed, Feb 4, 2009 at 10:40 AM
Subject: Re: [Sipp-users] How to extract the second the second string from
the VIA: header
To: Charles P Wright <[email protected]>
Thanks Charles for your guidance ,
I have successfully extract the Via parameter by using the below mentioned
formula .
Thanks& regards
Pratap Nath
On Mon, Feb 2, 2009 at 10:07 PM, Charles P Wright <[email protected]>wrote:
> 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 <[email protected]>
> 02/02/2009 08:43 AM
>
> To
> [email protected]
> 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:[email protected]:64478;transport=tcp SIP/2.0
>
> Call-ID: [email protected]
>
> CSeq: 2 UPDATE
>
> From: sip:[email protected] <sip%[email protected]>
> ;tag=8038c7bbbebdd17a3497b5ad100
>
> To: sip:[email protected] <sip%[email protected]>
> ;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:[email protected] <sip%[email protected]>
> ;tag=8038c7bbbebdd17a3497b5ad100
>
> To: sip:[email protected] <sip%[email protected]>
> ;tag=-2cee5336498317ae-c_F148.147.171.54
>
> Call-ID: [email protected]
>
> 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:[email protected] <sip%[email protected]>
> ;tag=8038c7bbbebdd17a3497b5ad100
>
> To: sip:[email protected] <sip%[email protected]>
> ;tag=-2cee5336498317ae-c_F148.147.171.54
>
> Call-ID: [email protected]
>
> 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:[email protected] <sip%[email protected]>
> ;tag=8038c7bbbebdd17a3497b5ad100
>
> To: sip:[email protected] <sip%[email protected]>
> ;tag=-2cee5336498317ae-c_F148.147.171.54
>
> Call-ID: [email protected]
>
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
>
>
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users