[OpenSIPS-Users] How to get top Record-Route URI?

Самусенко Андрей samusenko at msm.ru
Fri Aug 17 08:45:43 EDT 2018


xlog("Found \"Record-Route\" 1 header: $(hdr(Record-Route)[1])\n");
in log:
Found "Record-Route" 1 header: <null>

Index is for lines, not routes.
How to split by comma? No core function?)

On пятница, 17 августа 2018 г. 11:17:28 MSK Răzvan Crainea wrote:
> Hello!
> 
> You can index the hdr variable, like $(hdr(Record-Route)[1]).
> 
> Best regards,
> Răzvan
> 
> On 08/17/2018 10:51 AM, Самусенко Андрей wrote:
> > Hello.
> > 
> > xlog("Found \"Record-Route\" header: $hdr(Record-Route)\n");
> > 
> > gives
> > 
> > Found "Record-Route" header: <sip:1.2.3.4;r2=on;lr>,
> > <sip:5.6.7.8;r2=on;lr>
> > 
> > There are simple way to get first uri <sip:1.2.3.4;r2=on;lr> ?
> > 
> > Thanks!
> > 
> > On четверг, 16 августа 2018 г. 20:08:06 MSK Bogdan-Andrei Iancu wrote:
> >> Hi,
> >> 
> >> Try $(hdr(Record-Route)[*]) - this will give all the RR hdr. To get the
> >> first one, do $hdr(Record-Route)
> >> 
> >> Regards,
> >> 
> >> Bogdan-Andrei Iancu
> >> 
> >> OpenSIPS Founder and Developer
> >> 
> >>     http://www.opensips-solutions.com
> >> 
> >> OpenSIPS Bootcamp 2018
> >> 
> >>     http://opensips.org/training/OpenSIPS_Bootcamp_2018/
> >> 
> >> On 08/15/2018 06:03 PM, Samusenko Andrey wrote:
> >>> Hello.
> >>> RRs in one line, comma separated.
> >>> RRs is in reply.
> >>> Only regular expression can help?
> >>> 
> >>> 
> >>> 
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at lists.opensips.org
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > 
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users





More information about the Users mailing list