[Solved]DAHDI - unable to register channel after reboot

Hi all,

I’m using a Digium Wildcard TE120P card, with Asterisk 1.8.17.0 and DAHDI 2.3.0.1

After my first installation completed (without rebooting), Asterisk and dahdi are both working fine, i’m able to make calls through dahdi. But after i reboot the server, it will show me:

[Nov  6 09:03:12] WARNING[10558]: channel.c:5660 ast_request: No channel type registered for 'DAHDI'
[Nov  6 09:03:12] WARNING[10558]: app_dial.c:2341 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 66 - Channel not implemented)
  == Everyone is busy/congested at this time (1:0/0/1)

And when i run ‘module load chan_dahdi.so’, this is what i got:

Command 'module load chan_dahdi.so' failed.
[Nov  6 09:35:40] WARNING[10908]: pbx.c:5833 ast_register_application2: Already have an application 'DAHDISendKeypadFacility'
[Nov  6 09:35:40] WARNING[10908]: pbx.c:5833 ast_register_application2: Already have an application 'DAHDISendCallreroutingFacility'
  == Parsing '/etc/asterisk/chan_dahdi.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
[Nov  6 09:35:40] WARNING[10908]: chan_dahdi.c:4376 dahdi_open: Unable to specify channel 1: Device or resource busy
[Nov  6 09:35:40] ERROR[10908]: chan_dahdi.c:12360 mkintf: Unable to open channel 1: Device or resource busy
here = 0, tmp->channel = 1, channel = 1
[Nov  6 09:35:40] ERROR[10908]: chan_dahdi.c:16851 build_channels: Unable to register channel '1-15,17-31'

I personally think this is not caused by configuration as i can make calls before rebooting, i’ve been searching this problem for days and i found a post may related to this, which is exactly the same problem as me:
forums.askozia.com/index.php?topic=1157.5

and also when i tried to use other vevrsions of Asterisk and Dahdi, i got the same problem.

Any help will be appreciated.

Neo

Does Dahdi seem to start properly on reboot? Do you get any errors loading Dahdi drivers in /var/log/messages?

No, dahdi service can start without any problem.

Is DAHDI starting properly on boot, or only when you start it manually? I.e., after boot, does dahdi_scan report all your hardware?

actually not, if i run ‘service dahdi restart’, it will get

Unloading DAHDI hardware modules: ERROR: Module wcte12xp is in use
ERROR: Module wcte12xp is in use
ERROR: Module dahdi_voicebus is in use by wcte12xp
ERROR: Module dahdi_echocan_mg2 is in use
ERROR: Module dahdi is in use by dahdi_echocan_mg2,wcte12xp,dahdi_voicebus
error
Loading DAHDI hardware modules:
  wcte12xp:                                                [  OK  ]

Running dahdi_cfg:                                         [  OK  ]

UPDATE:

I think my problem is caused by Asterisk, module chan_dahdi is not loaded by Asterisk.
After the first time i complete the installation of Asterisk, i can directly make calls through DAHDI, but once i restart asterisk service, i will get that error, which says unable to register channel DAHDI.

Cheers!
First of all I’d recommend:

  1. /etc/init.d/asterisk stop
  2. /etc/init.d/dahdi restart - will you get errors?
  3. open second console and run tail -f /var/log/asterisk/messages
  4. /etc/init.d/asterisk start
  5. run chkconfig --list | grep dahdi
    You’d see something like:
    dahdi 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Regards

