<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I’ve come up with something that works:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">                               $var(contact_uri) = $sel(contact.uri);<o:p></o:p></p>
<p class="MsoNormal">                               $var(tgrp) = $(var(contact_uri){param.value,tgrp});<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Not sure if « $sel(contact.uri.params) » is supposed to work as I think it should…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:FR">De :</span></b><span style="mso-fareast-language:FR"> sr-users <sr-users-bounces@lists.kamailio.org>
<b>De la part de</b> Chaigneau, Nicolas<br>
<b>Envoyé :</b> vendredi 18 décembre 2020 15:08<br>
<b>À :</b> Kamailio (SER) - Users Mailing List<br>
<b>Objet :</b> [SR-Users] Trying to use $sel(contact.uri.params)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’d like to use a « select » as described here:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://www.kamailio.org/wiki/cookbooks/5.4.x/selects#contactparams_s">http://www.kamailio.org/wiki/cookbooks/5.4.x/selects#contactparams_s</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m trying to extract a parameter from the Contact URI.<o:p></o:p></p>
<p class="MsoNormal">What I’ve tried to do:<o:p></o:p></p>
<p class="MsoNormal">                               xlog("L_INFO", "contact.uri: $sel(contact.uri)\n"); # OK<o:p></o:p></p>
<p class="MsoNormal">                               xlog("L_INFO", "contact.uri.params: $sel(contact.uri.params)\n"); # null ??<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This does not seem to work… see output here :<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">3(10316) INFO: {1 INVITE r8wEHsAgxNIS5OJL} <script>: contact.uri:
<a href="sip:+33145678901;tgrp=YC031;trunk-context=YC90@10.31.22.2:5099">sip:+33145678901;tgrp=YC031;trunk-context=YC90@10.31.22.2:5099</a><o:p></o:p></p>
<p class="MsoNormal">3(10316) INFO: {1 INVITE r8wEHsAgxNIS5OJL} <script>: contact.uri.params: <null><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">What am I doing wrong ?<o:p></o:p></p>
<p class="MsoNormal">Maybe this is the wrong approach for what I’m trying to do ?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Nicolas.<o:p></o:p></p>
</div>
<span style="font-size: 9px; line-height: 10px;">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</span></body>
</html>