[SR-Users] incomplete values and Wrong Counting for $hfl and $hflc

Patrick Karton patrickarton at hotmail.com
Thu Jul 21 15:00:59 CEST 2022

the counting and values provided by $hfl and $hflc are wrong and incomplete from my understanding. looking at the source code these pseudo vars count the body values of Via, Record-Route and Route headers.

in kamalio 5.6.1

Record-Route: <sip:;lr=on;nat=yes>
Record-Route: <sip:;lr;transport=udp>,<sip:;lr;transport=udp>

i get $hflc(Record-Route) == 2 instead of 3

and $(hfl(Record-Route)[0]) ==
       $(hfl(Record-Route)[1]) ==

 $(hfl(Record-Route)[3]) does not exists.

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

More information about the sr-users mailing list