<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Are you using it exactly like $hfl(Record-Route) or is it like
$hfl($var(hname)) with $var(hname) being "Record-Route"?</p>
<p><br>
</p>
<p>The first variant is the one covered by $hfl()/$hflc(), parsing
of the name being optimized at startup. On the second variant, the
name is dynamic at runtime, based on the $var() value and simply
compares the generic header names in the list, without any
specific optimization for "Record-Route" case.</p>
<p><br>
</p>
<p>I noticed an issue opened on bug tracker and there was the second
variant, while in this message seems to be the first variant. If
the first variant fails, then it is a bug there. If it is the
second that doesn't provide, it's because the feature is not there
yet.</p>
<p><br>
</p>
<p>Cheers,<br>
Daniel</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 21.07.22 15:00, Patrick Karton
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:VI1PR0402MB37891621218039DA91E824CBDF919@VI1PR0402MB3789.eurprd04.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof">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.</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof">in
kamalio 5.6.1</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof">with </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof">Record-Route:
<a class="moz-txt-link-rfc2396E" href="sip:1.1.1.1;lr=on;nat=yes"><sip:1.1.1.1;lr=on;nat=yes></a><br>
Record-Route:
<a class="moz-txt-link-rfc2396E" href="sip:2.2.2.2:5060;lr;transport=udp"><sip:2.2.2.2:5060;lr;transport=udp></a>,<a class="moz-txt-link-rfc2396E" href="sip:3.3.3.3:22506;lr;transport=udp"><sip:3.3.3.3:22506;lr;transport=udp></a><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof">i get
$hflc(Record-Route) == 2 instead of 3 </span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof">and
$(hfl(<span style="background-color:rgb(255, 255,
255);display:inline !important">Record-Route</span>)[0]) == <span
style="background-color:rgb(255, 255, 255);display:inline
!important">1.1.1.1</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"> <span
style="background-color:rgb(255, 255, 255);display:inline
!important">$(hfl(</span><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important">Record-Route</span><span
style="background-color:rgb(255, 255, 255);display:inline
!important">)[1])</span> == 2.2.2.2</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><span
style="background-color:rgb(255, 255, 255);display:inline
!important"> </span><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important">$(hfl(</span><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important">Record-Route</span><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important">)[3]) does not exists.</span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important"><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important"><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><span
style="margin:0px;background-color:rgb(255, 255,
255);display:inline !important"><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color:rgb(36, 41, 47);font-family:-apple-system,
BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI
Emoji";font-size:14px;background-color:rgb(255, 255,
255);display:inline !important" class="elementToProof"><br>
</span></div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</body>
</html>