Hello,

I made a similar discovery recently then found this issue approving what Daniel 
said: https://github.com/kamailio/kamailio/issues/953

Julien

De : sr-users <[email protected]> au nom de Daniel-Constantin 
Mierla <[email protected]>
Répondre à : "[email protected]" <[email protected]>, "Kamailio (SER) - Users 
Mailing List" <[email protected]>
Date : vendredi 15 novembre 2019 à 21:39
À : "Kamailio (SER) - Users Mailing List" <[email protected]>, Duarte 
Rocha <[email protected]>
Objet : Re: [SR-Users] Problem with URI transformations


Hello,

what did you expect to be? To be able to comment on the exact topic.

user=phone changes the structure of the URI in something similar to tel URI.

Cheers,
Daniel
On 15.11.19 17:51, Duarte Rocha wrote:
Greetings,

I'm trying to parse some URI info on Kamailio but i'm having some troubles the 
URI transformations.

Here i have two examples of URIS from which i'm trying to extract username(with 
user parameters included) and URI Parameters :
- sip:123456789;[email protected]<mailto:[email protected]>
- sip:123456789;[email protected]<mailto:[email protected]>;user=phone
In order to test this i made the following code :

$var(URI) = "sip:123456789;[email protected]<mailto:[email protected]>";
xerr("DEBUG 1 : URI $var(URI)");
$var(User) = $(var(URI){uri.user});
$var(Parameters) = $(var(URI){uri.params});
xerr("DEBUG 1 : User = $var(User)");
xerr("DEBUG 1 : Parameters = $var(Parameters)");
$var(URI) = "sip:123456789;[email protected]<mailto:[email protected]>;user=phone";
xerr("DEBUG 2 : URI $var(URI)"); ;
$var(User) = $(var(URI){uri.user});
$var(Parameters) = $(var(URI){uri.params});
xerr("DEBUG 2 : User =  $var(User)");
xerr("DEBUG 2 : Parameters = $var(Parameters)");
The result is the following :
DEBUG 1 : URI sip:123456789;[email protected]<mailto:[email protected]>
DEBUG 1 : User = 123456789;test=param
DEBUG 1 : Parameters =

DEBUG 2 : URI sip:123456789;[email protected]<mailto:[email protected]>;user=phone
DEBUG 2 : User =  123456789
DEBUG 2 : Parameters = user=phone
If the URI has parameters, the User parameters won't be included in the User 
part.

Is this a bug or is it working as intended? I'm running Kamailio 5.2.0 .

Thank you for your time.

Best Regards,

Duarte Rocha



_______________________________________________

Kamailio (SER) - Users Mailing List

[email protected]<mailto:[email protected]>

https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- 
www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>

Kamailio World Conference - April 27-29, 2020, in Berlin -- 
www.kamailioworld.com<http://www.kamailioworld.com>
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to