<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Ionut,</p>
<p><br>
</p>
<p>if you like to do it in the cfg - just some ideas:</p>
<p><br>
</p>
<p>- iterate in a loop over the number of headers $hdrc</p>
<p>- access with the loop variable the respective header $hdr[i]</p>
<p>- do your operation, save temporary results in another $avp</p>
<p>- finish the operation by appending your header from the $avp</p>
<p><br>
</p>
<p>These PVs are (as usual) documented in the cookbook.<br>
</p>
<p><br>
</p>
<p>Cheers,</p>
<p><br>
</p>
<p>Henning<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 25.07.19 um 17:44 schrieb Ionut Razvan Ionita:<br>
</div>
<blockquote type="cite" cite="mid:1564069484201.29978@1and1.ro"><style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} --></style>
<p>Hello all,</p>
<p><br>
</p>
<p>I am trying to implement RFC 7544 in kamailio.cfg, more specifically to transform Diversion header into History-Info. To do this I need to iterate over all Diversion headers and be able to get all the parameters from it. At first I discovered $di core variable,
 but I can access only the first header with it. I discovered kamailio selectors but I can't index them with a variable. I came to the point where I want to implement variable indexing to selectors but after I saw this API is quite complex I thought to ask
 here if there's any other solution to do this?!</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Ionut<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.kamailio.org">sr-dev@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>