[asterisk-bugs] [Asterisk 0013548]: exten = 2813, n, Queue(test, c, , , , , , inqueue) craches when went into invalid extension

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Dec 3 12:37:41 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13548 
====================================================================== 
Reported By:                fiddur
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   13548
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.0-rc6 
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 143608 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-24 03:11 CDT
Last Modified:              2008-12-03 12:37 CST
====================================================================== 
Summary:                    exten = 2813,n, Queue(test,c,,,,,,inqueue)  craches
when went into invalid extension
Description: 
With empty [default] context and no context set for queue test, I had this
in context [local_phones]:

exten = 2813,1, Answer
exten = 2813,n, Queue(test,c,,,,,,inqueue)
exten = 2813,n, Hangup

exten = 2813,n(inqueue), NoOp(Call taken by ${MEMBERINTERFACE})
exten = 2813,n, Return

Yes, that's a misinterpretation of the gosub-statement, I have realised.
When a call came into 2813, and answered by a queuemember, asterisk shuts
down silently:

    -- Executing [2813 at local_phones:1] Answer("SIP/3004-082b9b10", "") in
new stack
    -- Executing [2813 at local_phones:2] Queue("SIP/3004-082b9b10",
"test,c,,,,,,inqueue") in new stack
    -- Started music on hold, class 'default', on SIP/3004-082b9b10
    -- SIP/3010-082bf340 is ringing
c042*CLI> 
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk ending (0).


The first time it happened, I also got:
[2008-09-24 09:41:20] WARNING[23423] pbx.c: Channel 'SIP/3003-b816e6d0'
sent into invalid extension 's' in context 'default', but no invalid
handler

====================================================================== 

---------------------------------------------------------------------- 
 (0095742) svnbot (reporter) - 2008-12-03 12:37
 http://bugs.digium.com/view.php?id=13548#c95742 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 160626

U   trunk/apps/app_dial.c
U   trunk/apps/app_queue.c
U   trunk/apps/app_stack.c

------------------------------------------------------------------------
r160626 | mmichelson | 2008-12-03 12:37:41 -0600 (Wed, 03 Dec 2008) | 16
lines

Add some safety measures when using gosub, especially when using the
options
for app_dial and app_queue to run a gosub when the call is answered.

* Check for the existence of the gosub target in gosub_exec. If it is
nonexistent,
  then this will cause errors when we attempt to actually run the gosub,
including
  a definite memory leak and potential crashes. Return an error in this
situation
* Check the return value of pbx_exec in app_dial and app_queue before
attempting
  to actually run the gosub routine. If there was an error, we should not
attempt
  to run the gosub.
* Change a '|' to a ',' in app_queue.
* Add some extra curly braces where they had been missing previously.

(closes issue http://bugs.digium.com/view.php?id=13548)
Reported by: fiddur


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=160626 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-03 12:37 svnbot         Checkin                                      
2008-12-03 12:37 svnbot         Note Added: 0095742                          
======================================================================




More information about the asterisk-bugs mailing list