Summary:ASTERISK-00286: [patch] problem with SERVICE ACKNOWLEDGE IE?
Reporter:Tony Mancill (tmancill)Labels:
Date Opened:2003-09-18 14:00:16Date Closed:2004-09-25 02:57:07
Versions:Frequency of
Environment:Attachments:( 0) svcack_uui_20031208.patch
( 1) uu_patch.txt
Description:I was having a problem getting my B channels to come up  between a TE410P and a Definity G3R.  * 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.)


tmancill@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;
Comments:By: Tony Mancill (tmancill) 2003-09-25 17:38:21

Please ignore the patch in the Additional Information section; an updated patch is attached, that includes an implementation of dump_user_user().  The problem with using h->raw[3] is that it doesn't take into account the length of the call reference value (crlen).  Supporting documentaiton can be found in AT&T TR41459, Part III, Section 3.6.3.

By: Brian West (bkw918) 2003-12-08 22:47:00.000-0600

is this the latest patch?

By: Tony Mancill (tmancill) 2003-12-09 00:17:00.000-0600

svcack_uui_20031208.patch containst the same fixes against the current version of q931.c in CVS (q931.c file dated 12/05).

By: Brian West (bkw918) 2003-12-09 16:29:30.000-0600

Fixed in CVS

By: Tony Mancill (tmancill) 2003-12-14 19:28:06.000-0600

Reminder sent to bkw918

Are we waiting for a commit to CVS?  When I pull q931.c from CVS, it's still dated prior to 12/09 @ 16:29.  Sorry if this is a FAQ - I'm still a little new to this, but am anxious to be able to use the CVS version of libpri (without the SERVICE ACKNOWLEDGE patch, it won't work at all against the G3R).


By: Tony Mancill (tmancill) 2003-12-30 16:28:20.000-0600

Still having problems with this on the G3R, despite the call reference field fixes  in the current CVS version.  Attaching the patch for dump_user_user() and SERVICE ACKNOWLDGE against the latests q931.c.

By: Tony Mancill (tmancill) 2003-12-30 16:29:46.000-0600

err... I guess I won't be uploading the patch after all, since I received this error:

APPLICATION ERROR ASTERISK-11: ERROR: File upload failed. PHP file uploads may be disabled. Please ask your admin to run the admin_check script to debug this problem.
(bug_file_add.php: line 33)

Here's the text of the patch:

--- libpri_cvs/q931.c   2003-12-09 07:55:48.000000000 -0800
+++ libpri_vesta/q931.c 2003-12-30 13:54:58.000000000 -0800
@@ -843,7 +843,11 @@

static void dump_user_user(q931_ie *ie, int len, char prefix)
+       int x;
+       pri_message("%c User-User Information (len=%2d) [ ", prefix, ie->len);
+       for (x=0;x<ie->len;x++)
+               pri_message("%c", ie->data[x] & 0x7f);
+       pri_message(" ]\n");

@@ -1935,7 +1939,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[3] -= 0x8;
+               h->raw[h->crlen + 2] -= 0x8;
               q931_xmit(pri, h, len, 1);
               return 0;
       } else if (h->pd != Q931_PROTOCOL_DISCRIMINATOR) {

By: jrollyson (jrollyson) 2004-01-14 03:55:07.000-0600

Is this still a problem?

By: Tony Mancill (tmancill) 2004-01-14 15:42:00.000-0600

Yes.  Without that patch, the latest libpri in CVS won't talk to my G3R.  I wonder if someone else could test the patch to make sure that it doesn't have negative side-effects for those other configurations.

By: Tony Mancill (tmancill) 2004-01-28 00:56:33.000-0600

FYI - the SERVICE ACKNOWLEDGE part of this was fixed in 862 (same patch, I'm not sure why it went in faster).  I've tested with the CVS version against the G3R and it's all good.  

It would be nice to get the UUI debug patch in as well though.

By: x martinp (martinp) 2004-01-28 15:12:53.000-0600

looks like all is in CVS right now.