mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 15:11:12 +00:00
Make 'H' command do as advertised and add 'E' and 'V' commands to ExternalIVR. (issue #8165 reported by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -65,6 +65,7 @@ Changes since Asterisk 1.4-beta was branched:
|
|||||||
* Added the parkedcalltransfers option to features.conf
|
* Added the parkedcalltransfers option to features.conf
|
||||||
* Added 's' option to Page application.
|
* Added 's' option to Page application.
|
||||||
* Added the srvlookup option to iax.conf
|
* Added the srvlookup option to iax.conf
|
||||||
|
* Added 'E' and 'V' commands to ExternalIVR.
|
||||||
|
|
||||||
SIP changes
|
SIP changes
|
||||||
-----------
|
-----------
|
||||||
|
|||||||
@@ -487,9 +487,15 @@ static int app_exec(struct ast_channel *chan, void *data)
|
|||||||
AST_LIST_INSERT_TAIL(&u->playlist, entry, list);
|
AST_LIST_INSERT_TAIL(&u->playlist, entry, list);
|
||||||
AST_LIST_UNLOCK(&u->playlist);
|
AST_LIST_UNLOCK(&u->playlist);
|
||||||
}
|
}
|
||||||
|
} else if (input[0] == 'E') {
|
||||||
|
ast_chan_log(LOG_NOTICE, chan, "Exiting: %s\n", &input[2]);
|
||||||
|
send_child_event(child_events, 'E', NULL, chan);
|
||||||
|
res = 0;
|
||||||
|
break;
|
||||||
} else if (input[0] == 'H') {
|
} else if (input[0] == 'H') {
|
||||||
ast_chan_log(LOG_NOTICE, chan, "Hanging up: %s\n", &input[2]);
|
ast_chan_log(LOG_NOTICE, chan, "Hanging up: %s\n", &input[2]);
|
||||||
send_child_event(child_events, 'H', NULL, chan);
|
send_child_event(child_events, 'H', NULL, chan);
|
||||||
|
res = -1;
|
||||||
break;
|
break;
|
||||||
} else if (input[0] == 'O') {
|
} else if (input[0] == 'O') {
|
||||||
if (!strcasecmp(&input[2], "autoclear"))
|
if (!strcasecmp(&input[2], "autoclear"))
|
||||||
@@ -498,6 +504,15 @@ static int app_exec(struct ast_channel *chan, void *data)
|
|||||||
u->option_autoclear = 0;
|
u->option_autoclear = 0;
|
||||||
else
|
else
|
||||||
ast_chan_log(LOG_WARNING, chan, "Unknown option requested '%s'\n", &input[2]);
|
ast_chan_log(LOG_WARNING, chan, "Unknown option requested '%s'\n", &input[2]);
|
||||||
|
} else if (input[0] == 'V') {
|
||||||
|
char *c;
|
||||||
|
c = strchr(&input[2], '=');
|
||||||
|
if (!c) {
|
||||||
|
send_child_event(child_events, 'Z', NULL, chan);
|
||||||
|
} else {
|
||||||
|
*c++ = '\0';
|
||||||
|
pbx_builtin_setvar_helper(chan, &input[2], c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (ready_fd == child_errors_fd) {
|
} else if (ready_fd == child_errors_fd) {
|
||||||
char input[1024];
|
char input[1024];
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ A-D: DTMF event for keys A through D
|
|||||||
*: DTMF event for key *
|
*: DTMF event for key *
|
||||||
#: DTMF event for key #
|
#: DTMF event for key #
|
||||||
H: the channel was hung up by the connected party
|
H: the channel was hung up by the connected party
|
||||||
|
E: the script requested an exit
|
||||||
Z: the previous command was unable to be executed (file does not
|
Z: the previous command was unable to be executed (file does not
|
||||||
exist, etc.)
|
exist, etc.)
|
||||||
T: the play list was interrupted (see below)
|
T: the play list was interrupted (see below)
|
||||||
@@ -76,7 +77,9 @@ The child process can send commands on stdout in the following formats:
|
|||||||
S,filename
|
S,filename
|
||||||
A,filename
|
A,filename
|
||||||
H,message
|
H,message
|
||||||
|
E,message
|
||||||
O,option
|
O,option
|
||||||
|
V,name=value
|
||||||
|
|
||||||
The 'S' command checks to see if there is a playable audio file with
|
The 'S' command checks to see if there is a playable audio file with
|
||||||
the specified name, and if so, clear's the generator's playlist and
|
the specified name, and if so, clear's the generator's playlist and
|
||||||
@@ -93,6 +96,9 @@ the specified name, and if so, adds it to the generator's
|
|||||||
playlist. The same playability and exception rules apply as for the
|
playlist. The same playability and exception rules apply as for the
|
||||||
'S' command.
|
'S' command.
|
||||||
|
|
||||||
|
The 'E' command stops the generator and continues execution in the dialplan,
|
||||||
|
and logs the supplied message to the Asterisk log.
|
||||||
|
|
||||||
The 'H' command stops the generator and hangs up the channel, and logs
|
The 'H' command stops the generator and hangs up the channel, and logs
|
||||||
the supplied message to the Asterisk log.
|
the supplied message to the Asterisk log.
|
||||||
|
|
||||||
@@ -102,6 +108,8 @@ ExternalIVR() application. The supported options are:
|
|||||||
Automatically interrupt and clear the playlist upon reception
|
Automatically interrupt and clear the playlist upon reception
|
||||||
of DTMF input.
|
of DTMF input.
|
||||||
|
|
||||||
|
The 'V' command sets the specified channel variable to the specified value.
|
||||||
|
|
||||||
Errors
|
Errors
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user