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

Răzvan Crainea razvan at opensips.org
Fri Aug 17 04:17:28 EDT 2018


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
> 

-- 
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com



More information about the Users mailing list