Hello,

        We have found an issue while using chan_ss7 we cannot use values above 
0x3fff 
for opc and dpc.
        The coresponding lines of code say (in mtp.c)

if(peerpc(m) < 0 || peerpc(m) >= (1<<14)) {
        ast_log(LOG_ERROR, "Invalid value 0x%x for peerpc.\n", peerpc(m));

        Allthough we have quickly patched this, we have found that the entire 
code in 
mtp.c is organized for a maximum of 14 bits of processing (as the following 
code from the same mtp.c shows):

void mtp3_put_label(int sls, int opc, int dpc, unsigned char *buf) {
  buf[0] = dpc & 0xff;
  buf[1] = ((dpc & 0x3f00) >> 8) | ((opc & 0x0003) << 6);
  buf[2] = ((opc & 0x03fc) >> 2);
  buf[3] = ((opc & 0x3c00) >> 10) | (sls << 4);
}

        Any ideas of the reason behind this limit?
        
Thanks,
-- 
Cristian Dimache

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-ss7 mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-ss7

Reply via email to