is there any easy way to access URIs in one or more record-route headers? there is @via[index], but no corresponding select for record- route URIs.
-- juha
Hello,
On 9/20/12 9:43 AM, Juha Heinanen wrote:
is there any easy way to access URIs in one or more record-route headers? there is @via[index], but no corresponding select for record- route URIs.
$(hdr(Record-Route)[index]{nameaddr.uri}) - this is a form of getting it via PV.
But I checked the list of selects and there is one named record_route.
I guess this form works as well, but never tested: @msg["Record-Route"][index].uri
Cheers, Daniel
Daniel-Constantin Mierla writes:
$(hdr(Record-Route)[index]{nameaddr.uri}) - this is a form of getting it via PV.
daniel,
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.
-- juha
Hello,
On 9/20/12 6:26 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
$(hdr(Record-Route)[index]{nameaddr.uri}) - this is a form of getting it via PV.
daniel,
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,,}. But have you checked the record_route select? Isn't giving what you want?
Cheers, Daniel
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.
-- juha
On 9/21/12 10:27 AM, jh@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