ISDN4BSD (HPS version) is going into ports

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ISDN4BSD (HPS version) is going into ports

Andreas Longwitz
Hi,

I try to get ISDN4BSD from ports (rev 2349) with FreeBSD 8.3 working.
My first step was to run isdnd, that works fine now. Second step is to
run asterisk with chan_capi. So far I had run FreeBSD 8.2 and i4b
integrated manually, but that should not make any difference. Two
problems appeared after my update and I could not find the reason.

Problem 1: If I take up the receiver of a ISDN telephone I do not hear
the dial tone. I hear nothing. I can dial and that works. The phone
sends a SETUP messages and asterisk/isdn4bsd answers with SETUP ACK:

-- TE->NT - unit:11
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 01 0------- Call Reference is sent from call originator
         -0000001 Call Reference = 1 = 0x01
L3 07 05 0------- Message type extension = 0
         -0000101 Message type = SETUP
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 01 0------- Call Reference is sent from call originator
         -0000001 Call Reference = 1 = 0x01
L3 07 05 0------- Message type extension = 0
         -0000101 Message type = SETUP                     (0x05)
L3 08 04 0------- Variable length Information element
         -0000100 IE = bearer capability
L3 09 03 00000011 IE Length = 3 bytes
L3 0A 80 1------- Extension Bit = 1        (no extension, final octet)
         -00----- Coding standard = CCITT
         ---00000 Capability = 0x00, speech
L3 0B 90 1------- Extension Bit = 1        (no extension, final octet)
         -00----- Mode = 0x00, circuit
         ---10000 Rate = 0x10, 64 kbit/s
L3 0C A3 1------- Extension Bit = 1        (no extension, final octet)
         -01----- Layer 1 identity = 1
         ---00011 Layer 1 Protocol = 0x03, G.711 a-Law
L3 0D 6C 0------- Variable length Information element
         -1101100 IE = calling party number
L3 0E 09 00001001 IE Length = 9 bytes
L3 0F 00 0------- Extension Bit = 0     (with extension, octet follows)
         -000---- Type = Unknown
         ----0000 Plan = Unknown                           (0x0)
L3 10 80 1------- Extension Bit = 1     (no extension, final octet)
         -00----- Presentation = allowed
         ---000-- Spare
         ------00 Screening = user provided, not screened
L3 11 34 00110100 Number digit = 4
L3 12 39 00111001 Number digit = 9
L3 13 39 00111001 Number digit = 9
L3 14 34 00110100 Number digit = 9
L3 15 30 00110000 Number digit = 9
L3 16 36 00110110 Number digit = 9
L3 17 38 00111000 Number digit = 9
L3 18 7D 0------- Variable length Information element
         -1111101 IE = high layer compatibility
L3 19 02 00000010 IE Length = 2 bytes
L3 1A 91 1------- Extension Bit = 1       (no extension, final octet)
         -00----- Coding standard = CCITT
         ---100-- Interpretation = first
         ------01 Presentation = High layer protocol profile
L3 1B 81 1------- Extension Bit = 1       (no extension, final octet)
         -0000001 Characteristics = Telephony          (0x01) (0x05)
L3 08 04 0------- Variable length Information element

- NT->TE - unit:11
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 81 1------- Call Reference is sent to call originator
         -0000001 Call Reference = 1 = 0x01
L3 07 0D 0------- Message type extension = 0
         -0001101 Message type = SETUP_ACKNOWLEDGE            (0x0d)
L3 08 18 0------- Variable length Information element
         -0011000 IE = channel identification
L3 09 01 00000001 IE Length = 1 bytes
L3 0A 89 1------- Extension Bit = 1       (no extension, final octet)
         -0------ Interface Id present = No
         --0----- Interface Type = BRI
         ---0---- Spare
         ----1--- Channel is exclusive
         -----0-- Channel is not the D-Channel
         ------01 Channel = B-1
L3 0B 1E 0------- Variable length Information element
         -0011110 IE = progress indicator
L3 0C 02 00000010 IE Length = 2 bytes
L3 0D 82 -00----- Coding standard = CCITT
         ----0010 location = Public network serving local user
L3 0E 88 -0001000 description = In-band info or appropriate pattern now
available

There are no more packets in L3. The last "description" in the SETUP ACK
indicates that the missing dialtone should be send in-band by asterisk,
but I am not quite sure. In my configuration I did nothing special for
getting the dialtone, this worked always out of the box.

