[SR-Users] iterate trough all Record-Route values via @hf_value.Record_Route

Patrick Karton patrickarton at hotmail.com
Thu Jul 21 02:47:22 CEST 2022


Hello Thanks.

i found that in 5.6 version we have new pseudo var

$hfl and $hflc for that.
thats exactly what i needed.
________________________________
De : sr-users <sr-users-bounces at lists.kamailio.org> de la part de Denys Pozniak <denys.pozniak at gmail.com>
Envoyé : mardi 19 juillet 2022 14:32
À : Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Objet : Re: [SR-Users] iterate trough all Record-Route values via @hf_value.Record_Route

Hey!

Try this one:
$(hdr(name)[N]) - represents the body of the N-th header identified by 'name'.


вт, 19 июл. 2022 г. в 15:49, Patrick Karton <patrickarton at hotmail.com<mailto:patrickarton at hotmail.com>>:
Hello All,

i would to iterate through all ips in Record-Route through @hf_value.Record_Route.

if i put static index like @hf_value.Record_Route[0] it works.

but  $var(i) = 0; @hf_value.Record_Route[$var(i)] does not work.

is there a way to get the count of all headers values through @hf_value.Record_Route

For example i would like to iterate through all Record-Route Values if i receive it like this

Record-Route: <sip:1.1.1.1;lr=on;nat=yes>
Record-Route: <sip:2.2.2.2:5060;lr>,<sip:3.3.3.3:22506;lr>
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--

BR,
Denys Pozniak


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220721/887ba9e5/attachment.htm>


More information about the sr-users mailing list