Finally the problem is solved.
[color=#FF0000]DAHDI service must start after asterisk[/color], or it will get that error.
Thanks for all the helps above.

That has never been true in the past. The dahdi modules need to be loaded before chan_dahdi, otherwise, it will fail to open the dahdi device.

If i run dahdi first, then asterisk will not be able to register channels for dahdi, only i run dahdi after asterisk can solve this.
But anyway, at least this is the way to solve my problem. :smile:

Hi All!

Need urgent help. I’m having the same problem. My Elastix 2.20 (Release 21) with Asterisk 11.5.0 was working just fine until yesterday. I then decided to try the new addon SmartFink - which I installed via the web addon page of Elastix by clicking the “Install” button.

After that I started receiving the “All circuits are busy” message when I tried to make any outboud call. I looked into the Asterisk Log (i.e /var/logs/asterisk/full) and I see that the main culprit seems to be:

Channel.C: No Channel Type registered for 'DAHDI' app_dial.c: Unable to create channel of type 'DAHDI' (cause 66 - Channel not implemented)

Based on what I read in these posts - I tried to stop the asterisk service and then restart and manually load chan_dahdi.so - however that fail.

I also looked for the log file when I start asterisk using the -vvvvvvvvvvvvvvcfg option - but not sure where to find this. I don’t have a messages log file under /var/log/asterisk
I only have the full and related log files in there. I’m herewith attached he content of the log file and also the chan_dahdi.conf and other related file.

Need urgent help!!!

LOG FULL:

[Sep 26 04:02:13] Asterisk 11.5.0 built by palosanto @ rpmbuild64-2.elastix.palosanto.com on a x86_64 running Linux on 2013-0$
[Sep 26 10:31:42] WARNING[10813][C-00000001] channel.c: No channel type registered for 'DAHDI'
[Sep 26 10:31:42] WARNING[10813][C-00000001] app_dial.c: Unable to create channel of type 'DAHDI' (cause 66 - Channel not imp$
[Sep 26 10:31:46] WARNING[10813][C-00000001] channel.c: Prodding channel 'SIP/601-00000001' failed
[Sep 26 10:32:01] WARNING[10814][C-00000002] channel.c: No channel type registered for 'DAHDI'
[Sep 26 10:32:01] WARNING[10814][C-00000002] app_dial.c: Unable to create channel of type 'DAHDI' (cause 66 - Channel not imp$
[Sep 26 10:32:05] WARNING[10814][C-00000002] channel.c: Prodding channel 'SIP/601-00000002' failed
[Sep 26 11:13:21] WARNING[11010][C-00000003] channel.c: No channel type registered for 'DAHDI'
[Sep 26 11:13:21] WARNING[11010][C-00000003] app_dial.c: Unable to create channel of type 'DAHDI' (cause 66 - Channel not imp$
[Sep 26 11:13:25] WARNING[11010][C-00000003] channel.c: Prodding channel 'SIP/401-00000003' failed

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
[/quote]

DAHDI-CHANNELS.CONF
[quote]
; Autogenerated by /usr/sbin/dahdi_genconf on Wed Jan  2 14:23:00 2013
; 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: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER) 
;;; line="1 WCTDM/4/0 FXOKS"
signalling=fxo_ks
callerid="Channel 1" <4001>
mailbox=4001
group=0
context=from-internal
channel => 1

;;; line="2 WCTDM/4/1 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 2

;;; line="3 WCTDM/4/2 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 3

;;; line="4 WCTDM/4/3 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 4


; Span 2: WCT1/0 "Wildcard TE121 Card 0" 
group=2,20
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 5-19,21-35

PLEASE LET ME KNOW IF YOU NEED ANY OTHER DETAILS

What exactly are the messages from asterisk (cli) when trying a

As the channel is not loaded You should get some error-messages about when trying to load the module

I need help with this error

– Executing [931091062@localphones:1] Dial(“SIP/4192-00000001”, “DAHDI/g1/31091062,60”) in new stack
– Called DAHDI/g1/31091062
[May 15 09:56:05] NOTICE[15718]: chan_dahdi.c:4191 dahdi_r2_on_line_blocked: Far end blocked on chan 3
[May 15 09:56:13] WARNING[15785]: chan_dahdi.c:4166 dahdi_r2_write_log: Chan 1 - Seize Timeout Expired!
[May 15 09:56:13] ERROR[15785]: chan_dahdi.c:4169 dahdi_r2_write_log: Chan 1 - Protocol error. Reason = Seize Timeout, R2 State = Seize Transmitted, MF state = MF Engine Off, MF Group = Forward MF init, CAS = 0x08
DNIS = 31091062, ANI = 4192, MF = 0x20
[May 15 09:56:13] ERROR[15785]: chan_dahdi.c:3954 dahdi_r2_on_protocol_error: MFC/R2 protocol error on chan 1: Seize Timeout
– Hungup ‘DAHDI/1-1’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [931091062@localphones:2] Hangup(“SIP/4192-00000001”, “”) in new stack
== Spawn extension (localphones, 931091062, 2) exited non-zero on ‘SIP/4192-00000001’
[May 15 09:56:13] NOTICE[15718]: chan_dahdi.c:4200 dahdi_r2_on_line_idle: Far end unblocked on chan 3

my config

signalling=mfcr2
mfcr2_variant=br
mfcr2_get_ani_first=no
mfcr2_max_ani=20
mfcr2_max_dnis=4
mfcr2_category=national_subscriber
mfcr2_logdir=span1
mfcr2_call_files=yes
mfcr2_logging=all
mfcr2_mfback_timeout=-1
mfcr2_metering_pulse_timeout=-1
mfcr2_allow_collect_calls=yes
mfcr2_double_answer=no
mfcr2_immediate_accept=yes
mfcr2_forced_release=no
mfcr2_charge_calls=yes
language=pt_BR
echocancel=256
echocancelwhenbridged=no
context=e1
group=1
channel =>1-15

I appreciate any help