[asterisk-commits] rmudgett: branch 1.8 r358278 - /branches/1.8/channels/sig_ss7.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 5 16:22:24 CST 2012


Author: rmudgett
Date: Mon Mar  5 16:22:21 2012
New Revision: 358278

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358278
Log:
Drop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.

SS7 is a trunk protocol and should clear a failed call as soon as
possible.

* Made SS7 hangup a call immediately if it has not connected yet for
INCOMPLETE/BUSY/CONGESTION causes.  Otherwise, play an appropriate inband
tone.

(closes issue ASTERISK-19372)
Reported by: Igor Nikolaev

Modified:
    branches/1.8/channels/sig_ss7.c

Modified: branches/1.8/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_ss7.c?view=diff&rev=358278&r1=358277&r2=358278
==============================================================================
--- branches/1.8/channels/sig_ss7.c (original)
+++ branches/1.8/channels/sig_ss7.c Mon Mar  5 16:22:21 2012
@@ -1661,6 +1661,12 @@
 
 	switch (condition) {
 	case AST_CONTROL_BUSY:
+		if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
+			chan->hangupcause = AST_CAUSE_USER_BUSY;
+			chan->_softhangup |= AST_SOFTHANGUP_DEV;
+			res = 0;
+			break;
+		}
 		res = sig_ss7_play_tone(p, SIG_SS7_TONE_BUSY);
 		break;
 	case AST_CONTROL_RINGING:
@@ -1719,15 +1725,23 @@
 		res = 0;
 		break;
 	case AST_CONTROL_INCOMPLETE:
-		/* If the channel is connected, wait for additional input */
-		if (p->call_level == SIG_SS7_CALL_LEVEL_CONNECT) {
+		if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
+			chan->hangupcause = AST_CAUSE_INVALID_NUMBER_FORMAT;
+			chan->_softhangup |= AST_SOFTHANGUP_DEV;
 			res = 0;
 			break;
 		}
-		chan->hangupcause = AST_CAUSE_INVALID_NUMBER_FORMAT;
+		/* Wait for DTMF digits to complete the dialed number. */
+		res = 0;
 		break;
 	case AST_CONTROL_CONGESTION:
-		chan->hangupcause = AST_CAUSE_CONGESTION;
+		if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
+			chan->hangupcause = AST_CAUSE_CONGESTION;
+			chan->_softhangup |= AST_SOFTHANGUP_DEV;
+			res = 0;
+			break;
+		}
+		res = sig_ss7_play_tone(p, SIG_SS7_TONE_CONGESTION);
 		break;
 	case AST_CONTROL_HOLD:
 		ast_moh_start(chan, data, p->mohinterpret);




More information about the asterisk-commits mailing list