Problem 2: I tried to get more information for problem 1 with the
analyze mode of isdndecode using the custom cable as decribed in cable.txt.
I connected my ISDN phone to an "ISDN Basisanschluß" with my cable box
between them (receiving side unit 8, sending side unit 9), but after
the commands
    cat /dev/ihfc8.X > /dev/null 2>&1 &    (X=0,1,2)
    cat /dev/ihfc9.X > /dev/null 2>&1 &
    isdndecode -a -b -R 8 -T 9 -i -x
I can only see D-channel data from the NT-side, nothing from the phone
and no information from any B-channel, but the phone works correct.

The hardware jumpers on my HFC-4S card of unit 8 and 9 are set to TE
and I have
   isdnconfig -u  8 intr_mode pcm_64 pcm_map 0 1 end pcm_master \
              te_mode -p DRVR_DSS1_TE \
              -u  9 intr_mode pcm_64 pcm_map 0 1 end pcm_master
              nt_mode -p DRVR_DSS1_NT

Some time ago this analyze mode worked fine, but now it looks that I am
missing something.


Andreas Longwitz

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

Hans Petter Selasky
On Monday 10 September 2012 18:53:45 Andreas Longwitz wrote:
> Hi,
>

Hi,

> I try to get ISDN4BSD from ports (rev 2349) with FreeBSD 8.3 working.
> My first step was to run isdnd, that works fine now. Second step is to
> run asterisk with chan_capi. So far I had run FreeBSD 8.2 and i4b
> integrated manually, but that should not make any difference. Two
> problems appeared after my update and I could not find the reason.
>
> Problem 1: If I take up the receiver of a ISDN telephone I do not hear
> the dial tone. I hear nothing. I can dial and that works. The phone
> sends a SETUP messages and asterisk/isdn4bsd answers with SETUP ACK:

You need to check the settings in capi.conf for chan_capi. It should tell I4B
to provide a dialtone.

