aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authoranthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-24 02:29:40 +0000
committeranthm <anthm@f38db490-d61c-443f-a65b-d21fe96a405b>2004-07-24 02:29:40 +0000
commitab644035af51b173570ed2fbd12bfd7604c8321c (patch)
treeaa956501aacd2cfbc275116b00c9d5050b6aa7b3 /res
parent6808bbc703619c0f5b016270953b292fc3ca21ed (diff)
added support to be able to set the channel var TRANSFER_CONTEXT so when
a #transfer is executed it uses ${TRANSFER_CONTEXT} from transferree else from transferer else it acts as always -anthm git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3499 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-xres/res_features.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/res/res_features.c b/res/res_features.c
index b55f1be5e..d03f7f394 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -303,13 +303,14 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
transferer = chan;
transferee = peer;
}
-
- /* Use the non-macro context to transfer the call */
- if(strlen(transferer->macrocontext))
- transferer_real_context=transferer->macrocontext;
- else
- transferer_real_context=transferer->context;
-
+ if(!(transferer_real_context=pbx_builtin_getvar_helper(transferee, "TRANSFER_CONTEXT")) &&
+ !(transferer_real_context=pbx_builtin_getvar_helper(transferer, "TRANSFER_CONTEXT"))) {
+ /* Use the non-macro context to transfer the call */
+ if(strlen(transferer->macrocontext))
+ transferer_real_context=transferer->macrocontext;
+ else
+ transferer_real_context=transferer->context;
+ }
/* Start autoservice on chan while we talk
to the originator */
ast_autoservice_start(transferee);