[asterisk-bugs] [Asterisk 0011583]: [patch] Allow disconnect feature before a call is bridged

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Feb 11 18:27:24 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11583 
====================================================================== 
Reported By:                sobomax
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11583
Category:                   Resources/res_features
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.15  
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-17-2007 14:29 CST
Last Modified:              02-11-2008 18:27 CST
====================================================================== 
Summary:                    [patch] Allow disconnect feature before a call is
bridged
Description: 
Asterisk has module called res_features.so which purpose is to detect user
configurable keypress sequences and fire up an appropriate actions. One of
the actions is a disconnect action that allows to terminate the call leg.
However the res_features main procedure is called within ast_bridge_call()
only and the ast_bridge_call() is executed only when call has been
successfully established.

The result of this issue is that for example if we re-define disconnect
action to be ## instead of default **, it doesn't work when the call has
not been asnwered yet.

But there is a situation when call has been initiated but has not answered
yet. This case is not served by the res_features and the call can be
interrupted with '*'-keypress and this default cannot be changed.

So the goal of the patch was to use the user configured feature code
during the call setup phase. The original ast_feature_interpret() function
does not well suit this purpose as it uses much call bridge specific data
and doesn't separate a detection of feature from a feature handler call. So
a new function ast_feature_detect() has been extracted off the
ast_feature_interpret() function but keeping the original logic intact
except some insignificant changes to locking.

Having created the ast_feature_detect() function the possibility to use
feature detection in almost any place of the asterisk code has been
appeared. So a call to this function has been added to wait_for_answer()
function of app_dial.so module. This code doesn't call the feature handler
however and uses old call leg disconnect logic to make the changes as small
and simple as possible to prevent unexpected problems. A disconnect feature
currently is the only one supported during call setup as other features as
call parking and call transfer doesn't make much sense during call setup.
However if need in some of the features would arise it is much easier to
implement as the infrastructure changes are already in place with this
patch.

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

---------------------------------------------------------------------- 
 sobomax - 02-11-08 18:27  
---------------------------------------------------------------------- 
Please note - updated patch has been submitted
(enable-features-during-call-setup.diff). It fixes one issue and also now
should apply to the 10 February 2008 trunk.

-Maxim 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-11-08 18:27  sobomax        Note Added: 0082059                          
======================================================================




More information about the asterisk-bugs mailing list