>
> -- TE->NT - unit:11
> 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 01 0------- Call Reference is sent from call originator
>          -0000001 Call Reference = 1 = 0x01
> L3 07 05 0------- Message type extension = 0
>          -0000101 Message type = SETUP
> 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 01 0------- Call Reference is sent from call originator
>          -0000001 Call Reference = 1 = 0x01
> L3 07 05 0------- Message type extension = 0
>          -0000101 Message type = SETUP                     (0x05)
> L3 08 04 0------- Variable length Information element
>          -0000100 IE = bearer capability
> L3 09 03 00000011 IE Length = 3 bytes
> L3 0A 80 1------- Extension Bit = 1        (no extension, final octet)
>          -00----- Coding standard = CCITT
>          ---00000 Capability = 0x00, speech
> L3 0B 90 1------- Extension Bit = 1        (no extension, final octet)
>          -00----- Mode = 0x00, circuit
>          ---10000 Rate = 0x10, 64 kbit/s
> L3 0C A3 1------- Extension Bit = 1        (no extension, final octet)
>          -01----- Layer 1 identity = 1
>          ---00011 Layer 1 Protocol = 0x03, G.711 a-Law
> L3 0D 6C 0------- Variable length Information element
>          -1101100 IE = calling party number
> L3 0E 09 00001001 IE Length = 9 bytes
> L3 0F 00 0------- Extension Bit = 0     (with extension, octet follows)
>          -000---- Type = Unknown
>          ----0000 Plan = Unknown                           (0x0)
> L3 10 80 1------- Extension Bit = 1     (no extension, final octet)
>          -00----- Presentation = allowed
>          ---000-- Spare
>          ------00 Screening = user provided, not screened
> L3 11 34 00110100 Number digit = 4
> L3 12 39 00111001 Number digit = 9
> L3 13 39 00111001 Number digit = 9
> L3 14 34 00110100 Number digit = 9
> L3 15 30 00110000 Number digit = 9
> L3 16 36 00110110 Number digit = 9
> L3 17 38 00111000 Number digit = 9
> L3 18 7D 0------- Variable length Information element
>          -1111101 IE = high layer compatibility
> L3 19 02 00000010 IE Length = 2 bytes
> L3 1A 91 1------- Extension Bit = 1       (no extension, final octet)
>          -00----- Coding standard = CCITT
>          ---100-- Interpretation = first
>          ------01 Presentation = High layer protocol profile
> L3 1B 81 1------- Extension Bit = 1       (no extension, final octet)
>          -0000001 Characteristics = Telephony          (0x01) (0x05)
> L3 08 04 0------- Variable length Information element
>
> - NT->TE - unit:11
> 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 81 1------- Call Reference is sent to call originator
>          -0000001 Call Reference = 1 = 0x01
> L3 07 0D 0------- Message type extension = 0
>          -0001101 Message type = SETUP_ACKNOWLEDGE            (0x0d)
> L3 08 18 0------- Variable length Information element
>          -0011000 IE = channel identification
> L3 09 01 00000001 IE Length = 1 bytes
> L3 0A 89 1------- Extension Bit = 1       (no extension, final octet)
>          -0------ Interface Id present = No
>          --0----- Interface Type = BRI
>          ---0---- Spare
>          ----1--- Channel is exclusive
>          -----0-- Channel is not the D-Channel
>          ------01 Channel = B-1
> L3 0B 1E 0------- Variable length Information element
>          -0011110 IE = progress indicator
> L3 0C 02 00000010 IE Length = 2 bytes
> L3 0D 82 -00----- Coding standard = CCITT
>          ----0010 location = Public network serving local user
> L3 0E 88 -0001000 description = In-band info or appropriate pattern now
> available
>
> There are no more packets in L3. The last "description" in the SETUP ACK
> indicates that the missing dialtone should be send in-band by asterisk,
> but I am not quite sure. In my configuration I did nothing special for
> getting the dialtone, this worked always out of the box.
>
> Problem 2: I tried to get more information for problem 1 with the
> analyze mode of isdndecode using the custom cable as decribed in cable.txt.
> I connected my ISDN phone to an "ISDN Basisanschluß" with my cable box
> between them (receiving side unit 8, sending side unit 9), but after
> the commands
>     cat /dev/ihfc8.X > /dev/null 2>&1 &    (X=0,1,2)
>     cat /dev/ihfc9.X > /dev/null 2>&1 &
>     isdndecode -a -b -R 8 -T 9 -i -x
> I can only see D-channel data from the NT-side, nothing from the phone
> and no information from any B-channel, but the phone works correct.
>
> The hardware jumpers on my HFC-4S card of unit 8 and 9 are set to TE
> and I have
>    isdnconfig -u  8 intr_mode pcm_64 pcm_map 0 1 end pcm_master \
>               te_mode -p DRVR_DSS1_TE \
>               -u  9 intr_mode pcm_64 pcm_map 0 1 end pcm_master
>               nt_mode -p DRVR_DSS1_NT
>
> Some time ago this analyze mode worked fine, but now it looks that I am
> missing something.
>

This might have something to do with the default protocol selected. There has
been some changes in this area. Can you check the manpage of isdndebug, and
the protocol options available? You will need to set the default protocol
before opening the device nodes.

--HPS
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

Andreas Longwitz
Hi Hans, thanks for reply !

>> Problem 1: If I take up the receiver of a ISDN telephone I do not hear
>> the dial tone. I hear nothing. I can dial and that works. The phone
>> sends a SETUP messagewant_s and asterisk/isdn4bsd answers with SETUP ACK:
>
> You need to check the settings in capi.conf for chan_capi. It should tell I4B
> to provide a dialtone.

I have checked capi.conf and did not find something usefull for
dialtone, but your statement gives me the correct hint:

In struct i4b_controller is a bit called no_layer1_dialtone and this bit
is never initialized, therefore it is zero. In dss1_l3fsm.h the variable
want_dialtone gets value 1 and the call
   dss1_l3_tx_setup_acknowledge(cd,NT_MODE(sc),want_dialtone)
therefore sets the flag L3_TX_PROGRESSI and the SETUP_ACK fram created
in dss1_l3_tx_message has the progress indicator included. Everything ok
so far. Then I found, that the creation of the dialtone is done by the
driver type DRVR_DIAL_GEN and therefore the i4b module i4btel is needed.
After make config and activate "Build TEL driver" dialtone works.

I think this option should be on as a default.

