[Fixed] hangup cause 31-All Channels are busy-Sangoma A102DE

Hi:

I am using a A102DE card with a primary E1 in Europe, but I have the problem that each time I call I see that channel is not available. What am I missing? I have used the default Elaxtis configuration in the webgui and all the channels are green. So I think the card is properly installed. I see that it is able to assing a channel because it hangs up Hungup ‘DAHDI/i1/myNumber-2’. That is to say log file:

-- Executing [s@macro-dialout-trunk:22] Dial("SIP/2500-00000001", "DAHDI/g0/myNumber,300,") in new stack
[2014-11-18 18:21:42] VERBOSE[14304][C-00000001] pbx.c:     -- Executing [s@macro-dialout-trunk:22] Dial("SIP/2500-00000001", "DAHDI/g0/myNumber,300,") in new stack
 [2014-11-18 18:21:42] VERBOSE[14304][C-00000001] sig_pri.c:     -- Requested transfer capability: 0x00 - SPEECH
 [2014-11-18 18:21:42] VERBOSE[14304][C-00000001] app_dial.c:     -- Called DAHDI/g0/myNumber
 [2014-11-18 18:21:46] VERBOSE[14219][C-00000001] sig_pri.c:     -- Span 1: Channel 0/1 got hangup, cause 31
[2014-11-18 18:21:46] VERBOSE[14304][C-00000001] chan_dahdi.c:     -- Hungup 'DAHDI/i1/myNumber-2'
 [2014-11-18 18:21:46] VERBOSE[14304][C-00000001] app_dial.c:   == Everyone is busy/congested at this time (1:0/0/1)
 [2014-11-18 18:21:46] VERBOSE[14304][C-00000001] pbx.c:     -- Executing [s@macro-dialout-trunk:23] NoOp("SIP/2500-00000001", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 31") in new stack
 [2014-11-18 18:21:46] VERBOSE[14304][C-00000001] pbx.c:     -- Executing [s@macro-dialout-trunk:24] GotoIf("SIP/2500-00000001", "0?continue,1:s-CHANUNAVAIL,1") in new stack
 [2014-11-18 18:21:46] VERBOSE[14304][C-00000001] pbx.c:     -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)

nano /etc/dahdi/system.conf

####################################################
# Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov 18 17:49:11 2014
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WPE1/0 "wanpipe1 card 0" (MASTER) RED
span=1,1,0,ccs,hdb3,crc4
echocanceller=wanpipe_hwec,1-31
# termtype: te
bchan=1-15,17-31
dchan=16

# Span 2: WPE1/1 "wanpipe2 card 1"
span=2,2,0,ccs,hdb3,crc4
echocanceller=wanpipe_hwec,32-62
# termtype: te
bchan=32-46,48-62
dchan=47

# Global data

loadzone        = us
defaultzone     = us
####################################################

/etc/asterisk/chan_dahdi.conf

####################################################

; Auto-generated by /usr/sbin/hardware_detector
[trunkgroups]

[channels]
context=from-pstn
signalling=fxs_ks
rxwink=300              ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
faxdetect=incoming
echotraining=800
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1
relaxdtmf=yes

;Uncomment these lines if you have problems with the disconection of your analog lines
;busydetect=yes
;busycount=3

immediate=no

#include dahdi-channels.conf
#include chan_dahdi_additional.conf
####################################################

nano etc/asterisk/dahdi-channels.conf

; Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov 18 17:49:11 2014
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WPE1/0 "wanpipe1 card 0" (MASTER) RED
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63

; Span 2: WPE1/1 "wanpipe2 card 1"
group=0,12
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 32-46,48-62
context = default
group = 63

dahdi show status

Description                              Alarms  IRQ    bpviol CRC    Fra Codi Options  LBO
wanpipe1 card 0                          OK      0      0      0      CCS HDB3 CRC4     0 db (CSU)/0-133 feet (DSX-1)
wanpipe2 card 1                          RED     0      0      0      CCS HDB3 CRC4     0 db (CSU)/0-133 feet (DSX-1)

Contact Sangoma.

However fxs_ks is either not allowed for E1, or would be a very unusual choice.

Thank you very much for your answer.

I made I mistake, I should have added the file etc/asterisk/dahdi-channels.conf that is overritting
/etc/asterisk/chan_dahdi.conf here you see signalling = pri_cpe.

I will get in touch with them, but have you seen something wrong in the config files?

Kind regardas and thank you for your help.

Thank you very much for your help.

At the end it was a problem with the Signaling Channel. For Sangoma cards it is necessary to use another parameter instead of dchan, it is necessary to use hardhdlc.

After changin this parameter all is running great.

Thanks.

Just for future reference :

[quote]NOTE: If you are having problems making a call on a PRI line and you have both incoming and outgoing frames when you run the command “pri intense debug span X” in Asterisk then check the D-channel using Wanpipe: “wanpipemon -i wXg1 -c trd” (where X is the port number of the Sangoma card). If you only see incoming frames then both the hardware and Zaptel are doing HDLC framing on the D-channel, disable software HDLC framing .
[/quote]

wiki.sangoma.com/Asterisk-FAQ#hardhdlc