aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 39371400c..7f538d8f8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3982,7 +3982,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
gosub_args = NULL;
}
- *gosub_argstart = '|';
+ *gosub_argstart = ',';
} else {
if (asprintf(&gosub_args, "%s,s,1", gosubexec) < 0) {
ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno));
@@ -3991,13 +3991,14 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
}
if (gosub_args) {
res = pbx_exec(peer, application, gosub_args);
- ast_pbx_run(peer);
+ if (!res) {
+ ast_pbx_run(peer);
+ }
free(gosub_args);
ast_debug(1, "Gosub exited with status %d\n", res);
- } else
+ } else {
ast_log(LOG_ERROR, "Could not Allocate string for Gosub arguments -- Gosub Call Aborted!\n");
-
- res = 0;
+ }
} else {
ast_log(LOG_ERROR, "Could not find application Gosub\n");
res = -1;