mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
Add native AGI command GOSUB, as invoking Gosub with EXEC does not work
properly. (closes issue #12760) Reported by: Corydon76 Patches: 20080530__bug12760.diff.txt uploaded by Corydon76 (license 14) Tested by: tim_ringenbach, Corydon76 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1776,13 +1776,13 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
|
||||
ast_copy_string(peer->exten, "s", sizeof(peer->exten));
|
||||
peer->priority = 0;
|
||||
|
||||
gosub_argstart = strchr(opt_args[OPT_ARG_CALLEE_GOSUB], '|');
|
||||
gosub_argstart = strchr(opt_args[OPT_ARG_CALLEE_GOSUB], ',');
|
||||
if (gosub_argstart) {
|
||||
*gosub_argstart = 0;
|
||||
asprintf(&gosub_args, "%s|s|1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], gosub_argstart + 1);
|
||||
*gosub_argstart = '|';
|
||||
asprintf(&gosub_args, "%s,s,1(%s)", opt_args[OPT_ARG_CALLEE_GOSUB], gosub_argstart + 1);
|
||||
*gosub_argstart = ',';
|
||||
} else {
|
||||
asprintf(&gosub_args, "%s|s|1", opt_args[OPT_ARG_CALLEE_GOSUB]);
|
||||
asprintf(&gosub_args, "%s,s,1", opt_args[OPT_ARG_CALLEE_GOSUB]);
|
||||
}
|
||||
|
||||
if (gosub_args) {
|
||||
|
||||
Reference in New Issue
Block a user