[asterisk-bugs] [Asterisk 0017127]: Wrong encoding of SIP URI

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Apr 5 16:30:49 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17127 
====================================================================== 
Reported By:                sdaniels
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17127
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.30 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-04-01 16:37 CDT
Last Modified:              2010-04-05 16:30 CDT
====================================================================== 
Summary:                    Wrong encoding of SIP URI
Description: 
When callerid(num) of an incoming call has a # in the number the SIP URI is
not encoded properly.

Should be encoded as %23

A lot of phones just reject the call.



====================================================================== 

---------------------------------------------------------------------- 
 (0120146) sdaniels (reporter) - 2010-04-05 16:30
 https://issues.asterisk.org/view.php?id=17127#c120146 
---------------------------------------------------------------------- 
sip.conf, extension.conf and sip debug of incoming call uploaded
(testserver to make debug more simple).

I am using strings with a # for choosing the outgoing line. On incoming
calls I am preparing the number for callback by adding the strings.

It is working without problmes with Snom ore Linksys phones.

Testing Aastra phones I get "400 Bad Request" back from phone on incoming
call.

Talking to the support of Aastra I got the answer back, that # must be
encoded in sip uri.

Checking outgoing call from Aastra phone with # in the number shows
encoded uri.

Expecting: 
From: "001707901706" <sip:1%23001707901706 at 192.168.110.48>;tag=as24950318
Getting:
From: "001707901706" <sip:1#001707901706 at 192.168.110.48>;tag=as24950318

According to http://www.ietf.org/rfc/rfc2396.txt the # must be escaped. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-04-05 16:30 sdaniels       Note Added: 0120146                          
======================================================================




More information about the asterisk-bugs mailing list