[asterisk-bugs] [Asterisk 0011628]: fundamental (?) autoservice problem

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Dec 23 11:55:23 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11628 
====================================================================== 
Reported By:                dimas
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11628
Category:                   Core/Channels
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.16.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             12-23-2007 10:04 CST
Last Modified:              12-23-2007 11:55 CST
====================================================================== 
Summary:                    fundamental (?) autoservice problem
Description: 
While troubleshooting an issue we are having with DTMF I discovered it is
mostly caused by the autoservice.

The problem is: 
1. ast_read does alot of emulation stuff like expanding DTMF_END into
properly separated in time DTMF_BEGIN + DTMF_END
2. ast_read is called from autoservice when running some long operations
3. autoservice queues collected frames back to the channel when stopped

This results in thse DTMF_BEGIN/DTMF_END frames getting back to next
ast_read call after autoservice has stopped. And ast_read uses these frames
as input for the emulation process again. To me this is very wrong.

Unfortunately I have no idea how to fix this at the moment. One of
approaches would be to have ast_read_raw (or something) which just returns
frame read fom the channel without any processing and queue these frames
instead. However it can cause more poblems whet it solves.

Another approach (which is a huge change) would be to have special threads
which constantly read channels doing all the processing (what __ast_read
does) and queueing result frames into special queue of the limited length
within channel. This way ast_read would only take the frame from that
queue. This way autoservice becomes unnecessary because each channel is
"autoserviced" all the time.
====================================================================== 

---------------------------------------------------------------------- 
 dimas - 12-23-07 11:55  
---------------------------------------------------------------------- 
Another possible (and cheap) solution is just to add another queue
(processed_frames) to the channel so autoservice will put all frames there
and ast_read will be modified to first return frames from that queue
without any extra processing and only when this queue is ampty, ast_read
will be doing its regular job. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-23-07 11:55  dimas          Note Added: 0075872                          
======================================================================




More information about the asterisk-bugs mailing list