[Home]

Summary:ASTERISK-11067: [branch] Allow disconnect feature before a call is bridged
Reporter:Maxim Sobolev (sobomax)Labels:
Date Opened:2007-12-17 14:29:52.000-0600Date Closed:2011-02-23 19:15:11.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 11583.latest-patch
( 1) 11583.newdiff
( 2) detect_disconnect.diff
( 3) enable-features-during-call-setup.diff
( 4) enable-features-during-call-setup-1.diff
( 5) patch-apps__app_dial.c
( 6) patch-include__asterisk__features.h
( 7) patch-res__res_features.c
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.
Comments:By: Maxim Sobolev (sobomax) 2008-02-11 18:27:24.000-0600

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

By: jmls (jmls) 2008-05-03 14:28:37

devs - any comments on this patch ?

By: Leif Madsen (lmadsen) 2008-09-11 11:30:56

/ping again to the developers.

By: Leif Madsen (lmadsen) 2008-10-22 10:45:49

Assigning to murf since I said I would start assigning some odd issues to him to see if we can move them forward. Please unassign or reassign as appropriate. Perhaps Corydon76 would be a good person to comment on this?

By: Steve Murphy (murf) 2008-12-01 20:52:26.000-0600

OK, I've been looking this over.

I notice that you push the setting of dynamic_features
from the feature_interpret func down to the feature_detect
func; but, in so doing, you turn this:

if (sense == FEATURE_SENSE_CHAN) {
ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES");
} else {
ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL);
dynamic_features = pbx_builtin_getvar_helper(peer, "DYNAMIC_FEATURES");
}

into just looking for DYNAMIC_FEATURES on chan alone.
I haven't checked into the history of the above lines,
but my guess is that they were added for the cases where
the chan/peer reverse roles.

What would you advise to bring to this code up to date?

By: Steve Murphy (murf) 2008-12-01 23:19:30.000-0600

Sorry, I got overzealous and corrected the patch myself.
See the 11583.newdiff file. Let me know if it is OK with you,
or you can attach something more to your liking.

By: Steve Murphy (murf) 2008-12-01 23:20:12.000-0600

Oh, and this patch is aimed at trunk, BTW...

By: Steve Murphy (murf) 2008-12-31 17:29:54.000-0600

Hello! I'm changing this from feedback to
ready-for-testing; mainly to see if I can
get the submitters (sobomax) attention...



By: Leif Madsen (lmadsen) 2009-01-14 17:33:55.000-0600

Any ability for you to test this functionality? Thanks!

By: Maxim Sobolev (sobomax) 2009-01-16 02:50:27.000-0600

Hi,

I've updated the patch to the latest trunk, tested it and attaching it now. Please let me know if you have any questions.

Thanks!

-Maxim

By: Steve Murphy (murf) 2009-01-23 12:20:06.000-0600

sobomax--

I've downloaded the patch, and I'll review it (again) when I get a chance-- hopefully soon. In the meantime, could you tell me what your patch is changing? How it's different from the one I suggested? I'll most like see it when I do the review, but this kind of info will speed me up!

By: Maxim Sobolev (sobomax) 2009-01-27 13:25:31.000-0600

> I've downloaded the patch, and I'll review it (again) when I get a chance-- hopefully soon. In the meantime, could you tell me what your patch is changing? How it's different from the one I suggested? I'll most like see it when I do the review, but this kind of info will speed me up!

This is just update of the patch to match the latest code from trunk. There are no functionality changes.

-Maxim

By: Steve Murphy (murf) 2009-01-29 09:33:50.000-0600

I've uploaded yet another patch; merging the last one was somewhat challenging. I tested the result, and seems to work. I added a little text to CHANGES. Is it just the disconnect that works now in Dial? What other features would make sense? There's been a lot of work going on in trunk, it seems!

I need to make sure this doesn't clash with work on bridge config and features that is ongoing.

By: Digium Subversion (svnbot) 2009-02-02 11:36:14.000-0600

Repository: asterisk
Revision: 172890

U   trunk/CHANGES
U   trunk/apps/app_dial.c
U   trunk/include/asterisk/features.h
U   trunk/main/features.c

------------------------------------------------------------------------
r172890 | murf | 2009-02-02 11:36:13 -0600 (Mon, 02 Feb 2009) | 41 lines

