|
From: Matsuoka N. <mat...@qk...> - 2009-01-21 01:59:56
|
Hi, Thank you for your information. This is exactly what I wanted to do ! I tried for "Record-Route" header and "Via" header, but both didn't work.. my scenario is... <recv request="NOTIFY" rtd="true"> <action> <ereg regexp=".*" search_in="hdr" occurance=”1" header="Via:" assign_to="1" /> <ereg regexp=".*" search_in="hdr" occurance=”2" header="Via:" assign_to="2" /> <ereg regexp=".*" search_in="hdr" occurance=”3" header="Via:" assign_to="3" /> </action> </recv> .... <send> <![CDATA[ SIP/2.0 200 OK Via:[$1] Via:[$2] Via:[$3] .... and It's result is ... Via: SIP/2.0/UDP 192.168.4.72:4060;branch=z9hG4bKa881.6597d637.0^M Via: SIP/2.0/UDP 192.168.4.72:4060;branch=z9hG4bKa881.6597d637.0^M Via: SIP/2.0/UDP 192.168.4.72:4060;branch=z9hG4bKa881.6597d637.0^M It seems like the first "Via" value was inserted for all. I missed something ? Noriko Matsuoka > > Hi > > I think that this is the way to solve your problem (or that’s what I > would try): > > Use the "occurrence" option at action tag of received request. Assign to a different variable result of regexp and use those variables while building the message sent. That is: > <action> > <ereg regexp=".*" search_in="hdr" header="Recor-Route:" check_it="true" occurance=”1” assign_to="1" /> > <ereg regexp=".*" search_in="hdr" header="Recor-Route:" check_it="true" occurance=”2” assign_to="2" /> > </action> > While building the message sent the Record-Route set will be inserted as: > Record-Route: [$2] > Record-Route: [$1] > > I hope it will help J > > > Regards, > > Evgeny Miloslavsky > > Systest Engineer > > Juniper Networks Solutions Israel LTD. > > Office: 972-9-9717320/2355 > > -----Original Message----- > From: Matsuoka Noriko [mailto:mat...@qk...] > Sent: Friday, January 16, 2009 3:37 AM > To: sip...@li... > Subject: [Sipp-users] How to get message header items > > Hi all, > > I want to get multi lined "Record-Route" in sip message header. > > messsage is like this.. > > INVITE sip:192.168.4.73:5061;transport=UDP SIP/2.0 > > Record-Route: <sip:mt at pcscf.ims.test:4060;lr> > > Record-Route: <sip:mt at scscf.ims.test:6060;lr> > > Record-Route: <sip:mo at scscf.ims.test:6060;lr> > > >From my understanding, by using [last_Record-Route:] tag, I can > > retrieve all Record-Route of the last message, > > but in my case, I need to keep it for subsequent message, > > that is not just after. > > By using regexp function, I don't know how to get multiple > > Record-Route headers. > > If you have any tip, please help me ! > > Thank you in advance. > > Regards. > > Noriko Matsuoka > > ------------------------------------------------------------------------------ > > 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 > > Sip...@li... > > https://lists.sourceforge.net/lists/listinfo/sipp-users > |