[asterisk-commits] mmichelson: branch 1.4 r158053 - in /branches/1.4: apps/ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 20 11:33:06 CST 2008


Author: mmichelson
Date: Thu Nov 20 11:33:06 2008
New Revision: 158053

URL: http://svn.digium.com/view/asterisk?view=rev&rev=158053
Log:
Make sure to set the hangup cause on the calling channel in the case
that ast_call() fails. For incoming SIP channels, this was causing
us to send a 603 instead of a 486 when the call-limit was reached on
the destination channel.

(closes issue #13867)
Reported by: still_nsk
Patches:
      13867.diff uploaded by putnopvut (license 60)
Tested by: blitzrage


Modified:
    branches/1.4/apps/app_dial.c
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=158053&r1=158052&r2=158053
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Thu Nov 20 11:33:06 2008
@@ -1383,6 +1383,9 @@
 				ast_log(LOG_DEBUG, "ast call on peer returned %d\n", res);
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst);
+			if (tmp->chan->hangupcause) {
+				chan->hangupcause = tmp->chan->hangupcause;
+			}
 			ast_hangup(tmp->chan);
 			tmp->chan = NULL;
 			free(tmp);

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=158053&r1=158052&r2=158053
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu Nov 20 11:33:06 2008
@@ -3067,6 +3067,8 @@
 			AST_SCHED_DEL(sched, p->initid);
 			p->initid = ast_sched_add(sched, p->maxtime ? (p->maxtime * 4) : SIP_TRANS_TIMEOUT, auto_congest, p);
 		}
+	} else {
+		ast->hangupcause = AST_CAUSE_USER_BUSY;
 	}
 	return res;
 }




More information about the asterisk-commits mailing list