[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 20:12:28 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 20:12 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.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0015008 [patch] Introduce better parsing for th...
====================================================================== 

---------------------------------------------------------------------- 
 (0121532) tilghman (administrator) - 2010-05-06 20:12
 https://issues.asterisk.org/view.php?id=17298#c121532 
---------------------------------------------------------------------- 
Please quote any field that may contain characters that would otherwise be
interpreted as delimiters.  As this is Asterisk configuration file syntax,
RFCs do not apply. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-06 20:12 tilghman       Note Added: 0121532                          
======================================================================




More information about the asterisk-bugs mailing list