Try this, it may work
<recv request="INVITE" crlf="true" rrs="true">
<action>
<ereg regexp="(Via.*)([[:cntrl:]][[:cntrl:]]Via:[^[:cntrl:]]*)"
search_in="msg"
check_it="true"
assign_to="1,2,3" />
</action>
</recv>
in your 180 response for the VIA statements, just put [$1] and nothing
more. The egrep for [$1] will have all the VIAs sent in from the INVITE
and it will have the complete VIAs structures.
Example:
<send>
<![CDATA[
SIP/2.0 180 RINGING
[$1] <-- this represents the VIA statements on the reply
[last_From:]
[last_To:]
[last_Call-ID:]
[last_Event:]
[last_CSeq:]
Content-Length: 0
]]>
</send>
Giuseppe Roberti <[email protected]>
01/05/2009 09:37 PM
To
[email protected]
cc
Subject
Re: [Sipp-users] Problem about 2nd Via
Hi,
nobody have checked this ?
Giuseppe Roberti wrote:
> I have used this:
> <recv request="INVITE" crlf="true" rrs="true">
> <action>
> <ereg regexp=".*" search_in="hdr" header="Via:" check_it="true"
> assign_to="1" occurrence="1"/>
> <ereg regexp=".*" search_in="hdr" header="Via:" check_it="true"
> assign_to="2" occurrence="2"/>
> </action>
> </recv>
>
> But it doesnt work.
> The variable [$2] is equal to the first variable [$1].
>
> Thanks to all.
>
> Charles P Wright wrote:
>> You'll need two separate regexp match actions using the occurrence="1"
and
>> occurrence="2" tags.
>>
>> Charles
>>
>> Evgeny Miloslavsky <[email protected]> wrote on 12/18/2008
01:26:52
>> AM:
>>
>>> Hi Giuseppe!
>>> As a solution/workaround for this situation I would suggest you
>>> after INVITE request received by UAS, to assign first Via header to
>>> variable 1 and second Via header to variable 2. While sending
>>> responses from UAS put the first Via with value of variable 1 and
>>> second Via will have value of variable 2.
>>> As far as I understand it should look like:
>>> <recv request="INVITE">
>>> <action>
>>> <ereg regexp=".*" search_in="hdr" header="Via:" check_it="true"
>>> assign_to="1,2" />
>>> </action>
>>> </recv>
>>>
>>> At sending response procedure simply put the following lines:
>>> Via: [$1]
>>> Via: [$2]
>>>
>>> I hope it will help.
>>>
>>> Regards,
>>>
>>> Evgeny Miloslavsky
>>> Systest Engineer
>>> Juniper Networks Solutions Israel LTD.
>>> Office: 972-9-9712355 / 7320
>>>
>>>
>>> -----Original Message-----
>>> From: Giuseppe Roberti [mailto:[email protected]]
>>> Sent: Wednesday, December 17, 2008 6:04 PM
>>> To: [email protected]
>>> Subject: [Sipp-users] Problem about 2nd Via
>>>
>>> Hi,
>>> i am testing a proxy using sipp but i have problem with Via headers.
>>>
>>> 10.0.0.1 is the proxy.
>>> 10.0.0.2 is the sipp server (-sn uas)
>>> 10.0.0.3 is the sipp client (-sn uac)
>>>
>>> I have noticed that the 2nd via added by sipp uas is threat
incorrectly
>>> by the proxy but i don't know if it is my fault.
>>> Here the sip flow.
>>>
>>>> 1) The sipp uac send to the proxy the INVITE:
>>>> INVITE sip:[email protected]:5060 SIP/2.0
>>>> Via: SIP/2.0/UDP 10.0.0.3:5060;branch=z9hG4bK
>>>> From: sipp <sip:[email protected]:5060>;tag=23603SIPpTag091
>>>> To: sut <sip:[email protected]:5060>
>>>> Call-ID: [email protected]
>>>> CSeq: 1 INVITE
>>>> Contact: sip:[email protected]:5060
>>>> Max-Forwards: 70
>>>> Subject: Performance Test
>>>> Content-Type: application/sdp
>>>> Content-Length: 186
>>>>
>>>> v=0
>>>> o=user1 53655765 2353687637 IN IP4 10.0.0.3
>>>> s=-
>>>> c=IN IP4 10.0.0.3
>>>> t=0 0
>>>> m=audio 6000 RTP/AVP 8 101
>>>> a=rtpmap:8 PCMA/8000
>>>> a=rtpmap:101 telephone-event/8000
>>>> a=fmtp:101 0-11,16
>>>>
>>>>
>>>> 2) The proxy send the INVITE to sipp uas, adding the second Via
header
>>>> INVITE sip:[email protected]:5060 SIP/2.0
>>>> Record-Route:
>> <sip:10.0.0.1;lr=on;ftag=23603SIPpTag091;did=c04.37fe035>
>>>> Via: SIP/2.0/UDP 10.0.0.1;branch=z9hG4bK21dd.7d5758a6.0;rport
>>>> Via: SIP/2.0/UDP
>> 10.0.0.3:5060;rport=5060;received=10.0.0.3;branch=z9hG4bK
>>>> From: sipp <sip:[email protected]:5060>;tag=23603SIPpTag091
>>>> To: sut <sip:[email protected]:5060>
>>>> Call-ID: [email protected]
>>>> CSeq: 1 INVITE
>>>> Contact: sip:[email protected]:5060
>>>> Max-Forwards: 69
>>>> Subject: Performance Test
>>>> Content-Type: application/sdp
>>>> Content-Length: 187
>>>>
>>>> v=0
>>>> o=user1 53655765 2353687637 IN IP4 10.0.0.3
>>>> s=-
>>>> c=IN IP4 10.0.0.1
>>>> t=0 0
>>>> m=audio 50110 RTP/AVP 8 101
>>>> a=rtpmap:8 PCMA/8000
>>>> a=rtpmap:101 telephone-event/8000
>>>> a=fmtp:101 0-11,16
>>>>
>>>>
>>>> 3) The sipp uas does not properly recognize (maybe) the 2nd Via
>>> and send back this (please note the line after the first Via)
>>>> SIP/2.0 180 Ringing
>>>> Record-Route:
>> <sip:10.0.0.1;lr=on;ftag=23603SIPpTag091;did=c04.37fe035>
>>>> Via: SIP/2.0/UDP 10.0.0.1;branch=z9hG4bK21dd.7d5758a6.0;rport,
>>> SIP/2.0/UDP 10.0.0.3:5060;rport=5060;received=10.0.0.3;branch=z9hG4bK
>>>> From: sipp <sip:[email protected]:5060>;tag=23603SIPpTag091
>>>> To: sut <sip:[email protected]:5060>;tag=15130SIPpTag011
>>>> Call-ID: [email protected]
>>>> CSeq: 1 INVITE
>>>> Contact: <sip:10.0.0.2:5060;transport=UDP>
>>>> Content-Length: 0
>>> Is it my fault ?
>>> I'm using sipp from svn.
>>>
>>> --
>>> Giuseppe Roberti
>>> <[email protected]>
>>>
>>>
>>>
>>
------------------------------------------------------------------------------
>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
>> Nevada.
>>> The future of the web can't happen without you. Join us at MIX09 to
>> help
>>> pave the way to the Next Web now. Learn more and register at
>>>
>>
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>>> _______________________________________________
>>> Sipp-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/sipp-users
>>>
>>
------------------------------------------------------------------------------
>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
>> Nevada.
>>> The future of the web can't happen without you. Join us at MIX09 to
>> help
>>> pave the way to the Next Web now. Learn more and register at
>>>
>>
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>>> _______________________________________________
>>> Sipp-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
>
--
Giuseppe Roberti
<[email protected]>
------------------------------------------------------------------------------
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users
------------------------------------------------------------------------------
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users