This change allows the disconnect feature (as in "one-touch" in features.c)
to be used within the dial app, before a call is bridged.

Many thanks to sobomax for submitting this patch.

Quoting from bug 11582:

 "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 is not well suited
  for 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. 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 don'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."

I have cleaned up the patch somewhat, and verified that the existing functionality is not
harmed, and that the new functionality works. Terry has committed his stuff, and there were
no conflicts (see 14274).

(closes issue ASTERISK-11067)
Reported by: sobomax
Patches:
     patch-apps__app_dial.c uploaded by sobomax (license 359)
     patch-include__asterisk__features.h uploaded by sobomax (license 359)
     patch-res__res_features.c uploaded by sobomax (license 359)
     enable-features-during-call-setup.diff uploaded by sobomax (license 359)
     11583.newdiff uploaded by murf (license 17)
     enable-features-during-call-setup-1.diff uploaded by sobomax (license 359)
     11583.latest-patch uploaded by murf (license 17)
Tested by: sobomax, murf



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

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

By: Digium Subversion (svnbot) 2009-02-02 11:39:00.000-0600

Repository: asterisk
Revision: 172892

_U  branches/1.6.0/

------------------------------------------------------------------------
r172892 | murf | 2009-02-02 11:39:00 -0600 (Mon, 02 Feb 2009) | 45 lines

Blocked revisions 172890 via svnmerge

........
 r172890 | murf | 2009-02-02 10:37:15 -0700 (Mon, 02 Feb 2009) | 41 lines
 
 This change allows the disconnect feature (as in "one-touch" in features.c)
 to be used within the dial app, before a call is bridged.
 
 Many thanks to sobomax for submitting this patch.
 
 Quoting from bug 11582:
 
   "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 is not well suited
    for 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. 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 don'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."
 
 I have cleaned up the patch somewhat, and verified that the existing functionality is not
 harmed, and that the new functionality works. Terry has committed his stuff, and there were
 no conflicts (see 14274).
 
 (closes issue ASTERISK-11067)
 Reported by: sobomax
 Patches:
       patch-apps__app_dial.c uploaded by sobomax (license 359)
       patch-include__asterisk__features.h uploaded by sobomax (license 359)
       patch-res__res_features.c uploaded by sobomax (license 359)
       enable-features-during-call-setup.diff uploaded by sobomax (license 359)
       11583.newdiff uploaded by murf (license 17)
       enable-features-during-call-setup-1.diff uploaded by sobomax (license 359)
       11583.latest-patch uploaded by murf (license 17)
 Tested by: sobomax, murf
........

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

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

By: Digium Subversion (svnbot) 2009-02-02 11:40:37.000-0600

Repository: asterisk
Revision: 172893

_U  branches/1.6.1/

------------------------------------------------------------------------
r172893 | murf | 2009-02-02 11:40:37 -0600 (Mon, 02 Feb 2009) | 45 lines

Blocked revisions 172890 via svnmerge

........
 r172890 | murf | 2009-02-02 10:37:15 -0700 (Mon, 02 Feb 2009) | 41 lines
 
 This change allows the disconnect feature (as in "one-touch" in features.c)
 to be used within the dial app, before a call is bridged.
 
 Many thanks to sobomax for submitting this patch.
 
 Quoting from bug 11582:
 
   "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 is not well suited
    for 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. 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 don'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."
 
 I have cleaned up the patch somewhat, and verified that the existing functionality is not
 harmed, and that the new functionality works. Terry has committed his stuff, and there were
 no conflicts (see 14274).
 
 (closes issue ASTERISK-11067)
 Reported by: sobomax
 Patches:
       patch-apps__app_dial.c uploaded by sobomax (license 359)
       patch-include__asterisk__features.h uploaded by sobomax (license 359)
       patch-res__res_features.c uploaded by sobomax (license 359)
       enable-features-during-call-setup.diff uploaded by sobomax (license 359)
       11583.newdiff uploaded by murf (license 17)
       enable-features-during-call-setup-1.diff uploaded by sobomax (license 359)
       11583.latest-patch uploaded by murf (license 17)
 Tested by: sobomax, murf
........

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

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

By: Steve Murphy (murf) 2009-02-17 18:42:53.000-0600

OK, I'm reopening this. I reverted the changes because Russell had some issues with the patch. To add insult to injury, I got the bug number wrong and re-opened the wrong bug. (Sorry, SeanBright). I promised Russell that I'd look at the issues, and when they were solved, post the patch to reviewboard before committing again. Since it's an enhancement, it's taking a low priority at the moment.

