Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 7284) +++ channels/chan_sip.c (working copy) @@ -2275,6 +2275,7 @@ /* Possible values taken from causes.h */ switch(cause) { + case 603: /* Declined */ case 403: /* Not found */ return AST_CAUSE_CALL_REJECTED; case 404: /* Not found */ @@ -2454,7 +2455,7 @@ if (ast->hangupcause && ((res = hangup_cause2sip(ast->hangupcause)))) { transmit_response_reliable(p, res, &p->initreq, 1); } else - transmit_response_reliable(p, "403 Forbidden", &p->initreq, 1); + transmit_response_reliable(p, "603 Declined", &p->initreq, 1); } } else { /* Call is in UP state, send BYE */ if (!p->pendinginvite) { Index: pbx.c =================================================================== --- pbx.c (revision 7284) +++ pbx.c (working copy) @@ -5503,6 +5503,8 @@ static int pbx_builtin_hangup(struct ast_channel *chan, void *data) { /* Just return non-zero and it will hang up */ + if (!chan->hangupcause) + chan->hangupcause = AST_CAUSE_NORMAL_CLEARING; return -1; }