>> Problem 2: I tried to get more information for problem 1 with the
>> analyze mode of isdndecode using the custom cable as decribed in cable.txt.
>> I connected my ISDN phone to an "ISDN Basisanschluß" with my cable box
>> between them (receiving side unit 8, sending side unit 9), but after
>> the commands
>>     cat /dev/ihfc8.X > /dev/null 2>&1 &    (X=0,1,2)
>>     cat /dev/ihfc9.X > /dev/null 2>&1 &
>>     isdndecode -a -b -R 8 -T 9 -i -x
>> I can only see D-channel data from the NT-side, nothing from the phone
>> and no information from any B-channel, but the phone works correct.
>>
>> The hardware jumpers on my HFC-4S card of unit 8 and 9 are set to TE
>> and I have
>>    isdnconfig -u  8 intr_mode pcm_64 pcm_map 0 1 end pcm_master \
>>               te_mode -p DRVR_DSS1_TE \
>>               -u  9 intr_mode pcm_64 pcm_map 0 1 end pcm_master
>>               nt_mode -p DRVR_DSS1_NT

For clarification I add that of course I first give the isdnconfig
commands and then the cat's and isdndecode.

> This might have something to do with the default protocol selected. There has
> been some changes in this area. Can you check the manpage of isdndebug, and
> the protocol options available? You will need to set the default protocol
> before opening the device nodes.

The concept of a "default protocol" is not clear to me. Please can you
describe the difference between
         isdnconfig -u 9 -p DRVR_DSS1_NT
and
         isdndebug  -u 9 -p DRVR_DSS1_NT ?
If I try the latter, the command "cat /dev/ihfc9.0" returns with "device
not configured".


Andreas Longwitz

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

giovanni.v
Il 11/09/2012 15.58, Andreas Longwitz ha scritto:
> Then I found, that the creation of the dialtone is done by the
> driver type DRVR_DIAL_GEN and therefore the i4b module i4btel is needed.
> After make config and activate "Build TEL driver" dialtone works.
>
> I think this option should be on as a default.

I agree.
That's because usually progress tones are not sent in-band but the TE
should generate them based on progress indicator info.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

Hans Petter Selasky
In reply to this post by Andreas Longwitz
Hi,

On Tuesday 11 September 2012 15:58:27 Andreas Longwitz wrote:

> Hi Hans, thanks for reply !
>
> >> Problem 1: If I take up the receiver of a ISDN telephone I do not hear
> >> the dial tone. I hear nothing. I can dial and that works. The phone
> >
> >> sends a SETUP messagewant_s and asterisk/isdn4bsd answers with SETUP ACK:
> > You need to check the settings in capi.conf for chan_capi. It should tell
> > I4B to provide a dialtone.
>
> I have checked capi.conf and did not find something usefull for
> dialtone, but your statement gives me the correct hint:
>
> In struct i4b_controller is a bit called no_layer1_dialtone and this bit
> is never initialized, therefore it is zero. In dss1_l3fsm.h the variable
> want_dialtone gets value 1 and the call
>    dss1_l3_tx_setup_acknowledge(cd,NT_MODE(sc),want_dialtone)
> therefore sets the flag L3_TX_PROGRESSI and the SETUP_ACK fram created
> in dss1_l3_tx_message has the progress indicator included. Everything ok
> so far. Then I found, that the creation of the dialtone is done by the
> driver type DRVR_DIAL_GEN and therefore the i4b module i4btel is needed.
> After make config and activate "Build TEL driver" dialtone works.
>
> I think this option should be on as a default.

Done.

>
> >> Problem 2: I tried to get more information for problem 1 with the
> >> analyze mode of isdndecode using the custom cable as decribed in
> >> cable.txt. I connected my ISDN phone to an "ISDN Basisanschluß" with my
> >> cable box between them (receiving side unit 8, sending side unit 9),
> >> but after the commands
> >>
> >>     cat /dev/ihfc8.X > /dev/null 2>&1 &    (X=0,1,2)
> >>     cat /dev/ihfc9.X > /dev/null 2>&1 &
> >>     isdndecode -a -b -R 8 -T 9 -i -x
> >>
> >> I can only see D-channel data from the NT-side, nothing from the phone
> >> and no information from any B-channel, but the phone works correct.
> >>
> >> The hardware jumpers on my HFC-4S card of unit 8 and 9 are set to TE
> >> and I have
> >>
> >>    isdnconfig -u  8 intr_mode pcm_64 pcm_map 0 1 end pcm_master \
> >>    
> >>               te_mode -p DRVR_DSS1_TE \
> >>               -u  9 intr_mode pcm_64 pcm_map 0 1 end pcm_master
> >>               nt_mode -p DRVR_DSS1_NT
>
> For clarification I add that of course I first give the isdnconfig
> commands and then the cat's and isdndecode.
>
> > This might have something to do with the default protocol selected. There
> > has been some changes in this area. Can you check the manpage of
> > isdndebug, and the protocol options available? You will need to set the
> > default protocol before opening the device nodes.
>
> The concept of a "default protocol" is not clear to me. Please can you
> describe the difference between
>          isdnconfig -u 9 -p DRVR_DSS1_NT
> and
>          isdndebug  -u 9 -p DRVR_DSS1_NT ?
> If I try the latter, the command "cat /dev/ihfc9.0" returns with "device
> not configured".

