This works for me :)

<ereg regexp="branch=.*" search_in="hdr" header="Via:" occurence="index of
what ViaHeader do you need" assign_to="var"/>

Regards

On Thu, Dec 3, 2009 at 6:10 AM, Wen Jun <[email protected]> wrote:

>  What the regrexp should be if I want to abstract and store the branch
> from the following via header ?
>
> Via: SIP/2.0/UDP 192.168.2.2:45147;branch=z9hG4bK-4250-2-12
>
> Regards,
>
> Jun
>
>  ------------------------------
> *From:* Evgeny Miloslavsky [mailto:[email protected]]
> *Sent:* Wednesday, December 02, 2009 6:03 PM
> *To:* jun,wen
>
> *Cc:* [email protected]
> *Subject:* Re: [Sipp-users] [truncated] Via Header
>
>  Fixed.
>
> Correct version is
>
>
>
> <ereg regexp="".*"" search_in="hdr" header="Via:"
> occurrence="1" assign_to="1" />
>
>
> <ereg regexp="".*"" search_in="hdr" header="Via:"
> occurrence="2" assign_to="2" />
>
>
>
> <ereg regexp="".*"" search_in="hdr" header="Via:"
> occurrence="3" assign_to="3" />
>
>
>
> Regards,**
>
> *Evgeny Miloslavsky*
>
> *Systest Engineer*
>
> *Juniper Networks Solutions Israel LTD.*
>
> *Office: 972-9-9712355*
>
> *Office: 972-74-7170072***
>  ------------------------------
>
> *From:* jun,wen [mailto:[email protected]]
> *Sent:* Wednesday, December 02, 2009 11:42 AM
> *To:* Evgeny Miloslavsky
> *Cc:* [email protected]; 'Wen Jun'; 'jun,wen'
> *Subject:* RE: [Sipp-users] [truncated] Via Header
>
>
>
> Is that my regrexp correct on this situation ? I will try later.
>
>
>
> Thanks and Regards,
>
>
>
> Jun
>
>
>
> <ereg regexp="".*"" search_in="hdr" header="Via:"
> occurrence="1" assign_to="1" />
>
>
> <ereg regexp="".*"" search_in="hdr" header="Via:"
> occurrence="2" assign_to="2" />
>
>
>
> <ereg regexp="".*"" search_in="hdr" header="Via:"
> occurrence="3" assign_to="3" />
>
>
>  ------------------------------
>
> *From:* Evgeny Miloslavsky [mailto:[email protected]]
> *Sent:* Wednesday, December 02, 2009 5:06 PM
> *To:* Wen Jun
> *Cc:* [email protected]
> *Subject:* Re: [Sipp-users] [truncated] Via Header
>
> If you want to be 100% sure I would suggest you to assign first Via header
> value to variable “1” , second Via header value to variable “2” and so on.
> To distinguish between first second and third Via’s within request received
> use “occurrence” option.
>
> While sending 180 response put 3 Via headers. That is: Via: [$1]
>
>
> Via: [$2]
>
>
> Via: [$3]
>
>
>
> This way you’ll ensure that outgoing response will have exactly the same
> Via headers with exactly the same order as they appeared at request being
> responded.
>
> Regards,**
>
> *Evgeny Miloslavsky*
>
> *Systest Engineer*
>
> *Juniper Networks Solutions Israel LTD.*
>
> *Office: 972-9-9712355*
>
> *Office: 972-74-7170072***
>  ------------------------------
>
> *From:* Wen Jun [mailto:[email protected]]
> *Sent:* Wednesday, December 02, 2009 10:30 AM
> *To:* [email protected]
> *Subject:* [Sipp-users] [truncated] Via Header
>
>
>
> Hi, very grateful if some one can shed hints into my scenario. I am running
> SIPp svn 590.
>
> My UAC is talking to UAS through a SIP Register/Proxy. When UAS received
> the INVITE from SIP Proxy, the via headers were listed as followings:
>
>         Via: SIP/2.0/UDP
> 192.168.2.6;branch=z9hG4bK-sipapp-08cfafff1cf32f14e2fbdfd1262508a85dce
>         Via: SIP/2.0/UDP
> 192.168.2.6;branch=z9hG4bK-sipapp-08cc700bca9b03bc99aafb4ffc9432f4f085~6b297230d8cf380f65237fe376032c4e
>         Via: SIP/2.0/UDP 192.168.2.2:47911;branch=z9hG4bK-23688-1-16
>
> When UAS responsed with 180 ring by [last_Via:], the via header was listed
> as following:
>
>
>
>         [truncated] Via: SIP/2.0/UDP
> 192.168.2.6;branch=z9hG4bK-sipapp-08cfafff1cf32f14e2fbdfd1262508a85dce,
> SIP/2.0/UDP
> 192.168.2.6;branch=z9hG4bK-sipapp-08cc700bca9b03bc99aafb4ffc9432f4f085~6b297230d8cf380f65237fe376032c4e,
> SIP/2.0/UDP 192.168
>
> Is it normal or not for the truncated via header ?
>
>
>
> While it was strange that my SIP Register/Proxy sent UAS another unexpected
> INVITE and that struck my scenario.
>
>
>
> Regards,
>
>
>
> Jun
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Sipp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sipp-users
>
>


-- 
Vanessa Tejada
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to