Make sure we choose the last channel as the dchannel if it's not E1 (for BRI). ...
authorMatthew Fredrickson <creslin@digium.com>
Fri, 17 Nov 2006 01:05:28 +0000 (01:05 +0000)
committerMatthew Fredrickson <creslin@digium.com>
Fri, 17 Nov 2006 01:05:28 +0000 (01:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47784 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index d5f96e5..fcfe767 100644 (file)
@@ -7320,8 +7320,9 @@ static int pri_resolve_span(int *span, int channel, int offset, struct zt_spanin
                } else {
                        if (si->totalchans == 31) { /* if it's an E1 */
                                pris[*span].dchannels[0] = 16 + offset;
-                       } else {
-                               pris[*span].dchannels[0] = 24 + offset;
+                       } else { /* T1 or BRI: D Channel is the last Channel */
+                               pris[*span].dchannels[0] = 
+                                       si->totalchans + offset;
                        }
                        pris[*span].dchanavail[0] |= DCHAN_PROVISIONED;
                        pris[*span].offset = offset;