You need to run something like this first:

isdndebug -u 9 -b 0 -p P_HDLC -b 1 P_HDLC -b 2 P_TRANSPARENT

If it doesn't work, I will check later. A bit busy right now.

--HPS
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

Andreas Longwitz
Hi,

>>>> Problem 2: I tried to get more information for problem 1 with the
>>>> analyze mode of isdndecode using the custom cable as decribed in
>>>> cable.txt. I connected my ISDN phone to an "ISDN Basisanschluß" with my
>>>> cable box between them (receiving side unit 8, sending side unit 9),
>>>> but after the commands
>>>>
>>>>     cat /dev/ihfc8.X > /dev/null 2>&1 &    (X=0,1,2)
>>>>     cat /dev/ihfc9.X > /dev/null 2>&1 &
>>>>     isdndecode -a -b -R 8 -T 9 -i -x
>>>>

> You need to run something like this first:
> isdndebug -u 9 -b 0 -p P_HDLC -b 1 P_HDLC -b 2 P_TRANSPARENT
> If it doesn't work, I will check later. A bit busy right now.

Thanks for this. The D-channel trace works correct with your isdndebug
command, but no luck with B-cahnnels. I also tried
 isdndebug -u 9 -b 0 -p P_HDLC -b 1 -p P_TRANS -b 2 -p P_TRANS
and
 isdndebug -u 9 -b 0 -p P_HDLC -b 1 -p P_TRANS_RING -b 2 -p P_TRANS_RING
with the same result: D-channel ok, B-channels give only X'FF'.

I am not sure, if I had ever traced B-channel data in analyze mode
successful before.



--
Andreas Longwitz

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

Hans Petter Selasky
On Friday 14 September 2012 11:59:09 Andreas Longwitz wrote:

> Hi,
>
> >>>> Problem 2: I tried to get more information for problem 1 with the
> >>>> analyze mode of isdndecode using the custom cable as decribed in
> >>>> cable.txt. I connected my ISDN phone to an "ISDN Basisanschluß" with
> >>>> my cable box between them (receiving side unit 8, sending side unit
> >>>> 9), but after the commands
> >>>>
> >>>>     cat /dev/ihfc8.X > /dev/null 2>&1 &    (X=0,1,2)
> >>>>     cat /dev/ihfc9.X > /dev/null 2>&1 &
> >>>>     isdndecode -a -b -R 8 -T 9 -i -x
> >
> > You need to run something like this first:
> > isdndebug -u 9 -b 0 -p P_HDLC -b 1 P_HDLC -b 2 P_TRANSPARENT
> > If it doesn't work, I will check later. A bit busy right now.
>
> Thanks for this. The D-channel trace works correct with your isdndebug
> command, but no luck with B-cahnnels. I also tried
>  isdndebug -u 9 -b 0 -p P_HDLC -b 1 -p P_TRANS -b 2 -p P_TRANS
> and
>  isdndebug -u 9 -b 0 -p P_HDLC -b 1 -p P_TRANS_RING -b 2 -p P_TRANS_RING
> with the same result: D-channel ok, B-channels give only X'FF'.
>
> I am not sure, if I had ever traced B-channel data in analyze mode
> successful before.

Hi,

What kind of data will you trace? If transparent, you need to use P_TRANS,
else P_HDLC for HDLC.

If you get data/trace frames, then the tracing works. Have you checked both
channels?

--HPS
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ISDN4BSD (HPS version) is going into ports

Hans Petter Selasky
In reply to this post by Andreas Longwitz
On Friday 14 September 2012 11:59:09 Andreas Longwitz wrote:
> Hi,

Hi,

I've rolled a new tarball of ISDN4BSD including the fixes received so far.

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/ports

v2.0.4

--HPS
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "[hidden email]"