Dahdi show channel 1 Unable to find given channel 1

What does exactly dahdi show channel 1 Unable to find given channel 1 means when dahdi_cfg -vvvvvvvvvvvvvv returns this
DAHDI Tools Version - 2.7.0

DAHDI Version: 2.7.0
Echo Canceller(s): HWEC
Configuration

Channel map:

Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 07)
Channel 08: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 08)

8 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Setting echocan for channel 5 to mg2
Setting echocan for channel 6 to mg2
Setting echocan for channel 7 to mg2
Setting echocan for channel 8 to mg2

just don’t get it, the dadhi drivers were installed properly right

and what does

dahdi show channels

return ?

dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State Description
pseudo default default In Service

That is why, there are no channels in Asterisk, You should run dahdi_cfg when asterisk is not running and make sure your /etc/asterisk/dahdi files are mapping the channels corrrectly

ok, let see, I stopped asterisk by “core stop now” at the CI, riht? and ran dahdi_cfg -vvvvvvvvvvvvvv, that returned

DAHDI Tools Version - 2.7.0

DAHDI Version: 2.7.0
Echo Canceller(s): HWEC
Configuration

Channel map:

Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 07)
Channel 08: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 08)

8 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Setting echocan for channel 5 to mg2
Setting echocan for channel 6 to mg2
Setting echocan for channel 7 to mg2
Setting echocan for channel 8 to mg2

and checked all the dadhi files starting with dahdi-channels.conf, it contains:

Autogenerated by /usr/sbin/dahdi_genconf on Wed Sep 25 04:28:46 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/0 “Wildcard AEX800” (MASTER)
;;; line="1 WCTDM/0/0 FXOKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxo_ks
callerid=“Channel 1” <4001>
mailbox=4001
group=5
context=from-internal
channel => 1
callerid=
mailbox=
group=
context=default

;;; line="2 WCTDM/0/1 FXOKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxo_ks
callerid=“Channel 2” <4002>
mailbox=4002
group=5
context=from-internal
channel => 2
callerid=
mailbox=
group=
context=default

;;; line="3 WCTDM/0/2 FXOKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxo_ks
callerid=“Channel 3” <4003>
mailbox=4003
group=5
context=from-internal
channel => 3
callerid=
mailbox=
group=
context=default

;;; line="4 WCTDM/0/3 FXOKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxo_ks
callerid=“Channel 4” <4004>
mailbox=4004
group=5
context=from-internal
channel => 4
callerid=
mailbox=
group=
context=default

;;; line="5 WCTDM/0/4 FXSKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 5
callerid=
group=
context=default

;;; line="6 WCTDM/0/5 FXSKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 6
callerid=
group=
context=default

;;; line="7 WCTDM/0/6 FXSKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 7
callerid=
group=
context=default

;;; line="8 WCTDM/0/7 FXSKS (EC: VPMOCT032 - INACTIVE)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 8
callerid=
group=
context=default

there is a dahdi-channels.conf.bak file, do i need it?

chan_dahdi.conf is lil bit longer file and I guess I could spend the all weekend reading it and never realize if it is mapping my channels or not, nevertheless there is a line that describes something like this, isn’t that line enough for mapping my channels:

; ---------------- END of options to be used with signalling=mfcr2

; Configuration Sections
; ~~~~~~~~~~~~~~~~~~~~~~
; You can also configure channels in a separate chan_dahdi.conf section. In
; this case the keyword ‘channel’ is not used. Instead the keyword
; ‘dahdichan’ is used (as in users.conf) - configuration is only processed
; in a section where the keyword dahdichan is used. It will only be
; processed in the end of the section. Thus the following section:
;
;[phones]
;echocancel = 64
;dahdichan = 1-8
;group = 1
;
; Is somewhat equivalent to the following snippet in the section
; [channels]:
;
;echocancel = 64
;group = 1
;channel => 1-8

;# Flash Operator Panel will parse this file for dahdi trunk buttons
;# AMPLABEL will be used for the display labels on the buttons

;# %c Dahdi Channel number
;# %n Line number
;# %N Line number, but restart counter
;# Example:
;# ;AMPLABEL:Channel %c - Button %n

;# For Dahdi/* buttons use the following
;# (where x=number of buttons to dislpay)
;# ;AMPWILDCARDLABEL(x):MyLabel

[channels]
language=en

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

; XTDM20B Port #1,2 plugged into PSTN
;AMPLABEL:Channel %c - Button %n
context=from-pstn
signalling=fxs_ks
faxdetect=incoming
usecallerid=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
group=0
channel=1-2

and it is commented out in the chan_dahdi.conf.template file.
anything to do with my issue?

Your chan_dadhi.conf file looks suspicious. Does it include dahdi_channels.conf?

Noup, none of the lines in chan_dadhi.conf declare anything about dahdi_channels.conf.
Does it has to be included

Asterisk looks for chan_dahdi.conf to load dahdi, so yes!

How did you install your system, because most recipes will cover that.

Debian wheezy 7.0.1 64 bit

1-apt-get update

2- apt-get install -y build-essential linux-headers-uname -r openssh-server apache2 mysql-server mysql-client libgnutls26 bison flex php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient15-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git subversion

3- cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

4-tar xvfz dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-2.6.1+2.6.1
make all
make install
make config

5-cd /usr/src
tar xvfz libpri-1.4-current.tar.gz
cd libpri-1.4.14
make
make install

6-cd /usr/src
tar xvfz asterisk-11-current.tar.gz
cd asterisk-11.4.0
./configure
make menuselect
make
make install
make config

7-tar xvfz asterisk-extra-sounds-en-gsm-current.tar.gz
rm asterisk-extra-sounds-en-gsm-current.tar.gz

8-cd /usr/src/
tar xvfz freepbx-2.11.0.tar.gz

9-sed -i “s/(upload_max_filesize *= )(.)/\120M/” /etc/php5/apache2/php.ini
sed -i “s/(memory_limit *= )(.)/\1100M/” /etc/php5/apache2/php.ini

10-groupadd asterisk
useradd -c “asterisk PBX” -d /var/lib/asterisk -g asterisk asterisk

11-mysql -u root -p
Enter password:
mysql> create database asteriskcdrdb;
mysql> create database asterisk;
mysql> GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO [email protected] IDENTIFIED BY ‘amp109’;
mysql> GRANT ALL PRIVILEGES ON asterisk.* TO [email protected] IDENTIFIED BY ‘amp109’;
mysql> quit;

12-mysql -u asteriskuser -pamp109 asteriskcdrdb < /usr/src/freepbx-2.11.0/SQL/cdr_mysql_table.sql
mysql -u asteriskuser -pamp109 asterisk < /usr/src/freepbx-2.9.0/SQL/newinstall.sql

13-mv /etc/asterisk/sip_notify.conf /etc/asterisk/sip_notify.conf.backup
/usr/src/freepbx-2.11.0/start_asterisk start
/usr/src/freepbx-2.11.0/install_amp

14-cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf-orig
sed -i “s/(^User )(.)/\1asterisk/” /etc/apache2/apache2.conf
sed -i “s/(^Group )(.)/\1asterisk/” /etc/apache2/apache2.conf
/etc/init.d/apache2 stop
/etc/init.d/apache2 start

15-reboot

16-asterisk -rvvvvvvv

is there anything wrong in that process??

Who knows, you chose to do it. You will need to develop your diagnostic skills if you go rogue.

I just added this two lines at the end of chan_dahdi.conf and voilaa:

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