diff --git a/apps/app_dial.c b/apps/app_dial.c index 10ba7f8a881e41205c5ed34908f51c8483dcc351..03bbbbb9a22bf342dc38399b75e4ce939202235b 100755 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -877,8 +877,11 @@ static int dial_exec(struct ast_channel *chan, void *data) } else res = -1; - if (res != AST_PBX_NO_HANGUP_PEER) + if (res != AST_PBX_NO_HANGUP_PEER) { + if (!chan->_softhangup) + chan->hangupcause = peer->hangupcause; ast_hangup(peer); + } } out: hanguptree(outgoing, NULL);