From: Richard Mudgett Date: Sat, 27 Jun 2009 00:55:12 +0000 (+0000) Subject: The ISDN CPE side should not exclusively pick B channels normally. X-Git-Tag: 1.4.26~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f65dccafb6df533ba18b2854adf1f679aa0d54a7;p=thirdparty%2Fasterisk.git The ISDN CPE side should not exclusively pick B channels normally. Before this patch, Asterisk unconditionally picked B channels exclusively on the CPE side and normally allowed alternative B channels on the network side. Now Asterisk does the opposite. Reasons for the CPE side to normally not pick B channels exclusively: * For CPE point-to-multipoint mode (i.e. phone side), the CPE side does not have enough information to exclusively pick B channels. (There may be other devices on the line.) * Q.931 gives preference to the network side picking B channels. * Some telcos require the CPE side to not pick B channels exclusively. (closes issue #14383) Reported by: mbrancaleoni git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@203908 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 46bc9ccec9..d10ddb905d 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -2463,15 +2463,12 @@ static int dahdi_call(struct ast_channel *ast, char *rdest, int timeout) pri_set_crv(p->pri->pri, p->call, p->channel, 0); } p->digital = IS_DIGITAL(ast->transfercapability); - /* Add support for exclusive override */ - if (p->priexclusive) + + /* Should the picked channel be used exclusively? */ + if (p->priexclusive || p->pri->nodetype == PRI_NETWORK) { exclusive = 1; - else { - /* otherwise, traditional behavior */ - if (p->pri->nodetype == PRI_NETWORK) - exclusive = 0; - else - exclusive = 1; + } else { + exclusive = 0; } pri_sr_set_channel(sr, p->bearer ? PVT_TO_CHANNEL(p->bearer) : PVT_TO_CHANNEL(p), exclusive, 1);