diff --git a/apps/app_queue.c b/apps/app_queue.c index 89221459f0..cb5b12644c 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3790,7 +3790,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce app = pbx_findapp("Macro"); if (app) { - res = pbx_exec(qe->chan, app, macroexec); + res = pbx_exec(peer, app, macroexec); ast_debug(1, "Macro exited with status %d\n", res); res = 0; } else {