[asterisk-bugs] [Asterisk 0010690]: sip peer with missing close bracket causes all subsequent sip peers not to load

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Nov 13 12:56:04 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10690 
====================================================================== 
Reported By:                dtyoo
Assigned To:                qwell
====================================================================== 
Project:                    Asterisk
Issue ID:                   10690
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:            1.4.9  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-10-2007 17:34 CDT
Last Modified:              11-13-2007 12:56 CST
====================================================================== 
Summary:                    sip peer with missing close bracket causes all
subsequent sip peers not to load
Description: 
We have found that if you leave the trailing square bracket off a given sip
peer name in sip.conf, then you reload chan_sip.so, all peers that would be
loaded after the broken peer do not load.  It looks like the config parser
understands what is wrong as I see the following in the messages file:

config.c: parse error: no closing ']', line 25 of xxxx.sip.conf

But then all the rest of your sip peers disappear.  Obviously the error is
the lack of a closing brace.  But I would think that the impact of this
config error could be minimized if just this sip peer were tossed, and the
next sip peer were loaded normally.  With frequent manual editing of a
large sip.conf this is bound to happen sometime.  This has happened to us a
couple times, each time causing a fairly substantial outage for us as
several thousand sip peers disappear.
====================================================================== 

---------------------------------------------------------------------- 
 dtyoo - 11-13-07 12:56  
---------------------------------------------------------------------- 
qwell-

I tested the latest patch (10690-reload3.diff) and it is working fine.  On
reload the broken peer is tossed out, and the existing peer state
preserved.  On restart you get:

[Nov 13 13:49:12] WARNING[20496]: config.c:607 process_text_line: parse
error: no closing ']', line 25 of xxx.sip.conf
[Nov 13 13:49:12] NOTICE[20496]: chan_sip.c:16530 reload_config: Unable to
load config sip.conf

No sip peers are loaded at all in this case.  Ideally I would say that
restart should behave the same way that reload does.  There won't be any
existing state so I would expect this peer to just not be present, but for
the rest of the sip peers to load normally. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-13-07 12:56  dtyoo          Note Added: 0073583                          
======================================================================




More information about the asterisk-bugs mailing list