Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2006 15:40:12 +0100
From:      Daniel Hartmeier <daniel@benzedrine.cx>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-isdn@freebsd.org
Subject:   Re: ISDN4BSD / ihfc0 in NT-mode setup
Message-ID:  <20061108144012.GB6819@insomnia.benzedrine.cx>
In-Reply-To: <200611081512.33913.hselasky@c2i.net>
References:  <20061108135555.GK14033@insomnia.benzedrine.cx> <200611081512.33913.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 08, 2006 at 03:12:33PM +0100, Hans Petter Selasky wrote:

> You need to configure "isdnd" before you can use "isdnphone". Try running 
> "capitest -u 0 -i 1 -o 1" instead.

  # capitest -u 0 -i 1 -o 1
  [...]
  main.c: capi_send_listen_request: sending listen request for
  incoming_calls
  dialing out, 1 / 1 ...
  main.c: cd_event: disconnected: normal call clearing

Concurrently

  # isdntrace -u 0 -b -i

  =========== isdntrace controller #0 =========== started Wed Nov  8 14:21:32 2006

  -- NT->TE - unit:00  frame:000068 - time:08.11 14:21:42.089982 - length:3 -----
  D01:000  02 01 7f                                               ................
  D01 ("isdndecode" can decode the data above)

  -- NT->TE - unit:00  frame:000069 - time:08.11 14:21:42.089991 - length:8 -----
  D01:000  02 01 00 00 08 01 7f 75                                .......u........

  -- NT->TE - unit:00  frame:000070 - time:08.11 14:21:42.089993 - length:8 -----
  D01:000  02 01 02 01 08 01 7f 75                                .......u........

  -- NT->TE - unit:00  frame:000071 - time:08.11 14:21:43.133560 - length:8 -----
  D01:000  02 01 00 00 08 01 7f 75                                .......u........

  -- NT->TE - unit:00  frame:000072 - time:08.11 14:21:43.133564 - length:8 -----
  D01:000  02 01 02 01 08 01 7f 75                                .......u........
  [...]

Decoding one of those with

  # isdndecode -u 0 -b -i

  -- TE->NT - unit:00 --------------- time:08.11 14:28:08.037067 ----------------
  L1 STATE: G3: Active

  -- NT->TE - unit:00  frame:000087 - time:08.11 14:28:09.072752 - length:8 -----
  L2 00 02 000000-- SAPI = 0                                       (Call Control)
           ------1- C/R = Command
           -------0 Extension Bit = 0             (with extension, octet follows)
  L2 01 01 0000000- TEI = 0 = 0x00                            (Non-automatic TEI)
           -------1 Extension Bit = 1                 (no extension, final octet)
  L2 02 00 0000000- N(S) = 0                               (send sequence number)
           -------0 I-Frame: Information transfer
  L2 03 00 0000000- N(R) = 0                            (receive sequence number)
           -------0 P/F, Poll = No Immediate Response Required
  L3 04 08 00001000 Protocol = Q.931/I.451/DSS1                            (0x08)
  L3 05 01 0000---- Call Reference
           ----0001 Call Reference length is 1 byte
  L3 06 7F 0------- Call Reference is sent from call originator
           -1111111 Call Reference = 127 = 0x7f
  L3 07 75 0------- Message type extension = 0
           -1110101 Message type = STATUS_ENQUIRY                          (0x75)

> > When I use the ISDN phone to dial any number, nothing happens, either, and
> > the phone shows "No connection", no trace output.
> 
> Do you have "isdnd" or "Asterisk+chan_capi" running ?

No, I wasn't.

> A quicky is to just: "cat /dev/i4b > /dev/null &"
> 
> Do any messages appear now?

Aha! Now when I pick up the ISDN phone I see

  # isdntrace -u 0 -b -i

  =========== isdntrace controller #0 =========== started Wed Nov  8 14:31:40 2006

  -- TE->NT - unit:00  frame:000093 - time:08.11 14:31:44.044581 - length:8 -----
  D01:000  fc ff 03 0f 42 d9 01 ff                                ....B...........
  D01 ("isdndecode" can decode the data above)

  -- TE->NT - unit:00  frame:000094 - time:08.11 14:31:46.044784 - length:8 -----
  D01:000  fc ff 03 0f 75 ac 01 ff                                ....u...........

  -- TE->NT - unit:00  frame:000095 - time:08.11 14:31:48.044987 - length:8 -----
  D01:000  fc ff 03 0f ec 70 01 ff                                .....p..........

And decoding that

  # isdndecode -u 0 -b -i

  =========== isdndecode controller #0 ========== started Wed Nov  8 14:33:28 2006

  -- TE->NT - unit:00  frame:000100 - time:08.11 14:33:31.805523 - length:8 -----
  L2 00 FC 111111-- SAPI = 63                                (Layer 2 Management)
           ------0- C/R = Command
           -------0 Extension Bit = 0             (with extension, octet follows)
  L2 01 FF 1111111- TEI = 127 = 0x7f                              (Broadcast TEI)
           -------1 Extension Bit = 1                 (no extension, final octet)
  L2 02 03 000-0011 U-Frame: UI                          (Unnumbered Information)
           ---0---- P/F, Poll = No Immediate Response Required
  L2 03 0F 00001111 MEI                            (Management Entity Identifier)
  L2 04 9F 10011111 Ri = 0x9fe6                           (Reference number high)
  L2 05 E6 11100110 Ri                                     (Reference Number low)
  L2 06 01 00000001 TEI Identity message = REQUEST                         (0x01)
  L2 07 FF 1111111- Ai = 127                                (Action Indicator = )
           -------1 Extension Bit = 1                 (no extension, final octet)

There is still no tone one the phone and it still produces the
"No connection" message, but I hope the output above might tell
what is wrong.

> If the messages you get use TEI 0 then it is P2P_NT you need to setup.

They do, right?

> "isdntest" can do some basic testing, but "capitest" is better. "isdntest" is 
> not installed by default.

Does the output above look ok? Does it mean the cabling is fine?

Next thing I need to do is set up isdnd, and then I can use capitest
to dial from the FreeBSD box to the phone (or does capitest itself
not require isdnd)?

Thank you for your help, much appreciated.

Daniel



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