From: Matthew Fredrickson Date: Fri, 17 Nov 2006 01:05:28 +0000 (+0000) Subject: Make sure we choose the last channel as the dchannel if it's not E1 (for BRI). ... X-Git-Tag: 1.6.0-beta1~3^2~3924 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57d4919427ee61c32d598f4ec14b799917c716d0;p=thirdparty%2Fasterisk.git Make sure we choose the last channel as the dchannel if it's not E1 (for BRI). (#8077) Thanks Tzafrir. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47784 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index d5f96e57a9..fcfe76781e 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -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;