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:
Tilghman Lesher
2008-05-30 16:10:46 +00:00
parent 87c9b6fc25
commit c7191467d2
4 changed files with 114 additions and 6 deletions

View File

@@ -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) {