Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2012 12:18:17 +0100
From:      Andreas Longwitz <longwitz@incore.de>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-isdn@freebsd.org
Subject:   Re: ISDN4BSD (HPS version) is going into ports
Message-ID:  <50AF5B79.5050802@incore.de>
In-Reply-To: <201211151812.32616.hselasky@c2i.net>
References:  <509E87EF.9070607@incore.de> <201211151812.32616.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hans,

> The chan_capi port has now been updated to version "chan_capi-2.0.3" which 
> should resolve the mentioned issues. If not, please let me know.

1. chan_capi:
Good news: I can confirm that all deadlock problems with asterisk 1.8
are gone with your new port chan_capi-2.0.3 ! Everything works fine for
a week now.

2. isdn4bsd-utils-2.0.4:
Works fine, but to start isdnd reliable a minor patch mentioned earlier
is necessary:

-- src/usr.sbin/i4b/isdnd/support.c.orig       2011-10-10
20:34:44.000000000 +0200
+++ src/usr.sbin/i4b/isdnd/support.c    2012-07-10 15:53:26.00000 +0200
@@ -854,7 +854,7 @@
                case 0:                 /* child */
                        break;
                default:                /* parent */
-                       exit(0);
+                       _exit(0);
        }
Further I propose that you integrate a file named files/isdnd.in in the
port like this:

#!/bin/sh

# PROVIDE: isdnd
# REQUIRE: netif FILESYSTEMS cleanvar
# KEYWORD: nojail

. /etc/rc.subr

name="isdnd"
rcvar=`set_rcvar`
pidfile="/var/run/${name}.pid"
command="/usr/local/sbin/isdnd"

load_rc_config $name
isdnd_enable=${isdnd_enable:-"NO"}
run_rc_command "$1"

3. isdn4bsd-kmod-2.0.4:
One thing is left: the handling of DISCONNECT including error codes like
"busy". We had some discussion about this in late 2010, I wrote

> My understanding of the standard closing of a Q.931 connection is
>       --> DISCONNECT
>       <-- RELEASE
>       --> RELEASE_COMPLETE
> it is like closing a tcp socket (-> FIN; <- FIN+ACK; -> ACK). I have
> never seen an example that RELEASE and RELESE_COMPLETE is send in the
> same direction. Your method of finishing a Q.931 connection is correct
> but not standard: In the active case you send RELEASE_COMLETE, in the
> passive case you answer the incoming DISCONNECT with RELEASE_COMPLETE.

and your answer was that the statemachine in ISDN4BSD must be changed to
accomplish my requirement. If you have a patch for this, I would like to
test this.

One last thing: As you know for my old PBX I need a patch called
patch-no_status_enquiry_in_NT_MODE:

--- src/sys/i4b/dss1/dss1_l2fsm.c.orig  2012-07-08 17:42:19.00000 +0200
+++ src/sys/i4b/dss1/dss1_l2fsm.c       2012-07-08 18:10:10.00000 +0200
@@ -1494,9 +1494,11 @@
                 * STATUS_ENQUIRY seems to not
                 * be included by this rule.
                 */
-               *ptr++ = PD_Q931;
-                ptr   = make_callreference(pipe_adapter, 0x7f, ptr);
-               *ptr++ = STATUS_ENQUIRY;
+               if(!(NT_MODE(sc))) {
+                  *ptr++ = PD_Q931;
+                   ptr   = make_callreference(pipe_adapter, 0x7f, ptr);
+                  *ptr++ = STATUS_ENQUIRY;
+               }

                m->m_len = ptr - ((__typeof(ptr))m->m_data);
            }
--- src/sys/i4b/dss1/dss1_l3fsm.h.orig  2012-07-08 17:42:19.00000 +0200
+++ src/sys/i4b/dss1/dss1_l3fsm.h       2012-07-08 18:10:10.00000 +0200
@@ -298,6 +298,17 @@
                newstate--;
            }
        }
+       else if (NT_MODE(sc) &&
+               ((newstate == ST_L3_UC_TO) ||
+                (newstate == ST_L3_UA_TO) ||
+                (newstate == ST_L3_U3_TO) ||
+                (newstate == ST_L3_U4_TO) ||
+                (newstate == ST_L3_U6_TO) ||
+                (newstate == ST_L3_U7_TO))) {
+               /* don't send status enquiry */
+               send_status_enquiry = 0;
+               newstate--;
+       }

        cd->state = newstate;

Should this become a config option in the port or would you prefer a
sysctl for this ?


Regards

Andreas Longwitz




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50AF5B79.5050802>