[asterisk-commits] branch 1.2 - r7451 in /branches/1.2:
channels/chan_sip.c pbx.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Dec 12 23:14:28 CST 2005
Author: kpfleming
Date: Mon Dec 12 23:14:27 2005
New Revision: 7451
URL: http://svn.digium.com/view/asterisk?rev=7451&view=rev
Log:
ensure that hangups while incoming calls are in early state are handled properly (issue #5919)
Modified:
branches/1.2/channels/chan_sip.c
branches/1.2/pbx.c
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=7451&r1=7450&r2=7451&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Mon Dec 12 23:14:27 2005
@@ -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) {
Modified: branches/1.2/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/pbx.c?rev=7451&r1=7450&r2=7451&view=diff
==============================================================================
--- branches/1.2/pbx.c (original)
+++ branches/1.2/pbx.c Mon Dec 12 23:14:27 2005
@@ -5513,6 +5513,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;
}
More information about the asterisk-commits
mailing list