[SR-Users] any easy way to access record-route URIs?

Daniel-Constantin Mierla miconda at gmail.com
Fri Sep 21 10:52:12 CEST 2012


On 9/21/12 10:27 AM, jh at tutpro.com wrote:
>> as i read in pv wiki and tested, $(hdr(Record-Route)[index]) returns ALL
>>> uris in r-r header number 'index'.  what i tried to achieve, is to get
>>> from record-route or route headers uri number 'index' no matter how many
>>> uris are on one single header.
>> yes, probably you can script it in config file, searching for ',', then
>> using {s.select,index,,}.
> that is what i did in the first place, but then went and asked if there is
> an easy way to achieve the same.
>
> But have you checked the record_route select?
>> Isn't giving what you want?
> i have not managed to make the select work at all.  for example,
>
>              $var(foo) = @msg.route.[0].nameaddr.uri;
>
> gives me parse errors.

Don't use . in front of [index] -- iirc, . is used only when separating 
string tokens, but I am not a big user of selects.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu




More information about the sr-users mailing list