From 5166adfb1e031d469543562cfabba572a517d4e2 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Tue, 29 Jun 2004 04:28:34 +0000 Subject: [PATCH] Never send channel identifier with SETUP when GR303 CPE git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@125 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/q931.c b/q931.c index 386cd6f..8bf3f44 100755 --- a/q931.c +++ b/q931.c @@ -2184,6 +2184,11 @@ int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req) c->userl1 = req->userl1; c->ds1no = (req->channel & 0xff00) >> 8; req->channel &= 0xff; + if ((pri->localtype == PRI_CPE) && pri->subchannel) { + req->channel = 0; + req->exclusive = 0; + } + c->channelno = req->channel; c->slotmap = -1; c->nonisdn = req->nonisdn; @@ -2191,7 +2196,7 @@ int q931_setup(struct pri *pri, q931_call *c, struct pri_sr *req) c->complete = req->numcomplete; if (req->exclusive) c->chanflags = FLAG_EXCLUSIVE; - else + else if (c->channelno) c->chanflags = FLAG_PREFERRED; if (req->caller) { strncpy(c->callernum, req->caller, sizeof(c->callernum) - 1);