<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>check the URI transformation docs, iirc there is an option to get
user parameters.</p>
<p>If not, can you give an example of what params you want to work
with, likely you can get it with other transformations...</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 18.11.19 13:13, Duarte Rocha wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAAJJHZiyaE2x1Fh9aXUXSU5swqP2JMgvNPdJwUgCKd2Dv3HN=Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">Greetings,
<div dir="auto"><br>
</div>
<div dir="auto">My issue was related to user part parameters
being lost. I didn't know that the parse would work
differently when user=phone was present. Thank you for
pointing that out.</div>
<div dir="auto"><br>
</div>
<div dir="auto">That being said, how should i proceed if i want
to check user part parameters in this scenario? Like
phone-context for example. </div>
<div dir="auto"><br>
</div>
<div dir="auto">Best Regards</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">A sexta, 15/11/2019, 20:38,
Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" moz-do-not-send="true">miconda@gmail.com</a>>
escreveu:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>what did you expect to be? To be able to comment on the
exact topic.<br>
</p>
<p>user=phone changes the structure of the URI in something
similar to tel URI.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 15.11.19 17:51, Duarte Rocha wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div dir="auto">Greetings, </div>
<div dir="auto"><br>
</div>
<div dir="auto">I'm trying to parse some URI info on
Kamailio but i'm having some troubles the URI
transformations.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Here i have two examples of URIS from
which i'm trying to extract username(with user
parameters included) and URI Parameters : </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>-
<a rel="noreferrer" moz-do-not-send="true">sip:123456789;test=</a><a
href="mailto:param@1.1.1.1" target="_blank"
rel="noreferrer" moz-do-not-send="true">param@1.1.1.1</a></div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>-
<a rel="noreferrer" moz-do-not-send="true">sip:123456789;test=</a><a
href="mailto:param@1.1.1.1" target="_blank"
rel="noreferrer" moz-do-not-send="true">param@1.1.1.1</a>;user=phone</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span></div>
<div dir="auto">In order to test this i made the
following code : </div>
<div dir="auto"><br>
</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>$var(URI)
= "<a rel="noreferrer" moz-do-not-send="true">sip:123456789;test=</a><a
href="mailto:param@1.1.1.1" target="_blank"
rel="noreferrer" moz-do-not-send="true">param@1.1.1.1</a>";</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>xerr("DEBUG
1 : URI $var(URI)"); </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>$var(User)
= $(var(URI){uri.user}); </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>$var(Parameters)
= $(var(URI){uri.params}); </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>xerr("DEBUG
1 : User = $var(User)");</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>xerr("DEBUG
1 : Parameters = $var(Parameters)");</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span></div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>$var(URI)
= "<a rel="noreferrer" moz-do-not-send="true">sip:123456789;test=</a><a
href="mailto:param@1.1.1.1" target="_blank"
rel="noreferrer" moz-do-not-send="true">param@1.1.1.1</a>;user=phone";</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>xerr("DEBUG
2 : URI $var(URI)"); ;</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>$var(User)
= $(var(URI){uri.user});</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>$var(Parameters)
= $(var(URI){uri.params}); </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>xerr("DEBUG
2 : User = $var(User)"); </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>xerr("DEBUG
2 : Parameters = $var(Parameters)");</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span></div>
<div dir="auto">The result is the following : </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>DEBUG
1 : URI <a rel="noreferrer" moz-do-not-send="true">sip:123456789;test=</a><a
href="mailto:param@1.1.1.1" target="_blank"
rel="noreferrer" moz-do-not-send="true">param@1.1.1.1</a></div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>DEBUG
1 : User = 123456789;test=param</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>DEBUG
1 : Parameters =</div>
<div dir="auto"> </div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>DEBUG
2 : URI <a rel="noreferrer" moz-do-not-send="true">sip:123456789;test=</a><a
href="mailto:param@1.1.1.1" target="_blank"
rel="noreferrer" moz-do-not-send="true">param@1.1.1.1</a>;user=phone</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>DEBUG
2 : User = 123456789</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span>DEBUG
2 : Parameters = user=phone</div>
<div dir="auto"><span style="white-space:pre-wrap"> </span></div>
<div dir="auto"><span style="white-space:pre-wrap"> </span></div>
<div dir="auto">If the URI has parameters, the User
parameters won't be included in the User part.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Is this a bug or is it working as
intended? I'm running Kamailio 5.2.0 .</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thank you for your time.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Best Regards,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Duarte Rocha</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" rel="noreferrer" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" rel="noreferrer" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" rel="noreferrer" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio World Conference - April 27-29, 2020, in Berlin -- <a href="http://www.kamailioworld.com" target="_blank" rel="noreferrer" moz-do-not-send="true">www.kamailioworld.com</a></pre>
</div>
</blockquote>
</div>
</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>
Kamailio World Conference - April 27-29, 2020, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>