[svn-commits] kpfleming: branch 1.6.0 r132574 - in /branches/1.6.0: ./ channels/chan_dahdi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 21 17:52:37 CDT 2008


Author: kpfleming
Date: Mon Jul 21 17:52:36 2008
New Revision: 132574

URL: http://svn.digium.com/view/asterisk?view=rev&rev=132574
Log:
Merged revisions 132573 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r132573 | kpfleming | 2008-07-21 17:51:16 -0500 (Mon, 21 Jul 2008) | 10 lines

Merged revisions 132571 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r132571 | kpfleming | 2008-07-21 17:45:16 -0500 (Mon, 21 Jul 2008) | 2 lines

teach chan_dahdi how to find the D-channel on BRI spans, and don't attempt to use channel 24 as a D-channel on spans of unexpected sizes

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_dahdi.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_dahdi.c?view=diff&rev=132574&r1=132573&r2=132574
==============================================================================
--- branches/1.6.0/channels/chan_dahdi.c (original)
+++ branches/1.6.0/channels/chan_dahdi.c Mon Jul 21 17:52:36 2008
@@ -7935,11 +7935,19 @@
 			ast_log(LOG_WARNING, "Unable to use span %d implicitly since it is already part of trunk group %d\n", *span, pris[*span].mastertrunkgroup);
 			*span = -1;
 		} else {
-			if (si->totalchans == 31) { /* if it's an E1 */
+			if (si->totalchans == 31) {
+				/* E1 */
 				pris[*span].dchannels[0] = 16 + offset;
-			} else { /* T1 or BRI: D Channel is the last Channel */
-				pris[*span].dchannels[0] = 
-					si->totalchans + offset;
+			} else if (si->totalchans == 24) {
+				/* T1 or J1 */
+				pris[*span].dchannels[0] = 24 + offset;
+			} else if (si->totalchans == 3) {
+				/* BRI */
+				pris[*span].dchannels[0] = 3 + offset;
+			} else {
+				ast_log(LOG_WARNING, "Unable to use span %d, since the D-channel cannot be located (unexpected span size of %d channels)\n", *span, si->totalchans);
+				*span = -1;
+				return 0;
 			}
 			pris[*span].dchanavail[0] |= DCHAN_PROVISIONED;
 			pris[*span].offset = offset;




More information about the svn-commits mailing list