Hi, >-----Original Message----- >From: ext Stefano Sabatini [mailto:[EMAIL PROTECTED] >Sent: Friday, November 21, 2008 12:00 PM >To: sofia-sip-devel Mailing List >Subject: [Sofia-sip-devel] [BUG] SIP uri params specified in >the TO_TAG_STRwrongly detected as the To header params > >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: > > nua_invite(op->handle, > SIPTAG_FROM_STR("Alice <sip:[EMAIL PROTECTED]>"), > SIPTAG_TO_STR("sip:[EMAIL PROTECTED];foo=bar"), > NUTAG_MEDIA_ENABLE(0), > TAG_END()); > >will issue the following INVITE message: > > INVITE sip:[EMAIL PROTECTED] SIP/2.0 > Via: SIP/2.0/UDP 10.88.3.67;rport;branch=z9hG4bKmKgXBK495Byyp > Max-Forwards: 70 > From: Alice <sip:[EMAIL PROTECTED]>;tag=m4KHeHvHZeU8Q > To: <sip:[EMAIL PROTECTED]>;foo=bar > Call-ID: 8f686cee-3254-122c-6ebf-001a4b5c8ed5 > CSeq: 107512154 INVITE > Contact: <sip:10.88.3.67> > User-Agent: sofia-sip/1.12.9 > Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, >SUBSCRIBE, NOTIFY, REFER, UPDATE > Supported: timer, 100rel > Min-SE: 120 > Content-Length: 0 > >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: > > INVITE sip:[EMAIL PROTECTED];foo=bar SIP/2.0 > Via: SIP/2.0/UDP 10.88.3.67;rport;branch=z9hG4bK4S4Be5m0UB9HS > Max-Forwards: 70 > From: Alice <sip:[EMAIL PROTECTED]>;tag=4tjrS2F4397pp > To: <sip:[EMAIL PROTECTED];foo=bar> > Call-ID: f27c4f9b-3254-122c-0e84-001a4b5c8ed5 > CSeq: 107512237 INVITE > Contact: <sip:10.88.3.67> > User-Agent: sofia-sip/1.12.9 > Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, >SUBSCRIBE, NOTIFY, REFER, UPDATE > Supported: timer, 100rel > Min-SE: 120 > Content-Length: 0 > >I think this is a bug in sofia-sip.
I disagree. SIPTAG_TO_STR accepts the value for the entire To: header, not just the URI. If you want more discretion, form a sip_to_t structure and pass it to SIPTAG_TO. Best regards, Mikhail ------------------------------------------------------------------------- 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