[Home]

Summary:ASTERISK-02841: segfault if head caller times out of queue with moh running
Reporter:Kevin P. Fleming (kpfleming)Labels:
Date Opened:2004-11-17 08:46:03.000-0600Date Closed:2008-01-15 15:14:28.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_queue_moh.patch
Description:If the head caller (top of the queue) times out of the queue, or is dropped out because there are no longer any agents answering, the wait loop exits with res == 0. However, the subsequent code only stops ringing indication or moh if res != 0, which means if moh was running it is not stopped.

Subsequent commands in the dialplan after Queue() can cause Asterisk to segfault, if they try to open a stream on the channel in this situation.

****** ADDITIONAL INFORMATION ******

It is possible that a better fix is to just check if res != AST_PBX_KEEPALIVE, but I'm not sure if there are other cases where res < 0 is a valid situation and should be left alone.
Comments:By: Kevin P. Fleming (kpfleming) 2004-11-17 09:18:02.000-0600

Disclaimer is on file, sorry forgot to mention that.

By: Kevin P. Fleming (kpfleming) 2004-11-20 09:52:59.000-0600

No action on this bug? Did it get overlooked?

I understand that it's only a "major" problem if the native_moh patch is in use, so that's why I marked it minor... but it's still an obvious flaw in the app_queue code that should be fixed.

By: Mark Spencer (markster) 2004-11-20 10:16:02.000-0600

Fixed in CVS.  Thanks!

By: Brian West (bkw918) 2004-11-20 10:16:26.000-0600

Nope its not overlooked.  I talked to anthm about this because we knew it was a flaw in app_queue and didn't really look at it very hard.  I'm sure it will go in SOON.

bkw

By: Russell Bryant (russell) 2004-11-25 02:14:17.000-0600

fixed in 1.0 - will be in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:14:28.000-0600

Repository: asterisk
Revision: 4301

U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r4301 | markster | 2008-01-15 15:14:28 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix app_queue when working in conjunction with anthm's moh patch (bug ASTERISK-2841)

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

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