2008/11/21 Stefano Sabatini <[EMAIL PROTECTED]>:
> On the other hand sofia sip seems to get confused when parsing the
> TO_TAG, and it consider the uri params like header params.
>
> Making this clear with an example:
...
>               SIPTAG_TO_STR("sip:[EMAIL PROTECTED];foo=bar"),
...
> will issue the following INVITE message:
...
>   To: <sip:[EMAIL PROTECTED]>;foo=bar

> foo=bar is consiedered as an *header* param, while it was specified as
> an *uri* param.

> In order to get the correct behaviour (uri params in the request line)
> I have to specify the sip uri in the To tag like this:

> SIPTAG_TO_STR("<sip:[EMAIL PROTECTED];foo=bar>"), in which case I got:
...
>   To: <sip:[EMAIL PROTECTED];foo=bar>
....
> I think this is a bug in sofia-sip.

This is a well-known problem in RFC 3261. Quoting section 20.10 "Contact":

   When the header field value contains a display name, the URI
   including all URI parameters is enclosed in "<" and ">".  If no "<"
   and ">" are present, all parameters after the URI are header
   parameters, not URI parameters.  The display name can be tokens, or a
   quoted string, if a larger character set is desired.

   Even if the "display-name" is empty, the "name-addr" form MUST be
   used if the "addr-spec" contains a comma, semicolon, or question
   mark.  There may or may not be LWS between the display-name and the
   "<".

   These rules for parsing a display name, URI and URI parameters, and
   header parameters also apply for the header fields To and From.


-- 
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to