Re: [reSIProcate-users] Uri and user parameters (if you do anything with user parameters, please read, or I will break your code)
Stuff inline:
> As noone else seem to have reacted, I will.
>
> I don't know if we have ever received a tel URI, but the way it is handled is
> to adapt to the current situation by using userParameters() for tel URIs and
> extracting the parameters from user() for sip URIs.
> The code would not be hard to change, and the "user parameters" notion seems
> to be created just to handle this situation, but are not the parameters in
> the tel URI case really URI parameters, and part of the userinfo in a sip URI?
Yes, which is one reason our code needs to change (the params go in
userParameters() in the tel URI case, when they really should be going in the
same place that you'd find other URI parameters).
> That seems to indicate that the parameters should be found through
> Uri::param() for tel URIs and Token(user)::param() for sip URIs (obviously
> getting rid of userParameters()), i.e. your solution 1 .
This is the solution that I think is most correct.
> Would you even need a getUserAsTelephoneSubscriber()?
It would be very nice to have in either solution. Without it, to get
the phone-context param from
sip:2145551234;phone-context=+1@xxxxxxxxxxx;user=dialstring, you'd need to have
the app writer implement parse code to extract the parameter from mUser or
mUserParameters (depending on the solution we settle on). We already have this
parse code.
>
> We have never converted tel URIs to sip ones, and if your example is correct
> I'm kind of glad we haven't: section 19.1.1 of RFC 3261 says "If the user
> string contains a telephone number formatted as a telephone-subscriber, the
> user parameter value "phone" SHOULD be present", and that (user=phone) is
> what we use (is dialstring from 2543?). When parsing incoming numbers we
> don't require it, so in this situation it would be less of a problem. Other
> equipment seem to be more picky, though.
>
user=dialstring is also fair game (RFC 4967). Although it appears that
my example misuses it. :/
Best regards,
Byron Campen