diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-22 07:18:02 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-22 07:18:02 +0000 |
commit | 238fbe0ad3136ff55766754e7d893095b175f5df (patch) | |
tree | 5ad8fc26128ef0f925a35bdc6bb46bb31b4d29a2 /apps/app_parkandannounce.c | |
parent | 00c1a3311e1a0def1ac849f42609846d542bb8f0 (diff) |
Bug 6148 - Add PARKEDAT variable; also cleaned up application help to fit 80-column screen.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8426 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_parkandannounce.c')
-rw-r--r-- | apps/app_parkandannounce.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index 91afdfe2b..b8481b23d 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -59,12 +59,21 @@ static char *synopsis = "Park and Announce"; static char *descrip = " ParkAndAnnounce(announce:template|timeout|dial|[return_context]):\n" -"Park a call into the parkinglot and announce the call over the console.\n" -"announce template: colon separated list of files to announce, the word PARKED\n" -" will be replaced by a say_digits of the ext the call is parked in\n" -"timeout: time in seconds before the call returns into the return context.\n" -"dial: The app_dial style resource to call to make the announcement. Console/dsp calls the console.\n" -"return_context: the goto style label to jump the call back into after timeout. default=prio+1\n"; +"Park a call into the parkinglot and announce the call to another channel.\n" +"\n" +"announce template: Colon-separated list of files to announce. The word PARKED\n" +" will be replaced by a say_digits of the extension in which\n" +" the call is parked.\n" +"timeout: Time in seconds before the call returns into the return\n" +" context.\n" +"dial: The app_dial style resource to call to make the\n" +" announcement. Console/dsp calls the console.\n" +"return_context: The goto-style label to jump the call back into after\n" +" timeout. Default <priority+1>.\n" +"\n" +"The variable ${PARKEDAT} will contain the parking extension into which the\n" +"call was placed. Use with the Local channel to allow the dialplan to make\n" +"use of this information.\n"; STANDARD_LOCAL_USER; @@ -79,6 +88,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) char *working, *context, *exten, *priority, *dial, *dialtech, *dialstr; char *template, *tpl_working, *tpl_current; char *tmp[100]; + char buf[13]; int looptemp=0,i=0; char *s,*orig_s; @@ -183,8 +193,10 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) /* Now place the call to the extention */ + snprintf(buf, sizeof(buf), "%d", lot); memset(&oh, 0, sizeof(oh)); oh.parent_channel = chan; + oh.vars = ast_variable_new("_PARKEDAT", buf); dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh); if(dchan) { |