Package: libpri1
Version: 1.0.4-2
Severity: normal
Tags: patch

Some ISDN phones sends numbers that begins with * or # as "keypad facility"
instead of "called party number" during call setup. Those are also copied 
to callednum with my patch.

Regards,
Mikael


-- System Information:
Debian Release: 3.1
Architecture: i386 (i586)
Kernel: Linux 2.6.8-2-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libpri1 depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an

-- no debconf information
diff -ur libpri-1.0.4/q931.c libpri-1.0.4.new/q931.c
--- libpri-1.0.4/q931.c 2005-03-03 20:07:19.000000000 +0100
+++ libpri-1.0.4.new/q931.c     2005-03-03 20:08:26.000000000 +0100
@@ -1403,8 +1403,10 @@
 static FUNC_RECV(receive_keypad_facility)
 {
        /* copy digits to call->callednum or call->digits */
-       if (msgtype == Q931_SETUP) {
+       if (msgtype == Q931_INFORMATION) {
            q931_get_number(call->digits, sizeof(call->digits), ie->data , len 
- 2);
+       } else if (msgtype == Q931_SETUP) {
+           q931_get_number(call->callednum, sizeof(call->callednum), ie->data, 
len - 2);
        } else {
            // XXX we assume 1 byte keypad
            call->digits[0] = ie->data[0] & 0x7f;

Reply via email to