Make DTMF attended transfer support feature-complete.

This greatly modifies the operation of DTMF attended transfers so that
the full range of options from features.conf applies.

In addition, a new option has been added that allows for a transferer
to switch between bridges during a transfer before completing the
transfer.

(closes issue ASTERISK-21543)
reported by Matt Jordan

Review: https://reviewboard.asterisk.org/r/2654



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2013-07-23 15:28:11 +00:00
parent e148c6e867
commit bf22391b8d
14 changed files with 2896 additions and 497 deletions

View File

@@ -3212,37 +3212,37 @@ static int setup_bridge_features_builtin(struct ast_bridge_features *features, s
if (!builtin_feature_get_exten(chan, "blindxfer", dtmf, sizeof(dtmf))
&& !ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_BLINDTRANSFER, dtmf,
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL | AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE);
}
if (!builtin_feature_get_exten(chan, "atxfer", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_ATTENDEDTRANSFER, dtmf,
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL | AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE);
}
}
if (ast_test_flag(flags, AST_FEATURE_DISCONNECT) &&
!builtin_feature_get_exten(chan, "disconnect", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_HANGUP, dtmf,
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL | AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE);
}
if (ast_test_flag(flags, AST_FEATURE_PARKCALL) &&
!builtin_feature_get_exten(chan, "parkcall", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_PARKCALL, dtmf,
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL | AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE);
}
if (ast_test_flag(flags, AST_FEATURE_AUTOMON) &&
!builtin_feature_get_exten(chan, "automon", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMON, dtmf,
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL | AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE);
}
if (ast_test_flag(flags, AST_FEATURE_AUTOMIXMON) &&
!builtin_feature_get_exten(chan, "automixmon", dtmf, sizeof(dtmf)) &&
!ast_strlen_zero(dtmf)) {
res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMIXMON, dtmf,
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL | AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE);
}
return res ? -1 : 0;