[asterisk-commits] mattf: trunk r85957 - /trunk/channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 16 15:55:57 CDT 2007


Author: mattf
Date: Tue Oct 16 15:55:57 2007
New Revision: 85957

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85957
Log:
Don't hangup the call for SS7 if we get an alarm

Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=85957&r1=85956&r2=85957
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Tue Oct 16 15:55:57 2007
@@ -4106,22 +4106,24 @@
 			break;
 		case ZT_EVENT_ALARM:
 #ifdef HAVE_PRI
-			if (!p->pri || !p->pri->pri || (pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0)) {
-				/* T309 is not enabled : hangup calls when alarm occurs */
-				if (p->call) {
-					if (p->pri && p->pri->pri) {
-						if (!pri_grab(p, p->pri)) {
-							pri_hangup(p->pri->pri, p->call, -1);
-							pri_destroycall(p->pri->pri, p->call);
-							p->call = NULL;
-							pri_rel(p->pri);
+			if (p->sig == SIG_PRI) {
+				if (!p->pri || !p->pri->pri || (pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0)) {
+					/* T309 is not enabled : hangup calls when alarm occurs */
+					if (p->call) {
+						if (p->pri && p->pri->pri) {
+							if (!pri_grab(p, p->pri)) {
+								pri_hangup(p->pri->pri, p->call, -1);
+								pri_destroycall(p->pri->pri, p->call);
+								p->call = NULL;
+								pri_rel(p->pri);
+							} else
+								ast_log(LOG_WARNING, "Failed to grab PRI!\n");
 						} else
-							ast_log(LOG_WARNING, "Failed to grab PRI!\n");
-					} else
-						ast_log(LOG_WARNING, "The PRI Call has not been destroyed\n");
-				}
-				if (p->owner)
-					p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+							ast_log(LOG_WARNING, "The PRI Call has not been destroyed\n");
+					}
+					if (p->owner)
+						p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
+				}
 			}
 			if (p->bearer)
 				p->bearer->inalarm = 1;
@@ -4140,6 +4142,10 @@
 			} else {
 				break;
 			}
+#endif
+#ifdef HAVE_SS7
+			if (p->sig == SIG_SS7)
+				break;
 #endif
 		case ZT_EVENT_ONHOOK:
 			if (p->radio) {




More information about the asterisk-commits mailing list