[asterisk-bugs] [Asterisk 0011880]: SIP username -> defaultuser confuses realtime system(s)

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Jan 30 16:43:59 CST 2008


email_notification_title_for_status_bug_ready_for_testing 
====================================================================== 
http://bugs.digium.com/view.php?id=11880 
====================================================================== 
Reported By:                cabal95
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   11880
Category:                   Core-General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.0-beta1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-30-2008 11:24 CST
Last Modified:              01-30-2008 16:43 CST
====================================================================== 
Summary:                    SIP username -> defaultuser confuses realtime
system(s)
Description: 
In 1.6.0 the SIP username field was renamed to defaultuser.  The sip.conf
file still works in a deprecated form as username is still allowed and will
give a warning.  Realtime systems (example the res_mysql in addons)
directly use the new field absolutely, which causes a MySQL error.

1- Realtime systems supported should provide a "deprecated" check to see
if the table is still using the username field instead of defaultuser and
then warn the user but continue to work (and internally translate
"defaultuser" into "username"), or

2- Provide suggested workarounds for people that cannot update their
tables immediately.  We have our production server use realtime SIP records
and our test server (now 1.6.0) using realtime SIP records from the same
database for call routing information.  My fix was to create an SQL VIEW
that translates the field names.

Number 1 would be preferable from a user standpoint, but I don't know
enough about the realtime system to know if that is even possible.  At the
very least the UPGRADE file should be updated to let users of realtime SIP
know that username will simply not work anymore, period.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 01-30-08 16:43  
---------------------------------------------------------------------- 
I have implemented option 1 in 11880.patch. The first time that "username"
is found in either sip.conf or in realtime, a deprecation notice will be
printed. Realtime updates should be properly made based on whether
"username" or "defaultuser" was used when configuring.

Please test and see if this clears up the problem. Thanks for bringing
this to our attention! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-30-08 16:43  putnopvut      Note Added: 0081466                          
01-30-08 16:43  putnopvut      Status                   assigned => ready for
testing
======================================================================




More information about the asterisk-bugs mailing list