[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 14:44:35 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 14:44 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0121499) jcovert (reporter) - 2010-05-06 14:44
 https://issues.asterisk.org/view.php?id=17298#c121499 
---------------------------------------------------------------------- 
It's only minor if that actually works as a work-around.  (Well, ok, I've
patched my system to work around it as well, but not in a way that is
generally applicable.) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-06 14:44 jcovert        Note Added: 0121499                          
======================================================================




More information about the asterisk-bugs mailing list