[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  Philipp Kempgen <philipp.kempgen@a...>
 Subject :  Re: Fwd: [yate] escaped uri in Contact header
 Date :  Mon, 01 Jun 2009 21:28:27 +0200
raul rojas schrieb:
> I suppose my question should be :
> 
> is there a reason to convert to an escaped uri in the contact header.
> until I changed the version , yate use an unescaped uri, but now they  
> convert it to use in the contact filed.

I cannot comment on the reason, but some characters definitely
have to be escaped.
http://tools.ietf.org/html/rfc3261#section-19.1.2
http://tools.ietf.org/html/rfc3261#section-25.1
---cut---
SIP-URI          =  "sip:" [ userinfo ] hostport
                    uri-parameters [ headers ]
SIPS-URI         =  "sips:" [ userinfo ] hostport
                    uri-parameters [ headers ]
userinfo         =  ( user / telephone-subscriber ) [ ":" password ] "@"
user             =  1*( unreserved / escaped / user-unreserved )
user-unreserved  =  "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
---cut---

Any implementation which does not treat "%2b" and "+" as the same
character is faulty because both are valid and equal.

However it might be more compatible not to escape characters which
don't necessarily have to be escaped. Not quite sure.

> Begin forwarded message:
> From: Philipp Kempgen 

> raul rojas schrieb:
>> It is correct to use an escaped uri in the contact header?
>>
>> I experienced problems with answered calls after upgrading from yate2
>> stable to the Revision 2655.
>>
>> The problem is related to the use of uriEscape in libs/ysip/ 
>> message.cpp
>>
>> If the callee'uri  has a "+" sign, when the caller answers, Yate didnt
>> recongnize the the ACK of the caller as correct for the dialog.
>> if no "+" sign is included in the uri, there is no problem at all.
>>
>> description:
>> the uri field is: 				+mac....
>> the Contact field in the 200 OK is escaped: 	%2bmac...
>> the ACK with the escaped value: %2bmac isn't recognized as ACK to this
>> call.
> 
> I think that according to RFC 3261 both "+" and "%2b" are allowed in
> the user part of the SIP URI in the Contact header.

>> To: 

>> Contact: 

    Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
--