Review Board 1.7.16


Prevent segfault when asterisk restarts. Happens if call arrives before fully booted.

Review Request #1407 - Created Sept. 1, 2011 and submitted

Alec Davis
trunk
Reviewers
asterisk-dev
Asterisk
If a call arrives before asterisk is fully booted generally it will segfault.
restarted asterisk, and before all modules have finished loading made a call into it.
Warning message appears, and call is dropped.
No orphaned channels.

  == Using SIP RTP CoS mark 5
  == Registered translator 'slin 96000khz -> 32000khz' from format slin96 to slin32, table cost, 850000, computational cost 999999
[2011-09-05 21:57:11.617417] WARNING[30782]: pbx.c:5363 ast_pbx_start: PBX requires Asterisk to be fully booted
[2011-09-05 21:57:11.617973] WARNING[30782]: chan_sip.c:22917 handle_request_invite: Failed to start PBX :(
  == Registered translator 'slin 96000khz -> 44100khz' from format slin96 to slin44, table cost, 850000, computational cost 999999
Review request changed
Updated (Sept. 5, 2011, 12:15 a.m.)
  • restarted asterisk, and before all modules have finished loading made a call into it.
    Warnign message appears, and call is dropped.
    No orpaned channels.

    restarted asterisk, and before all modules have finished loading made a call into it.
    Warning message appears, and call is dropped.
    No orphaned channels.
    
      == Using SIP RTP CoS mark 5
      == Registered translator 'slin 96000khz -> 32000khz' from format slin96 to slin32, table cost, 850000, computational cost 999999
    [2011-09-05 21:57:11.617417] WARNING[30782]: pbx.c:5363 ast_pbx_start: PBX requires Asterisk to be fully booted
    [2011-09-05 21:57:11.617973] WARNING[30782]: chan_sip.c:22917 handle_request_invite: Failed to start PBX :(
      == Registered translator 'slin 96000khz -> 44100khz' from format slin96 to slin44, table cost, 850000, computational cost 999999
    
This addresses the segfault that is easily recreated with full debug turned on.

but doesn't attempt to fix all the places where ast_pbx_run() is called, where if ast_pbx_run() failed should the call be hangup or not. 
Ship it!
Posted (Sept. 5, 2011, 1:41 a.m.)
Looks like its is in order
Ship it!
Posted (Sept. 6, 2011, 9:12 a.m.)
I'll go along with this specific fix.

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.