aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-13 19:18:46 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-13 19:18:46 +0000
commit1f8b94d73d52c9e90e15d10a75480fc084ad9d25 (patch)
tree0229ec624211faa550d0c4bff6b4fca6bca98f5e /apps
parent3ef46b6a1cc4d2a468834ba2b36181306928eff7 (diff)
Merged revisions 61656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r61656 | file | 2007-04-13 15:17:08 -0400 (Fri, 13 Apr 2007) | 10 lines Merged revisions 61655 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61655 | file | 2007-04-13 15:15:12 -0400 (Fri, 13 Apr 2007) | 2 lines Add OUTBOUND_GROUP_ONCE variable to app_dial. This behaves the same as OUTBOUND_GROUP except it will get unset after use so it won't get accidentally inherited. (issue #BE-140) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61657 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index e8cea999e..b2160791a 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -92,7 +92,10 @@ static char *descrip =
"ends the call.\n"
" The optional URL will be sent to the called party if the channel supports it.\n"
" If the OUTBOUND_GROUP variable is set, all peer channels created by this\n"
-"application will be put into that group (as in Set(GROUP()=...).\n\n"
+"application will be put into that group (as in Set(GROUP()=...).\n"
+" If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this\n"
+"application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,\n"
+"however, the variable will be unset after use.\n\n"
" Options:\n"
" A(x) - Play an announcement to the called party, using 'x' as the file.\n"
" C - Reset the CDR for this call.\n"
@@ -1274,10 +1277,15 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (continue_exec)
*continue_exec = 0;
-
+
/* If a channel group has been specified, get it for use when we create peer channels */
- outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
-
+ if ((outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP_ONCE"))) {
+ outbound_group = ast_strdupa(outbound_group);
+ pbx_builtin_setvar_helper(chan, "OUTBOUND_GROUP_ONCE", NULL);
+ } else {
+ outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
+ }
+
ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING);
/* loop through the list of dial destinations */
rest = args.peers;