# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/09/27 23:38:44-07:00 root@host-a.ph.star # app_dial.c: # move group setting to dial-time instead of answer-time # # apps/app_dial.c # 2004/09/27 23:38:41-07:00 root@host-a.ph.star +3 -4 # move group setting to dial-time instead of answer-time # # ChangeSet # 2004/09/27 23:35:06-07:00 root@host-a.ph.star # config: # set default checkout mode # # BitKeeper/etc/config # 2004/09/27 23:35:04-07:00 root@host-a.ph.star +2 -0 # set default checkout mode # # ChangeSet # 2004/09/27 22:06:24-07:00 root@host-a.ph.star # app_dial.c: # Import patch 26.patch # # apps/app_dial.c # 2004/09/27 22:04:54-07:00 root@host-a.ph.star +3 -2 # Import patch 26.patch # # ChangeSet # 2004/09/27 22:06:20-07:00 root@host-a.ph.star # app_dial.c: # Import patch 25.patch # # apps/app_dial.c # 2004/09/27 22:04:49-07:00 root@host-a.ph.star +1 -1 # Import patch 25.patch # # ChangeSet # 2004/09/27 22:06:17-07:00 root@host-a.ph.star # app_dial.c: # Import patch 24.patch # # apps/app_dial.c # 2004/09/27 22:04:46-07:00 root@host-a.ph.star +1 -1 # Import patch 24.patch # # ChangeSet # 2004/09/27 22:06:13-07:00 root@host-a.ph.star # app_dial.c: # Import patch 23.patch # # apps/app_dial.c # 2004/09/27 22:04:42-07:00 root@host-a.ph.star +1 -1 # Import patch 23.patch # # ChangeSet # 2004/09/27 22:06:10-07:00 root@host-a.ph.star # app_dial.c: # Import patch 22.patch # # apps/app_dial.c # 2004/09/27 22:04:36-07:00 root@host-a.ph.star +1 -1 # Import patch 22.patch # # ChangeSet # 2004/09/27 22:06:07-07:00 root@host-a.ph.star # app_dial.c: # Import patch 21.patch # # apps/app_dial.c # 2004/09/27 22:04:32-07:00 root@host-a.ph.star +11 -1 # Import patch 21.patch # diff -Nru a/apps/app_dial.c b/apps/app_dial.c --- a/apps/app_dial.c 2004-09-27 23:51:09 -07:00 +++ b/apps/app_dial.c 2004-09-27 23:51:09 -07:00 @@ -43,7 +43,7 @@ static char *synopsis = "Place a call and connect to the current channel"; static char *descrip = -" Dial(Technology/resource[&Technology2/resource2...][|timeout][|options][|URL]):\n" +" Dial(Technology/resource[&Technology2/resource2...][|timeout][|options][|URL][|group]):\n" "Requests one or more channels and places specified outgoing calls on them.\n" "As soon as a channel answers, the Dial app will answer the originating\n" "channel (if it needs to be answered) and will bridge a call with the channel\n" @@ -92,6 +92,7 @@ " 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" +" The optional group will be assigned to the created channel (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" @@ -431,6 +432,7 @@ char *newnum; char callerid[256] = "", *l, *n; char *url=NULL; /* JDG */ + char *group=NULL; struct ast_var_t *current; struct varshead *headp, *newheadp; struct ast_var_t *newvar; @@ -486,6 +488,11 @@ *url = '\0'; url++; ast_log(LOG_DEBUG, "DIAL WITH URL=%s_\n", url); + group = strchr(url, '|'); + if (group) { + *group = '\0'; + group++; + } } else ast_log(LOG_DEBUG, "SIMPLE DIAL (NO URL)\n"); /* /JDG */ @@ -823,6 +830,9 @@ tmp->chan->adsicpe = chan->adsicpe; /* pass the digital flag */ ast_dup_flag(tmp->chan, chan, AST_FLAG_DIGITAL); + /* set the channel's group, if requested */ + if (group && !ast_strlen_zero(group)) + ast_app_group_set_channel(tmp->chan, group); /* Place the call, but don't wait on the answer */ res = ast_call(tmp->chan, numsubst, 0);