[asterisk-bugs] [Asterisk 0012656]: [patch] Autoservice loses DTMF digits

noreply at bugs.digium.com noreply at bugs.digium.com
Thu May 29 17:18:02 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12656 
====================================================================== 
Reported By:                dimas
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   12656
Category:                   Core/PBX
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 116466 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             05-15-2008 05:24 CDT
Last Modified:              05-29-2008 17:18 CDT
====================================================================== 
Summary:                    [patch] Autoservice loses DTMF digits
Description: 
There is a problem with how autoservice handles its internal list of
channels. Basically:

1. it traverses the asent list and copies all the channels from the list
into an array
2. it waitfor on this array
3. if anything was received, it traverses the asent list again to map
channel back to AS entry (in order to queue received frame there)

autoservice_stop removes a channel from the list and waits when list
version updates (to make sure AS thread does not need this channel
anymore). The problem occurs when autoservice_stop is called between 1 and
3. The channel may be _already_ in the waitfor call when removed from the
list. So when AS thread returns from ast_waitfor/ast_read it fails finfing
this channel in the list and just discards the frame received.

in my setup this causes sometimes DTMFs to be lost.

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

---------------------------------------------------------------------- 
 svnbot - 05-29-08 17:18  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 119156

U   branches/1.4/main/autoservice.c

------------------------------------------------------------------------
r119156 | russell | 2008-05-29 17:18:01 -0500 (Thu, 29 May 2008) | 10
lines

Fix a race condition in channel autoservice.  There was still a small
window of opportunity
for a DTMF frame, or some other deferred frame type, to come in and get
dropped.

(closes issue http://bugs.digium.com/view.php?id=12656)
(closes issue http://bugs.digium.com/view.php?id=12656)
Reported by: dimas
Patches:
      v3-12656.patch uploaded by dimas (license 88)
	  -- with some modifications by me

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

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

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-29-08 17:18  svnbot         Checkin                                      
05-29-08 17:18  svnbot         Note Added: 0087525                          
======================================================================




More information about the asterisk-bugs mailing list