[asterisk-bugs] [Asterisk 0017298]: Register statement in sip.conf does not accept slash in user part (valid per RFC 3261)

Asterisk Bug Tracker noreply at bugs.digium.com
Thu May 6 15:46:03 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17298 
====================================================================== 
Reported By:                jcovert
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17298
Category:                   Channels/chan_sip/Interoperability
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.6 
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-05-06 12:10 CDT
Last Modified:              2010-05-06 15:46 CDT
====================================================================== 
Summary:                    Register statement in sip.conf does not accept slash
in user part (valid per RFC 3261)
Description: 
The definition of the user part of a SIP URI from Section 25 (page 221) of
RFC 3261 is:

user             =  1*( unreserved / escaped / user-unreserved )
user-unreserved  =  "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"

note specifically that "/" is "user-unreserved" and can be specified
without any escaping.

One of my providers requires the following _valid_ SIP URI for
registration:

sip:abcd/efgh at provider.net

This results in the error message

Format for registration is
[peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry]
at line n

I am temporarily working around the problem by disabling the check for the
'/'
 in  AST_NONSTANDARD_RAW_ARGS(pre2, pre1.userpart, '/'); but if
"transport://" is to be accepted in a register statement, looking for it is
going to have to be done more carefully, since _any_ character (even the
first) of the "user" part may be a slash.  It should be possible to look
for the three character string "://", since ":" is NOT one of the valid
user part characters.  Watch out though: it is a valid part of a password
-- but a reasonable restriction would be that the password for the register
must be in the "secret=" of a corresponding sip.conf [section] referenced
in the host part.
====================================================================== 

---------------------------------------------------------------------- 
 (0121510) jcovert (reporter) - 2010-05-06 15:46
 https://issues.asterisk.org/view.php?id=17298#c121510 
---------------------------------------------------------------------- 
OK.  I backed my temporary code workaround out and tried 

udp://abcd/efgh@provider8/provider8

It works; it picks up the password from the [provider8] section below.

It is, however, a regression: 1.6.1.16 parsed it correctly without
requiring the udp:// in front, because that code explicitly looked for
"://" to determine if there was a transport type present.

/john 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-06 15:46 jcovert        Note Added: 0121510                          
======================================================================




More information about the asterisk-bugs mailing list