From f8e6096bfec3507895c8d7db91e78871ee47c6fe Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 4 Oct 2016 14:27:59 -0500 Subject: [PATCH] q931.c: Lucent switch implementation bug workaround (Part 2) Work around a bug in a Lucent switch implementation that sets the extension bit in octet 3 even though octet 3a is present. The same issue was seen in a NI2 switch implementation. It was probably a Lucent switch configured for NI2 operation. To avoid further surprises, I'm going to enable the work around for all North American switch types. PRI-183 Reported by: Richard Mudgett Change-Id: I7eedbf68b7c3d9c868d9533012e4cea5142af281 --- q931.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/q931.c b/q931.c index 98d6596..b38aff1 100644 --- a/q931.c +++ b/q931.c @@ -2356,11 +2356,20 @@ static int receive_connected_number(int full_ie, struct pri *ctrl, q931_call *ca * Work around a bug in a Lucent switch implementation that * sets the extension bit in octet 3 even though octet 3a * is present. + * + * The same issue was seen in a NI2 switch implementation. + * It was probably a Lucent switch configured for NI2 + * operation. To avoid further surprises, I'm going to + * enable the work around for all North American switch + * types. */ if (ie->data[i] & 0x80) { /* Octet 3 extension bit is set */ if (ctrl->switchtype != PRI_SWITCH_LUCENT5E - && ctrl->switchtype != PRI_SWITCH_ATT4ESS) { + && ctrl->switchtype != PRI_SWITCH_ATT4ESS + && ctrl->switchtype != PRI_SWITCH_NI1 + && ctrl->switchtype != PRI_SWITCH_NI2 + && ctrl->switchtype != PRI_SWITCH_DMS100) { /* Not a potentially buggy switch type. */ break; } @@ -2421,11 +2430,20 @@ static void dump_connected_number(int full_ie, struct pri *ctrl, q931_ie *ie, in * Work around a bug in a Lucent switch implementation that * sets the extension bit in octet 3 even though octet 3a * is present. + * + * The same issue was seen in a NI2 switch implementation. + * It was probably a Lucent switch configured for NI2 + * operation. To avoid further surprises, I'm going to + * enable the work around for all North American switch + * types. */ if (ie->data[i] & 0x80) { /* Octet 3 extension bit is set */ if (ctrl->switchtype != PRI_SWITCH_LUCENT5E - && ctrl->switchtype != PRI_SWITCH_ATT4ESS) { + && ctrl->switchtype != PRI_SWITCH_ATT4ESS + && ctrl->switchtype != PRI_SWITCH_NI1 + && ctrl->switchtype != PRI_SWITCH_NI2 + && ctrl->switchtype != PRI_SWITCH_DMS100) { /* Not a potentially buggy switch type. */ break; }