mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 22:58:21 +00:00
When investigating issue #13548, I found that gosub
handling in app_queue was just completely wrong, mostly because the channel operations being performed were being done on the incorrect channel. With this set of changes, a gosub will correctly run on the answering queue member's channel. There are still crash issues which occur if there are dialplan syntax errors, so I cannot yet close the referenced issue. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3971,9 +3971,9 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
char *gosub_args, *gosub_argstart;
|
char *gosub_args, *gosub_argstart;
|
||||||
|
|
||||||
/* Set where we came from */
|
/* Set where we came from */
|
||||||
ast_copy_string(qe->chan->context, "app_dial_gosub_virtual_context", sizeof(qe->chan->context));
|
ast_copy_string(peer->context, "app_queue_gosub_virtual_context", sizeof(peer->context));
|
||||||
ast_copy_string(qe->chan->exten, "s", sizeof(qe->chan->exten));
|
ast_copy_string(peer->exten, "s", sizeof(peer->exten));
|
||||||
qe->chan->priority = 0;
|
peer->priority = 0;
|
||||||
|
|
||||||
gosub_argstart = strchr(gosubexec, ',');
|
gosub_argstart = strchr(gosubexec, ',');
|
||||||
if (gosub_argstart) {
|
if (gosub_argstart) {
|
||||||
@@ -3990,8 +3990,8 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gosub_args) {
|
if (gosub_args) {
|
||||||
res = pbx_exec(qe->chan, application, gosub_args);
|
res = pbx_exec(peer, application, gosub_args);
|
||||||
ast_pbx_run(qe->chan);
|
ast_pbx_run(peer);
|
||||||
free(gosub_args);
|
free(gosub_args);
|
||||||
ast_debug(1, "Gosub exited with status %d\n", res);
|
ast_debug(1, "Gosub exited with status %d\n", res);
|
||||||
} else
|
} else
|
||||||
|
Reference in New Issue
Block a user