Hello list,
Does anyone how I can extract the last URI from a compact Record-Route header?
I've tried using a negative index in the parameter of my select but it returns the first URI in the header instead of the last.
$var(rr_last_uri) = @record_route.uri[-1];
Maybe there's another way instead of using selects?
Thanks,
John
I do have to wonder: what do you need to do that for? What are you trying to accomplish?
On Fri, Mar 16, 2018 at 11:40:01AM -0400, John Petrini wrote:
Hello list,
Does anyone how I can extract the last URI from a compact Record-Route header?
I've tried using a negative index in the parameter of my select but it returns the first URI in the header instead of the last.
$var(rr_last_uri) = @record_route.uri[-1];
Maybe there's another way instead of using selects?
Thanks,
John
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
The simple answer to that is it's a last ditch effort to look up an AOR record on a reply but it's part of other logic we use to establish direct media.
Why would you want to do that?
On March 16, 2018 6:07:15 PM GMT+02:00, John Petrini jpetrini@coredial.com wrote:
The simple answer to that is it's a last ditch effort to look up an AOR record on a reply but it's part of other logic we use to establish direct media.
-- Alex
-- Sent via mobile, please forgive typos and brevity.
Hi,
Check for $route_uri, we use it to determine the session-case (no or Mt) on the Proxy-CSCF.
Thanks, Carsten
Am 16.03.2018 17:07 schrieb "John Petrini" jpetrini@coredial.com:
The simple answer to that is it's a last ditch effort to look up an AOR record on a reply but it's part of other logic we use to establish direct media.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Carsten,
Thanks for the suggestion but it looks like that takes the URI from the route header not record-route. I tested to be sure but the assignment fails because there is no route header.
John Petrini Platforms Engineer
[image: Call CoreDial] 215.297.4400 x 232 <215-297-4400> [image: Call CoreDial] www.coredial.com https://coredial.com/ [image: CoreDial] 751 Arbor Way, Hillcrest I, Suite 150 Blue Bell, PA 19422 https://www.google.com/maps/place/CoreDial,+LLC/@40.140902,-75.2878857,17z/data=!3m1!4b1!4m5!3m4!1s0x89c6bc587f1cfd47:0x4c79d505f2ee580b!8m2!3d40.140902!4d-75.285697 The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
On Fri, Mar 16, 2018 at 12:32 PM, Carsten Bock carsten@ng-voice.com wrote:
Hi,
Check for $route_uri, we use it to determine the session-case (no or Mt) on the Proxy-CSCF.
Thanks, Carsten
Am 16.03.2018 17:07 schrieb "John Petrini" jpetrini@coredial.com:
The simple answer to that is it's a last ditch effort to look up an AOR record on a reply but it's part of other logic we use to establish direct media.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On 03/16/2018 05:07 PM, John Petrini wrote:
The simple answer to that is it's a last ditch effort to look up an AOR record on a reply but it's part of other logic we use to establish direct media.
try with $(hdr(Record-Route)[-1]).. it works for us (though, with another header name). Andrew
On 03/19/2018 10:37 AM, Andrew Pogrebennyk wrote:
On 03/16/2018 05:07 PM, John Petrini wrote:
The simple answer to that is it's a last ditch effort to look up an AOR record on a reply but it's part of other logic we use to establish direct media.
try with $(hdr(Record-Route)[-1]).. it works for us (though, with another header name). Andrew
Considering you might have multiple header fields all comma-separated in one header, to access the last uri you'd have to do something like:
$(hdr(Record-Route)[-1]{s.select,-1,,}{nameaddr.uri});
Andrew