diff --git a/q931.c b/q931.c index 4dac18d..b7f6a47 100755 --- a/q931.c +++ b/q931.c @@ -1935,7 +1935,7 @@ int q931_receive(struct pri *pri, q931_h *h, int len) /* This is the weird maintenance stuff. We majorly KLUDGE this by changing byte 4 from a 0xf (SERVICE) to a 0x7 (SERVICE ACKNOWLEDGE) */ - h->raw[3] -= 0x8; + h->raw[h->crlen + 2] -= 0x8; q931_xmit(pri, h, len, 1); return 0; } else if (h->pd != Q931_PROTOCOL_DISCRIMINATOR) {