diff -Naur asterisk-1.4.20.1.old/res/res_features.c asterisk-1.4.20.1.new/res/res_features.c --- asterisk-1.4.20.1.old/res/res_features.c 2008-04-22 20:29:56.000000000 +0200 +++ asterisk-1.4.20.1.new/res/res_features.c 2008-05-29 17:06:29.000000000 +0200 @@ -379,6 +379,15 @@ if (peer) ast_copy_string(pu->peername, peer->name, sizeof(pu->peername)); + else { + /* try to get peer name, some channel driver set this value */ + const char *peername = pbx_builtin_getvar_helper(chan, "BLINDTRANSFER"); + if (peername) { + if (option_debug) + ast_log(LOG_DEBUG, "Got name of peer: %s.\n", peername); + ast_copy_string(pu->peername, peername, sizeof(pu->peername)); + } + } /* Remember what had been dialed, so that if the parking expires, we try to come back to the same place */ @@ -1863,7 +1872,8 @@ res = ast_safe_sleep(chan, 1000); /* Park the call */ if (!res) { - res = park_call_full(chan, chan, 0, NULL, orig_chan_name); + res = park_call_full(chan, NULL, 0, NULL, orig_chan_name); + /* Continue on in the dialplan */ if (res == 1) { ast_copy_string(chan->exten, orig_exten, sizeof(chan->exten));