From c3ded332b56274b3eb94d18e0a92ceb9a62f7032 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Sun, 22 Jan 2006 07:18:02 +0000 Subject: Bug 6148 - Add PARKEDAT variable; also cleaned up application help to fit 80-column screen. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8426 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_parkandannounce.c | 24 ++++++++++++++++++------ doc/README.variables | 1 + 2 files changed, 19 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 .\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) { diff --git a/doc/README.variables b/doc/README.variables index b98ed4fbf..b0348b072 100644 --- a/doc/README.variables +++ b/doc/README.variables @@ -614,6 +614,7 @@ ${LOOKUPBLSTATUS} * lookupblacklist() ${OSPLOOKUPSTATUS} * osplookup() ${OSPNEXTSTATUS} * ospnext() ${OSPFINISHSTATUS} * ospfinish() +${PARKEDAT} * parkandannounce() ${PLAYBACKSTATUS} * playback() ${PQMSTATUS} * pausequeuemember() ${PRIVACYMGRSTATUS} * privacymanager() -- cgit v1.2.3