diff --git a/apps/app_dial.c b/apps/app_dial.c index bc362132af..89b470d2f9 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1610,6 +1610,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags /* Again, keep going even if there's an error */ ast_debug(1, "ast call on peer returned %d\n", res); ast_verb(3, "Couldn't call %s\n", numsubst); + if (tc->hangupcause) { + chan->hangupcause = tc->hangupcause; + } ast_hangup(tc); tc = NULL; ast_free(tmp); diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a59f7b54b5..1cf171c3ac 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4512,8 +4512,11 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout) res = update_call_counter(p, INC_CALL_RINGING); - if (res == -1) + if (res == -1) { return res; + } else { + ast->hangupcause = AST_CAUSE_USER_BUSY; + } p->callingpres = ast->cid.cid_pres; p->jointcapability = ast_translate_available_formats(p->capability, p->prefcodec);