apps/app_dial: Fix Dial 'z' option
[asterisk/asterisk.git] / apps / app_dial.c
index b48a226..2faff84 100644 (file)
@@ -1212,7 +1212,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
                                        ast_channel_unlock(in);
                                }
 
-                               do_forward(o, &num, peerflags, single, caller_entertained, to,
+                               do_forward(o, &num, peerflags, single, caller_entertained, &orig,
                                        forced_clid, stored_clid);
 
                                if (single && o->chan