[asterisk-users] DAHDI has broken by pbx :-(

Russell Brown russell at lls.lls.com
Thu Nov 10 09:38:56 CST 2011


I bit the bullet last night and upgraded from Asterisk 1.4.42 with
Zaptel 1.4.12.1 to Asterisk 1.8.7.1 and DAHDI 2.5.0.2 (libpri is 1.4.12
for both configs).

Everything went reasonably well except for calls to and from an ISDN PBX
on span 2.....  which now just won't work :-(

There's obviously something different in the Zap/DAHDI settings that I
need to tweak but I've read through the config samples and not been able
to find anything.

Can anyone help?

For the record, no hardware was changed and everythings been working
fine for yonks with my 1.4.42 based setup.

FWIW, I also tried DAHDI 2.6.0-rc1 and libpri-1.4.11.5 but neither made
any difference.

The ISDN PBX (a Network Alchemy Argent) is connected to port 1 on my
Digium Wildcard TE205P.  Port 0 on the card is connected to a BT ISDN30
line which is working fine.

I copied my settings from /etc/zaptel.conf to /etc/dahdi/system.conf.

>#       Second port
>span=2,0,2,ccs,hdb3,crc4 
>bchan=32-46 
>dchan=47 
>bchan=48-62

I copied /etc/asterisk/zapata.conf to /etc/chan_dahdi.conf

>;
>;       Network Alchemy
>;
>group=2
>switchtype=euroisdn
>context = alchemy
>usecallerid=yes
>signalling = pri_net
>resetinterval=100000000
>callerid=asreceived
>pridialplan=dynamic
>prilocaldialplan=dynamic
>useincomingcalleridondahditransfer = yes
>channel => 32-40


Asterisk/DADHI sees both spans but whenever I try dialing anthing on
span 2 I get the following in /var/log/asterisk/messages

>[Nov 10 13:28:07] NOTICE[30988] chan_dahdi.c: PRI got event: HDLC Abort (6) on D-channel of span 2
>[Nov 10 13:28:08] WARNING[30988] sig_pri.c: Span 2: No D-channels available!  Using Primary channel as D-channel anyway!

and on the console I get:

>-- Executing [*42 at from-sip:1] NoOp("SIP/112-00000003", "DAHDI Dial Test") in new stack
>-- Executing [*42 at from-sip:2] Dial("SIP/112-00000003", "DAHDI/g2/18") in new stack
>-- Requested transfer capability: 0x00 - SPEECH
>-- Called DAHDI/g2/18
>== Primary D-Channel on span 2 down
>== Primary D-Channel on span 2 up
>-- Span 2: Channel 0/1 got hangup, cause 18
>-- Hungup 'DAHDI/i2/18-1'
>== Everyone is busy/congested at this time (1:0/0/1)
>-- Auto fallthrough, channel 'SIP/112-00000003' status is 'CHANUNAVAIL'

and then all the Channels on Span 2 get restarted.

DAHDI is also seeing CRC errors that goes up by one every time the
D-Channel on span 2 goes up/down.

>asterisk*CLI> dahdi show status 
>Description                              Alarms  IRQ    bpviol CRC Fra Codi Options  LBO
>T2XXP (PCI) Card 0 Span 1                OK      0      0      0   CCS HDB3 CRC4     0 db (CSU)/0-133 feet (DSX-1)
>T2XXP (PCI) Card 0 Span 2                OK      0      0      5   CCS HDB3 CRC4     266-399 feet (DSX-1)
>asterisk*CLI> 

If I turn on pri debug on span 2 and make a call then I get

>    -- Executing [*42 at from-sip:1] NoOp("SIP/112-00000006", "DAHDI Dial Test") in new stack
>  == Extension Changed 112[from-sip] new state InUse for Notify User 114 
>    -- Executing [*42 at from-sip:2] Dial("SIP/112-00000006", "DAHDI/g2/18") in new stack
>PRI Span: 2 -- Making new call for cref 32770
>    -- Requested transfer capability: 0x00 - SPEECH
>PRI Span: 2 
>PRI Span: 2 > DL-DATA request
>PRI Span: 2 > Protocol Discriminator: Q.931 (8)  len=49
>PRI Span: 2 > TEI=0 Call Ref: len= 2 (reference 2/0x2) (Sent from originator)
>PRI Span: 2 > Message Type: SETUP (5)
>PRI Span: 2 TEI=0 Transmitting N(S)=9, window is open V(A)=9 K=7
>PRI Span: 2 
>PRI Span: 2 > Protocol Discriminator: Q.931 (8)  len=49
>PRI Span: 2 > TEI=0 Call Ref: len= 2 (reference 2/0x2) (Sent from originator)
>PRI Span: 2 > Message Type: SETUP (5)
>PRI Span: 2 > [04 03 80 90 a3]
>PRI Span: 2 > Bearer Capability (len= 5) [ Ext: 1  Coding-Std: 0  Info transfer capability: Speech (0)
>PRI Span: 2 >                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
>PRI Span: 2 >                                User information layer 1: A-Law (35)
>PRI Span: 2 > [18 03 a9 83 81]
>PRI Span: 2 > Channel ID (len= 5) [ Ext: 1  IntID: Implicit  Other(PRI) Spare: 0  Exclusive  Dchan: 0
>PRI Span: 2 >                       ChanSel: As indicated in following octets
>PRI Span: 2 >                       Ext: 1  Coding: 0  Number Specified Channel Type: 3
>PRI Span: 2 >                       Ext: 1  Channel: 1 Type: NET] PRI Span: 2 > [28 0d 52 75 73 73 65 6c 6c 20 42 72 6f 77 6e]
>PRI Span: 2 > Display (len=13) [ Russell Brown ]
>PRI Span: 2 > [6c 0c 21 80 31 37 38 30 34 37 31 38 30 32]
>PRI Span: 2 > Calling Number (len=14) [ Ext: 0  TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
>PRI Span: 2 >                           Presentation: Presentation permitted, user number not screened (0)  '1780471800' ]
>PRI Span: 2 > [70 03 c1 31 38]
>PRI Span: 2 > Called Number (len= 5) [ Ext: 1  TON: Subscriber Number (4)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '18' ]
>PRI Span: 2 q931.c:6036 q931_setup: Call 32770 enters state 1 (Call Initiated).  Hold state: Idle
>    -- Called DAHDI/g2/18
>PRI Span: 2 T303 timed out.  cref:32770
>PRI Span: 2 
>PRI Span: 2 > DL-DATA request
>PRI Span: 2 > Protocol Discriminator: Q.931 (8)  len=49
>PRI Span: 2 > TEI=0 Call Ref: len= 2 (reference 2/0x2) (Sent from originator)
>PRI Span: 2 > Message Type: SETUP (5)
>PRI Span: 2 TEI=0 Just queued I-frame since in state 8(Timer recovery)
>PRI Span: 2 TEI=0 MDL-ERROR (I): T200 expired N200 times sending RR/RNR in state 8(Timer recovery)
>PRI Span: 2 TEI=0 Sending SABME
>PRI Span: 2 Changing from state 8(Timer recovery) to 5(Awaiting establishment)
>Span: 2 Processing event: PRI_EVENT_DCHAN_DOWN
>  == Primary D-Channel on span 2 down
>PRI Span: 2 TEI=0 Sending SABME
>PRI Span: 2 TEI=0 Sending SABME
>PRI Span: 2 TEI=0 Sending SABME
>PRI Span: 2 T303 timed out.  cref:32770
>PRI Span: 2 q931.c:5925 t303_expiry: Call 32770 enters state 0 (Null).  Hold state: Idle
>PRI Span: 2 Fake clearing.  cref:32770
>PRI Span: 2 q931.c:9219 pri_internal_clear: alive 1, hangupack 1
>Span: 2 Processing event: PRI_EVENT_HANGUP
>  == Primary D-Channel on span 2 up
>    -- Span 2: Channel 0/1 got hangup, cause 18
>PRI Span: 2 q931.c:6837 q931_hangup: Hangup other cref:32770
>PRI Span: 2 q931.c:6594 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
>PRI Span: 2 Destroying call 0x7f0d285c0840, ourstate Null, peerstate Null, hold-state Idle
>    -- Hungup 'DAHDI/i2/18-2'
>  == Everyone is busy/congested at this time (1:0/0/1)
>    -- Auto fallthrough, channel 'SIP/112-00000006' status is 'CHANUNAVAIL'
>    -- Executing [h at from-sip:1] Macro("SIP/112-00000006", "DONE_HANGUP") in new stack
>    -- Executing [s at macro-DONE_HANGUP:1] NoOp("SIP/112-00000006", "In DONE_HANGUP MACRO") in new stack
>PRI Span: 2 TEI=0 MDL-ERROR (G): T200 expired N200 times sending SABME in state 5(Awaiting establishment)
>PRI Span: 2 Changing from state 5(Awaiting establishment) to 4(TEI assigned)
>PRI Span: 2 TEI=0 DL event: Q931_DL_EVENT_DL_RELEASE_IND(3)
>PRI Span: 2 SAPI/TEI=0/0 Kick starting link
>PRI Span: 2 TEI=0 Sending SABME
>PRI Span: 2 Changing from state 4(TEI assigned) to 5(Awaiting establishment) 

Which shows the call terminating with Cause 18 (no user responding).  huh?

Can anyone suggest how I can get this fixed?

TIA

-- 
 Regards,
     Russell
 --------------------------------------------------------------------
| Russell Brown          | MAIL: russell at lls.com PHONE: 01780 471800 |
| Lady Lodge Systems     | WWW Work: http://www.lls.com              |
| Peterborough, England  | WWW Play: http://www.ruffle.me.uk         |
 --------------------------------------------------------------------



More information about the asterisk-users mailing list