[SR-Users] Removing parameters from user part of URI

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 15 15:33:26 CEST 2015



On 15/06/15 15:18, Alex Hermann wrote:
> On Monday 15 June 2015, Alex Balashov wrote:
>> On 06/15/2015 04:20 AM, Alex Hermann wrote:
>>> $(rU{select,0,;}) will always select the username with all parameters
>>> stripped.
>> Will it? What if the parameters precede the username, i.e.
>>
>>     sip:param1=hyz;param2;abc;user at host
> I have never heard about that. It is valid syntax according to the ABNF.

Is it valid to have the parameters before ny ABNF grammar? I'm really
surprised (I had no time to look at the grammar, thought)!

Thinking of the natural way of having parameters for something (e.g.,
think of parameters for functions are after the function name
everywhere, or parameters for commands in shell are after the command name).

More over, there can be parameters without value (e.g., 'lr' for URI in
Record-/Route headers), so practically if parameters are allowed before,
then the value of the field cannot be identified anymore in a
predictable way.

Cheers,
Daniel

>  But 
> the URI ABNF does not specify user-parameters, the whole part between sip: and 
> @ is the 'user' part.
>
> If you want to define that ; in the 'user' part defines parameters, IMHO the 
> only sensible thing to do is put them at the end. Otherwise, what would be the 
> meaning? How would you know what part is a username? What makes 'user' a 
> username and not 'param2' or 'abc', or even 'param1=hyz'?
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com




More information about the sr-users mailing list