|
|
|
@ -599,7 +599,9 @@ static int handle_gosub(struct ast_channel *chan, AGI *agi, int argc, char **arg
|
|
|
|
|
|
|
|
|
|
if ((res = pbx_exec(chan, theapp, gosub_args)) == 0) {
|
|
|
|
|
struct ast_pbx *pbx = chan->pbx;
|
|
|
|
|
struct ast_pbx_args args = { .no_hangup_chan = 1 };
|
|
|
|
|
struct ast_pbx_args args;
|
|
|
|
|
memset(&args, 0, sizeof(args));
|
|
|
|
|
args.no_hangup_chan = 1;
|
|
|
|
|
/* Suppress warning about PBX already existing */
|
|
|
|
|
chan->pbx = NULL;
|
|
|
|
|
ast_agi_send(agi->fd, chan, "100 result=0 Trying...\n");
|
|
|
|
@ -636,8 +638,6 @@ struct agi_command gosub_agi_command =
|
|
|
|
|
|
|
|
|
|
static int unload_module(void)
|
|
|
|
|
{
|
|
|
|
|
struct ast_context *con;
|
|
|
|
|
|
|
|
|
|
if (ast_agi_unregister) {
|
|
|
|
|
ast_agi_unregister(ast_module_info->self, &gosub_agi_command);
|
|
|
|
|
}
|
|
|
|
@ -654,8 +654,6 @@ static int unload_module(void)
|
|
|
|
|
|
|
|
|
|
static int load_module(void)
|
|
|
|
|
{
|
|
|
|
|
struct ast_context *con;
|
|
|
|
|
|
|
|
|
|
if (ast_agi_register) {
|
|
|
|
|
ast_agi_register(ast_module_info->self, &gosub_agi_command);
|
|
|
|
|
}
|
|
|
|
|