aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-04 19:30:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-05-04 19:30:34 +0000
commit185024f0f995728d7f18d489c5e8cff16d605e81 (patch)
treeaedf78cd4dcf4e166649b65dfb9d0d9a6d06cf7f /res/res_agi.c
parentafd79973ae1fedd5ad132ba221e29e76fb32f336 (diff)
Recorded merge of revisions 192171 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r192171 | tilghman | 2009-05-04 14:29:13 -0500 (Mon, 04 May 2009) | 8 lines Restore 'asyncagi break' command to 1.6.1 and higher. (closes issue #14985) Reported by: nikkk Patches: 20090428__bug14985.diff.txt uploaded by tilghman (license 14) 20090429__bug14985__1.6.1.diff.txt uploaded by tilghman (license 14) Tested by: nikkk ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@192172 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 977dbd6d7..0631694b3 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -774,6 +774,12 @@ static int handle_answer(struct ast_channel *chan, AGI *agi, int argc, char *arg
return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE;
}
+static int handle_asyncagi_break(struct ast_channel *chan, AGI *agi, int argc, char *argv[])
+{
+ ast_agi_send(agi->fd, chan, "200 result=0\n");
+ return RESULT_FAILURE;
+}
+
static int handle_waitfordigit(struct ast_channel *chan, AGI *agi, int argc, char *argv[])
{
int res, to;
@@ -2287,11 +2293,16 @@ static char usage_speechrecognize[] =
" Usage: SPEECH RECOGNIZE <prompt> <timeout> [<offset>]\n"
" Plays back given prompt while listening for speech and dtmf.\n";
+static char usage_asyncagi_break[] =
+" Usage: ASYNCAGI BREAK\n"
+" Returns control to the dialplan\n";
+
/*!
* \brief AGI commands list
*/
static struct agi_command commands[] = {
{ { "answer", NULL }, handle_answer, "Answer channel", usage_answer , 0 },
+ { { "asyncagi", "break", NULL }, handle_asyncagi_break, "Exit AsyncAGI processing", usage_asyncagi_break, 1 },
{ { "channel", "status", NULL }, handle_channelstatus, "Returns status of the connected channel", usage_channelstatus , 0 },
{ { "database", "del", NULL }, handle_dbdel, "Removes database key/value", usage_dbdel , 1 },
{ { "database", "deltree", NULL }, handle_dbdeltree, "Removes database keytree/value", usage_dbdeltree , 1 },