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
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@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@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
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@lists.kamailio.org de la part de Denys Pozniak denys.pozniak@gmail.com Envoyé : mardi 19 juillet 2022 14:32 À : Kamailio (SER) - Users Mailing List sr-users@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@hotmail.commailto:patrickarton@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@lists.kamailio.orgmailto:sr-users@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