aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-07 21:49:43 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-07 21:49:43 +0000
commite1ba7a4117a723ef0543a2b44e8b532c044ebb09 (patch)
treeffe97aa09e71a9de959f0162dfce01186a22a8ea /apps
parent1c77ca6ca2492b08f4902b9c0054ba1424b6412d (diff)
Add OUTBOUND_GROUP support (bug #2530)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4175 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index e71a616b3..d5b7ca471 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -93,6 +93,8 @@ static char *descrip =
" In addition to transferring the call, a call may be parked and then picked\n"
"up by another user.\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 SetGroup).\n"
" This application sets the following channel variables upon completion:\n"
" DIALEDTIME Time from dial to answer\n"
" ANSWEREDTIME Time for actual call\n"
@@ -485,6 +487,7 @@ static int dial_exec(struct ast_channel *chan, void *data)
int playargs=0, sentringing=0, moh=0;
char *varname;
int vartype;
+ char *outbound_group = NULL;
int digit = 0;
time_t start_time, answer_time, end_time;
@@ -707,6 +710,10 @@ static int dial_exec(struct ast_channel *chan, void *data)
l = "";
ast_log(LOG_NOTICE, "Privacy DB is '%s', privacy is %d, clid is '%s'\n", privdb, privacy, l);
}
+
+ /* 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");
+
cur = peers;
do {
/* Remember where to start next time */
@@ -873,6 +880,11 @@ static int dial_exec(struct ast_channel *chan, void *data)
tmp->chan->adsicpe = chan->adsicpe;
/* pass the digital flag */
ast_dup_flag(tmp->chan, chan, AST_FLAG_DIGITAL);
+
+ /* If we have an outbound group, set this peer channel to it */
+ if (outbound_group)
+ ast_app_group_set_channel(tmp->chan, outbound_group);
+
/* Place the call, but don't wait on the answer */
res = ast_call(tmp->chan, numsubst, 0);