<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>actually in this case is better to use first tobody.params and
then param transformations:</p>
<p><br>
</p>
<p> - <a
href="https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#tobodyparams">https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#tobodyparams</a></p>
<p> - <a
href="https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#parameters_list_transformations">https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#parameters_list_transformations</a></p>
<p><br>
</p>
<div class="moz-cite-prefix">The value is not a SIP URI only, but a
SIP URI followed by header parameters.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Cheers,<br>
Daniel</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 30.07.19 10:50, Henning Westerholt
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3ce12cff-a68f-60b4-a090-04b5255c9d03@skalatan.de">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<p>Hi Ionut,</p>
<p><br>
</p>
<p>if you are referring to URI parameters, there is a
transformation for that :-)</p>
<p><a class="moz-txt-link-freetext"
href="https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#uriparams"
moz-do-not-send="true">https://www.kamailio.org/wiki/cookbooks/5.2.x/transformations#uriparams</a></p>
<p><br>
</p>
<p>Cheers,</p>
<p><br>
</p>
<p>Henning<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 30.07.19 um 10:41 schrieb Ionut
Razvan Ionita:<br>
</div>
<blockquote type="cite" cite="mid:1564476065728.66955@1and1.ro">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
{margin-top:0;
margin-bottom:0}--></style>
<p>Hello,</p>
<p><br>
</p>
<p>Thank you for your reply. One more question. How am I
supposed to access parameters inside a header. If the header
has this format</p>
<p><br>
</p>
<p><URI>; reason=someReason;index=someIndex</p>
<p><br>
</p>
<p>Is there any othere way than using regex to access these
parameters?</p>
<p><br>
</p>
<p>Thank you,</p>
<p>Ionut<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
Henning Westerholt
<a class="moz-txt-link-rfc2396E"
href="mailto:hw@skalatan.de" moz-do-not-send="true"><hw@skalatan.de></a><br>
<b>Sent:</b> Thursday, July 25, 2019 7:29 PM<br>
<b>To:</b> Kamailio (SER) - Development Mailing List;
Ionut Razvan Ionita<br>
<b>Subject:</b> Re: [sr-dev] Parsing list of headers</font>
<div> </div>
</div>
<div>
<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">
<style type="text/css" style="">
<!--
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">_______________________________________________
Kamailio (SER) - Development Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.kamailio.org" moz-do-not-send="true">sr-dev@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" moz-do-not-send="true">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/" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services" moz-do-not-send="true">https://skalatan.de/services</a></pre>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services" moz-do-not-send="true">https://skalatan.de/services</a></pre>
<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">--
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>