[svn-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r199922 - /team/jpeeler/asteri...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 10 13:51:02 CDT 2009


Author: jpeeler
Date: Wed Jun 10 13:50:51 2009
New Revision: 199922

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=199922
Log:
add missing handling for BRI in several places

Modified:
    team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=199922&r1=199921&r2=199922
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Wed Jun 10 13:50:51 2009
@@ -4080,7 +4080,7 @@
 
 	set_actual_gain(p->subs[SUB_REAL].dfd, 0, p->rxgain, p->txgain, p->law);
 
-	if (p->sig == SIG_PRI) {
+	if (p->sig == SIG_PRI || p->sig == SIG_BRI || p->sig == SIG_BRI_PTMP) {
 		struct dahdi_params ps;
 		memset(&ps, 0, sizeof(ps));
 		if (ioctl(p->subs[SUB_REAL].dfd, DAHDI_GET_PARAMS, &ps)) {
@@ -6547,7 +6547,7 @@
 	case DAHDI_EVENT_RINGERON:
 		break;
 	case DAHDI_EVENT_NOALARM:
-		if (p->sig == SIG_PRI) {
+		if (p->sig == SIG_PRI || p->sig == SIG_BRI || p->sig == SIG_BRI_PTMP) {
 			sig_pri_chan_alarm_notify(p->sig_pvt, 1);
 		}
 		p->inalarm = 0;
@@ -10681,13 +10681,10 @@
 				destroy_dahdi_pvt(&tmp);
 				return NULL;
 			}
-			/* the dchannel is down so put the channel in alarm */
-			//jpeeler, just for reference, remove it later
-			//if (tmp->pri && !pri_is_up(tmp->pri))
-			//	tmp->inalarm = 1;
 #endif
 			if ((res = get_alarms(tmp)) != DAHDI_ALARM_NONE) {
-				if (tmp->sig == SIG_PRI)
+			/* the dchannel is down so put the channel in alarm */
+				if (tmp->sig == SIG_PRI || tmp->sig == SIG_BRI || tmp->sig == SIG_BRI_PTMP)
 					sig_pri_chan_alarm_notify(tmp->sig_pvt, si.alarms);
 				else {
 					tmp->inalarm = 1;
@@ -10722,7 +10719,7 @@
 			}
 		}
 
-		if (tmp->sig != SIG_PRI) {
+		if (tmp->sig != SIG_PRI || tmp->sig != SIG_BRI || tmp->sig != SIG_BRI_PTMP) {
 			analog_p = tmp->sig_pvt;
 			if (analog_p) {
 				analog_p->channel = tmp->channel;
@@ -10838,8 +10835,9 @@
 	if (analog_lib_handles(p->sig, p->radio, p->oprmode))
 		return analog_available(p->sig_pvt, channelmatch, groupmatch, reason, channelmatched, groupmatched);
 
-	if (p->sig == SIG_PRI)
+	if (p->sig == SIG_PRI || p->sig == SIG_BRI || p->sig == SIG_BRI_PTMP) {
 		return sig_pri_available(p->sig_pvt, channelmatch, groupmatch, reason, channelmatched, groupmatched);
+	}
 
 #ifdef HAVE_SS7
 		/* Trust SS7 */
@@ -11041,7 +11039,7 @@
 			p->outgoing = 1;
 			if (analog_lib_handles(p->sig, p->radio, p->oprmode)) {
 				tmp = analog_request(p->sig_pvt, &callwait);
-			} else if (p->sig == SIG_PRI) {
+			} else if (p->sig == SIG_PRI || p->sig == SIG_BRI || p->sig == SIG_BRI_PTMP) {
 				tmp = sig_pri_request(p->sig_pvt, SIG_PRI_DEFLAW);
 			} else {
 				tmp = dahdi_new(p, AST_STATE_RESERVED, 0, p->owner ? SUB_CALLWAIT : SUB_REAL, 0, 0);




More information about the svn-commits mailing list