[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  raul rojas <raulencasa@g...>
 Subject :  Fwd: [yate] escaped uri in Contact header
 Date :  Mon, 1 Jun 2009 15:44:20 -0300
Thanks Philipp, 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.

regards Raul

Begin forwarded message:

From: Philipp Kempgen 
Date: 1 de junio de 2009 13:54:48 GMT-03:00
To: yate@v...
Subject: Re: [yate] escaped uri  in Contact header

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.

> ------
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 10.49.1.15:5060;rport=5060;branch=z9hG4bK1539942439
> To: 
> From: "" ;tag=987987334
> Call-ID: 1162088421@1...
> CSeq: 1 INVITE
> Content-Length: 0
> ------
>  Sending code 180 0x80cbb40 to 10.49.1.11:5060
> ------
> SIP/2.0 180 Ringing
> Via: SIP/2.0/UDP 10.49.1.11;branch=z9hG4bK2f4e.
> 39aa8903.0;received=10.49.1.11;rport=5060
> Via: SIP/2.0/UDP  10.49.1.201:5060;rport=53108
> Record-Route: 
> From: "" ;tag=53907F0F-14F9
> To: ;tag=12548159
> Call-ID: AFA9D27-4AED11DE-B5A6B9BC-601638A3@1...
> CSeq: 101 INVITE
> Server: YATE/2.0.0
> 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
-- 




Thanks Philipp, 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.

regards Raul

Begin forwarded message:

From: Philipp Kempgen <philipp.kempgen@a...>
Date: 1 de junio de 2009 13:54:48 GMT-03:00
Subject: Re: [yate] escaped uri  in Contact header

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.

------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.49.1.15:5060;rport=5060;branch=z9hG4bK1539942439
To: <sip:+mac-001@1...>
From: "<null>" <sip:1166710748@1...>;tag=987987334
Call-ID: 1162088421@1...
CSeq: 1 INVITE
Content-Length: 0
------
<sip:INFO> Sending code 180 0x80cbb40 to 10.49.1.11:5060
------
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.49.1.11;branch=z9hG4bK2f4e.
39aa8903.0;received=10.49.1.11;rport=5060
Via: SIP/2.0/UDP  10.49.1.201:5060;rport=53108
Record-Route: <sip:10.49.1.11;lr;ftag=53907F0F-14F9;nat=yes>
From: "<null>" <sip:1166710748@1...>;tag=53907F0F-14F9
To: <sip:4919500@1...>;tag=12548159
Call-ID: AFA9D27-4AED11DE-B5A6B9BC-601638A3@1...
CSeq: 101 INVITE
Server: YATE/2.0.0
Contact: <sip:%2bmac-001@1...:5060>


   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
--