By: Steve Murphy (murf) 2009-02-19 13:25:14.000-0600

I (murf) have created a branch for reviewboard purposes, based on trunk,
see http://svn.digium.com/svn/asterisk/team/murf/11583-disconB4bridge

By: Digium Subversion (svnbot) 2009-03-19 11:15:18

Repository: asterisk
Revision: 183126

U   branches/1.4/apps/app_dial.c
U   branches/1.4/include/asterisk/features.h
U   branches/1.4/res/res_features.c
U   branches/1.4/res/res_features.exports

------------------------------------------------------------------------
r183126 | dvossel | 2009-03-19 11:15:17 -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 ASTERISK-11067)
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=183126

By: Digium Subversion (svnbot) 2009-03-19 11:28:35

Repository: asterisk
Revision: 183172

_U  trunk/
U   trunk/apps/app_dial.c
U   trunk/include/asterisk/features.h
U   trunk/main/features.c

------------------------------------------------------------------------
r183172 | dvossel | 2009-03-19 11:28:34 -0500 (Thu, 19 Mar 2009) | 20 lines

Merged revisions 183126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 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 ASTERISK-11067)
 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=183172

By: Digium Subversion (svnbot) 2009-03-19 12:08:24

Repository: asterisk
Revision: 183198

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

------------------------------------------------------------------------
r183198 | dvossel | 2009-03-19 12:08:24 -0500 (Thu, 19 Mar 2009) | 27 lines

Merged revisions 183172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r183172 | dvossel | 2009-03-19 11:28:33 -0500 (Thu, 19 Mar 2009) | 20 lines
 
 Merged revisions 183126 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   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 ASTERISK-11067)
   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=183198

By: Digium Subversion (svnbot) 2009-03-19 12:10:10

Repository: asterisk
Revision: 183199

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

------------------------------------------------------------------------
r183199 | dvossel | 2009-03-19 12:10:10 -0500 (Thu, 19 Mar 2009) | 27 lines

Merged revisions 183172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r183172 | dvossel | 2009-03-19 11:28:33 -0500 (Thu, 19 Mar 2009) | 20 lines
 
 Merged revisions 183126 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   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 ASTERISK-11067)
   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=183199

By: Digium Subversion (svnbot) 2009-03-19 14:40:08

Repository: asterisk
Revision: 183386

U   branches/1.4/apps/app_dial.c
U   branches/1.4/include/asterisk/features.h
U   branches/1.4/res/res_features.c

------------------------------------------------------------------------
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 ASTERISK-11067

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

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

By: Digium Subversion (svnbot) 2009-03-19 15:30:40

Repository: asterisk
Revision: 183436

_U  trunk/
U   trunk/apps/app_dial.c
U   trunk/include/asterisk/features.h
U   trunk/main/features.c

------------------------------------------------------------------------
r183436 | dvossel | 2009-03-19 15:30:40 -0500 (Thu, 19 Mar 2009) | 13 lines

Merged revisions 183386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 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 ASTERISK-11067
........

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

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

By: Digium Subversion (svnbot) 2009-03-19 15:32:21

Repository: asterisk
Revision: 183437

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

------------------------------------------------------------------------
r183437 | dvossel | 2009-03-19 15:32:21 -0500 (Thu, 19 Mar 2009) | 20 lines

Merged revisions 183436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r183436 | dvossel | 2009-03-19 15:30:39 -0500 (Thu, 19 Mar 2009) | 13 lines
 
 Merged revisions 183386 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   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 ASTERISK-11067
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-03-19 15:33:20

Repository: asterisk
Revision: 183438

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

------------------------------------------------------------------------
r183438 | dvossel | 2009-03-19 15:33:20 -0500 (Thu, 19 Mar 2009) | 20 lines

Merged revisions 183436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r183436 | dvossel | 2009-03-19 15:30:39 -0500 (Thu, 19 Mar 2009) | 13 lines
 
 Merged revisions 183386 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   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 ASTERISK-11067
 ........
................

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

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

By: Digium Subversion (svnbot) 2011-02-23 19:15:10.000-0600

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 ASTERISK-11067

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 ASTERISK-11067
........
........
 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 ASTERISK-11067)
 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