aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-29 18:04:52 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-29 18:04:52 +0000
commit0241d38627217e9ebdcc07bb0c9ccfdce6eafa7f (patch)
tree93d5216ca92828b1336bde6fd40f69ccf183c4ae /apps/app_queue.c
parent217a9f18497c30df23dbd47a262f8cc18d8b6278 (diff)
Update app_queue to deal with the removal of AST_PBX_KEEPALIVE
When placing a call to a queue which ran a gosub on the member's channel, Asterisk would crash every time, stemming from the fact that the member's channel was being hung up unexpectedly when the Gosub completed. The necessary change was pretty much copied and pasted from app_dial's similar changes made last week. I also took the opportunity to change a LOG_DEBUG message in app_dial to use ast_debug. I am guessing this was due to a direct merge from 1.4 that was not corrected to use trunk's preferred syntax. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@166861 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1d86d3df6..75915cdb3 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4014,9 +4014,12 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
if (gosub_args) {
res = pbx_exec(peer, application, gosub_args);
if (!res) {
- ast_pbx_run(peer);
+ struct ast_pbx_args args;
+ memset(&args, 0, sizeof(args));
+ args.no_hangup_chan = 1;
+ ast_pbx_run_args(peer, &args);
}
- free(gosub_args);
+ ast_free(gosub_args);
ast_debug(1, "Gosub exited with status %d\n", res);
} else {
ast_log(LOG_ERROR, "Could not Allocate string for Gosub arguments -- Gosub Call Aborted!\n");
@@ -6693,7 +6696,7 @@ static int load_module(void)
if (!con)
ast_log(LOG_ERROR, "Queue virtual context 'app_queue_gosub_virtual_context' does not exist and unable to create\n");
else
- ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_queue");
+ ast_add_extension2(con, 1, "s", 1, NULL, NULL, "NoOp", ast_strdup(""), ast_free_ptr, "app_queue");
if (queue_persistent_members)
reload_queue_members();