[Asterisk-Users] T1 PRI

tony mancill asterisk at mancill.com
Wed Sep 17 12:00:52 MST 2003


Well, it turns out that I needed to get intimate with the libpri source
anyway.  After starting * with libpri linked in, * would annouce that the
B channels were up, but the Definity saw them as out of service
("OOS/FE-PINS"  initially and then after two minutes,
"out-of-service-FE").

I started comparing the messages exchanged when the DS1 comes up to those
on a Dialogic GC box, and ended up patching libpri.  The response to
SERVICE(0x0f) should be SERVICE ACKNOWLEDGE (0x07), as is indicated in the
comments.  However, the code that's currently in CVS seems to be modifying
a byte in the Call Reference, not the Message Type byte.  (Perhaps this
has something to do with my build environment?!?  The typedef for q931_h
looks pretty tame, and I'm building on Debian stable, gcc 2.95.4.)

Anyway, here's the patch:

tmancill at tor:/usr/src$ diff -u ./libpri/q931.c ./libpri_prev/q931.c
--- ./libpri/q931.c     Tue Sep 16 14:29:21 2003
+++ ./libpri_prev/q931.c        Tue Sep  9 16:49:10 2003
@@ -1840,7 +1840,7 @@
                /* 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[4] -= 0x8;
+               h->raw[3] -= 0x8;
                q931_xmit(pri, h, len, 1);
                return 0;
        }

After recompiling libpri, I'm up and running.  Being new to the list and
the project, I'd appreciate some feedback on whether or not this sort of
thing is appropriate for submission back into CVS.  For one, I'm not sure
if the maintenance kludge is Definity-specific.  (/me probably needs to
take a look at asterisk-dev list.)

Cheers,
tony





More information about the asterisk-users mailing list