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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 23 19:15:11 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=11583 
====================================================================== 
Reported By:                sobomax
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   11583
Category:                   Applications/app_dial
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Target Version:             1.6.2.0
Asterisk Version:           1.6.1-beta1 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2007-12-17 14:29 CST
Last Modified:              2011-02-23 19:15 CST
====================================================================== 
Summary:                    [branch] 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.

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013315 Dial h option not operating as defined ...
related to          0017280 [patch] Allow disconnect feature before...
====================================================================== 

---------------------------------------------------------------------- 
 (0132329) svnbot (reporter) - 2011-02-23 19:15
 https://issues.asterisk.org/view.php?id=11583#c132329 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 308677

U   branches/1.6.2/apps/app_dial.c
U   branches/1.6.2/include/asterisk/features.h
U   branches/1.6.2/main/features.c

------------------------------------------------------------------------
r308677 | twilson | 2011-02-23 19:15:09 -0600 (Wed, 23 Feb 2011) | 31
lines

Merge missing bugfix for issue https://issues.asterisk.org/view.php?id=11583

This is the combination of two commits that made it into 1.4, 1.6.0,
1.6.1, and trunk (and therefor 1.8) but that was missed for 1.6.2.

........
  r183386 | dvossel | 2009-03-19 14:40:07 -0500 (Thu, 19 Mar 2009) | 6
lines
  
  Cleaning up a few things in detect disconnect patch
  
  Initialized ast_call_feature in detect_disconnect to avoid accessing
uninitialized memory.  Cleaned up /param tags in features.h.  No longer
send dynamic features in ast_feature_detect. 
  
  issue https://issues.asterisk.org/view.php?id=11583
........
........
  r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17
lines
  
  Allow disconnect feature before a call is bridged
  
  feature.conf has a disconnect option.  By default this option is set to
'*', but it could be anything.  If a user wishes to disconnect a call
before the other side answers, only '*' will work, regardless if the
disconnect option is set to something else.  This is because features are
unavailable until bridging takes place.  The default disconnect option,
'*', was hardcoded in app_dial, which doesn't make any sense from a user
perspective since they may expect it to be something different.  This patch
allows features to be detected from outside of the bridge, but not operated
on.  In this case, the disconnect feature can be detected before briding
and handled outside of features.c.
  
  (closes issue https://issues.asterisk.org/view.php?id=11583)
  Reported by: sobomax
  Patches:
  	patch-apps__app_dial.c uploaded by sobomax (license 359)
  	11583.latest-patch uploaded by murf (license 17)
  	detect_disconnect.diff uploaded by dvossel (license 671)
  Tested by: sobomax, dvossel
  Review: http://reviewboard.digium.com/r/195/
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-23 19:15 svnbot         Note Added: 0132329                          
======================================================================




More information about the asterisk-bugs mailing list