Link to home
Start Free TrialLog in
Avatar of shkiti
shkiti

asked on

asterisk pbx-problem with fxs and fxo channels

hi
I have a TDM 400p with 3 fxs ports and one fxo
Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"

           1 WCTDM/0/0 FXOKS
           2 WCTDM/0/1 FXOKS
           3 WCTDM/0/2 FXOKS
           4 WCTDM/0/3 FXSKS
I did a
I get a error when I run the ztcfg -vv. I tried the modprobe zaptel
                                                                      modprobe wcfxs
                                                                      modprobe wcfxo

but still channel are not being registered I dont get dial tone on the phones , here is the error I get (fail on span 2)
[root@asterisk asterisk]# ztcfg -vv

Zaptel Configuration
======================

SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)
Channel 05: Clear channel (Default) (Slaves: 05)
Channel 06: Clear channel (Default) (Slaves: 06)
Channel 07: Clear channel (Default) (Slaves: 07)
Channel 08: Clear channel (Default) (Slaves: 08)
Channel 09: Clear channel (Default) (Slaves: 09)
Channel 10: Clear channel (Default) (Slaves: 10)
Channel 11: Clear channel (Default) (Slaves: 11)
Channel 12: Clear channel (Default) (Slaves: 12)
Channel 13: Clear channel (Default) (Slaves: 13)
Channel 14: Clear channel (Default) (Slaves: 14)
Channel 15: Clear channel (Default) (Slaves: 15)
Channel 16: Clear channel (Default) (Slaves: 16)
Channel 17: Clear channel (Default) (Slaves: 17)
Channel 18: Clear channel (Default) (Slaves: 18)
Channel 19: Clear channel (Default) (Slaves: 19)
Channel 20: Clear channel (Default) (Slaves: 20)
Channel 21: Clear channel (Default) (Slaves: 21)
Channel 22: Clear channel (Default) (Slaves: 22)
Channel 23: Clear channel (Default) (Slaves: 23)
Channel 24: Clear channel (Default) (Slaves: 24)
Channel 25: Clear channel (Default) (Slaves: 25)
Channel 26: Clear channel (Default) (Slaves: 26)
Channel 27: Clear channel (Default) (Slaves: 27)
Channel 28: D-channel (Default) (Slaves: 28)

28 channels configured.

ZT_SPANCONFIG failed on span 2: No such device or address (6)


I also got this from var/logs
[root@asterisk asterisk]# tail full
Jun 21 13:33:50 VERBOSE[4225] logger.c:  [chan_zap.so]Jun 21 13:33:50 VERBOSE[4225] logger.c:  [chan_zap.so] => (Zapata Telephony w/PRI)
Jun 21 13:33:50 VERBOSE[4225] logger.c:   == Parsing '/etc/asterisk/zapata.conf': Jun 21 13:33:50 VERBOSE[4225] logger.c:   == Parsing '/etc/asterisk/zapata.conf': Found
Jun 21 13:33:50 VERBOSE[4225] logger.c:   == Parsing '/etc/asterisk/zapata_additional.conf': Jun 21 13:33:50 VERBOSE[4225] logger.c:   == Parsing '/etc/asterisk/zapata_additional.conf': Found
Jun 21 13:33:50 VERBOSE[4225] logger.c:   == Parsing '/etc/asterisk/zapata_pri.conf': Jun 21 13:33:50 VERBOSE[4225] logger.c:   == Parsing '/etc/asterisk/zapata_pri.conf': Found
Jun 21 13:33:50 WARNING[4225] chan_zap.c: Unable to specify channel 1: No such device or address
Jun 21 13:33:50 ERROR[4225] chan_zap.c: Unable to open channel 1: No such device or address
here = 0, tmp->channel = 1, channel = 1
Jun 21 13:33:50 ERROR[4225] chan_zap.c: Unable to register channel '1'
Jun 21 13:33:50 WARNING[4225] loader.c: chan_zap.so: load_module failed, returning -1
Jun 21 13:33:50 WARNING[4225] loader.c: Loading module chan_zap.so failed!

thanks for ur help.
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you post the contents of the following files :-

/etc/sysconfig/zaptel
/etc/zaptel.conf
/etc/asterisk/zapata.conf
Avatar of shkiti
shkiti

ASKER

zaptel.conf
span=2,1,0,esf,b8zs
fxoks=1-3
fxsks=4
#e&m=5-28       #Use when trunk is CAS
bchan=5-27    #Use when trunk is PRI
dchan=28      #Use when trunk is PRI
loadzone = us
defaultzone=us

zapta.conf
Zapata telephony interface
;
; Configuration file
;
; You need to restart Asterisk to re-configure the Zap channel
; CLI> reload chan_zap.so
;               will reload the configuration file,
;               but not all configuration options are
;               re-configured during a reload.



[trunkgroups]
;trunkgroup => 1,24
;spanmap => 1,1,1

[channels]
#include zapata_additional.conf
language = en
;
rxwink=300              ; Atlas seems to use long (250ms) winks
;
;usedistinctiveringdetection=yes
;
usecallerid=yes
;
;cidsignalling=bell
;
;cidstart=ring
;
hidecallerid=yes
;
callwaiting=yes
;
;sendcalleridafter=1
;
callwaitingcallerid=yes
"zapata.conf" 153L, 2257C
threewaycalling=yes
;
transfer=yes
;
canpark=yes
;
cancallforward=no
;
callreturn=yes
;
;mailbox=1234
;
;mailbox=1234@context
;
echocancel=yes
;
echocancelwhenbridged=yes
;
;echotraining=yes
echotraining=800
;
;relaxdtmf=yes
;
rxgain=0.0
txgain=0.0
;
;group=1
;
;callgroup=1
;pickupgroup=1
;
immediate=no
;
;transfertobusy=no
;
;callerid=2564286000
;
;amaflags=default
;
;accountcode=lss0101
;
;adsi=yes
;
;busydetect=yes
;
;busycount=4
;
;answeronpolarityswitch=yes
;
;hanguponpolarityswitch=yes
;
;callprogress=yes
;progzone=us
;
;pulsedial=yes
;
;faxdetect=both
;faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no
;
;musiconhold=default
;
;idledial=6999
;idleext=6999@dialout
;minunused=2
;minidle=1
;
;jitterbuffers=4
;
;cadence=125,125,2000,-4000
;cadence=250,250,500,1000,250,250,500,-4000
;cadence=125,125,125,125,125,-4000
;cadence=1000,500,2500,-5000
;
; crv => 1:1
; crv => 2:1-2,5-8
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; FXS Channel Configuration      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
signalling=fxo_ks
group=1
context=outboundfxs
callerid=<(555) 907-4624>
channel => 1
callerid=<(555) 907-4625>
channel => 2
context=outboundfax
callerid=<(555) 907-4626>
channel => 3
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; FXO Channel Configuration      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
signalling=fxs_ks
group=2
context=default
channel => 4
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PRI Channel Configuration      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
#include zapata_pri.conf
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; CAS Channel Configuration      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;#include zapata_cas.conf


 from the error it Looks like the T1 card is not loaded at all.
Do you have a T1 card fitted? Which one?
You have the configuration for it but have not mentioned it before.

Do you have a /etc/sysconfig/zaptel configuration file?

Type 'lsmod' in linux and it will show which kernel modules are loaded.
Avatar of Member_2_1968385
It does appear that you have a T1 card alongside the TDM400P. It would help if you could confirm this (as already requested above).

If you do have a combination of digital plus analogue cards, it will probably be necessary to set the channel numbering (and to load the zaptel drivers) in the order:
1. Digital card first
2. Analogue card second

I found that this was the only order in which the two cards would load correctly when installed together. Unfortunately, it means your FXS and FXO ports will have channel numbers of 25 - 28. The Digium and Asterisk documentation does not cover the topic of mixed cards very well in my opinion. I had to solve that problem by trial and error. To change the load order it will be necessary to modify these files:
/etc/zaptel.conf
/etc/asterisk/zapata.conf

In addition you will need to change the sequence in which you issue the modprobe commands. If your zaptel drivers are automatically loaded by the script in /etc/init.d/zaptel, then you may need to change the line that defines the list of possible modules because this effects the load order.
Avatar of shkiti

ASKER

I do have a T1 card and a TDM400
how you load the zaptel drivers ?
in this script /etc.init.d/zaptel which line is the one that defines the list of modules?
is it this part?
# Source function library.
if [ $system = redhat ]; then
    . $initdir/functions || exit 0
fi

# Source zaptel configuration.
if [ $system = debian ]; then
    [ -f /etc/default/zaptel ] && . /etc/default/zaptel
elif [ $system = redhat ]; then
    [ -f /etc/sysconfig/zaptel ] && . /etc/sysconfig/zaptel
fi

if [ -z "${MODULES}" ]; then
        # Populate defaults if not present
        MODULES="tor2 wct4xxp wct1xxp wcte11xp wcfxo wctdm"
fi

RMODULES=""


could you give me more direction i tried to take the t1 card out and put back on, still does not detect the hardware.
thanks
What version of Linux are you using?

Can you tell us if either  /etc/default/zaptel or /etc/sysconfig/zaptel  exist and if they do post their contents.
Hi shkiti

1) The line in /etc/init.d/zaptel that I was referring to is this one:
  MODULES="tor2 wct4xxp wct1xxp wcte11xp wcfxo wctdm"

2) When I first built my Asterisk server, I always loaded the zaptel drivers manually using the following Linux commands in this order:
> modprobe wct2xxp
> modprobe wctdm

This loaded the drivers ok for my cards (a 2 port T1/E1 and a TDM400). However, these commands will probably only work if the drivers have not already being loaded automatically during bootup. I have never had any success with unloading/reloading zaptel drivers - it always required a reboot to fix once they were loaded incorrectly.

Once I was sure about the zaptel drivers loading ok manually, I then changed to automatic loading using the /etc/init.d/zaptel file. I added the following line in this file to duplicate the manual commands:
MODULES="wct2xxp wctdm"
(this line is added just before the line RMODULES="")

I am not an experienced Linux user - first started about 6 months ago - so you should answer the questions asked by grblades. He may know a better solution than I do. As I said, I played around and by trial and error found that the digital card must be loaded first and must use the lower range of channel numbers, but maybe there is a way to get them to load in the other order and I just don't know it.
Avatar of shkiti

ASKER

this is contets of /etc/default/zaptel
TELEPHONY=yes
#DEBUG=yes

# Un-comment as per your requirements; modules to load/unload
#Module Name                      Hardware
MODULES="$MODULES tor2"         # T400P - Quad Span T1 Card
                                # E400P - Quad Span E1 Card

MODULES="$MODULES wct4xxp"      # TE405P - Quad Span T1/E1 Card (5v version)
                                # TE410P - Quad Span T1/E1 Card (3.3v version)

MODULES="$MODULES wct1xxp"      # T100P - Single Span T1 Card
                                # E100P - Single Span E1 Card

MODULES="$MODULES wcte11xp"     # TE110P - Single Span T1/E1 Card

MODULES="$MODULES wcfxo"        # X100P - Single port FXO interface
                                # X101P - Single port FXO interface

MODULES="$MODULES wctdm"        # TDM400P - Modular FXS/FXO interface (1-4 ports)
#MODULES="$MODULES wcfxs"       # either above or this

MODULES="$MODULES wcusb"        # S100U - Single port FXS USB Interface
#MODULES="$MODULES wcfxsusb"    # either above or this

#MODULES="$MODULES torisa"      # Old Tormenta1 ISA Card

#MODULES="$MODULES ztdummy"     # UHCI USB Zaptel Timing Only Interface

~
this what is in /etc/sysconfig/zaptel
TELEPHONY=yes
#DEBUG=yes

# Un-comment as per your requirements; modules to load/unload
#Module Name                      Hardware
MODULES="$MODULES tor2"         # T400P - Quad Span T1 Card
                                # E400P - Quad Span E1 Card

MODULES="$MODULES wct4xxp"      # TE405P - Quad Span T1/E1 Card (5v version)
                                # TE410P - Quad Span T1/E1 Card (3.3v version)

MODULES="$MODULES wct1xxp"      # T100P - Single Span T1 Card
                                # E100P - Single Span E1 Card

MODULES="$MODULES wcte11xp"     # TE110P - Single Span T1/E1 Card

MODULES="$MODULES wcfxo"        # X100P - Single port FXO interface
                                # X101P - Single port FXO interface

MODULES="$MODULES wctdm"        # TDM400P - Modular FXS/FXO interface (1-4 ports)
#MODULES="$MODULES wcfxs"       # either above or this

MODULES="$MODULES wcusb"        # S100U - Single port FXS USB Interface
#MODULES="$MODULES wcfxsusb"    # either above or this

#MODULES="$MODULES torisa"      # Old Tormenta1 ISA Card

#MODULES="$MODULES ztdummy"     # UHCI USB Zaptel Timing Only Interface

~
both look pretty much the same.
I think the linux version is 2.6. what is the command to check that?  tried ver, version didnt work.
thanks
Its strange that you have both files. Are you running debian or Redhat (Fedora) Linux?
Depending on which distribution of linux you are running will depend which of the two files are actually used.

Can you enter the command 'lsmod' from the linux command line to show what modules are loaded.

To get the linux version you can check the version of the kernel using 'rpm -q kernel'.

Shkiti,
Have you tried to get the Asterisk server working with just one card installed?
It is often easier to solve problems like this if you start with a simple case and gradually increase the complexity, rather than starting with the "fully loaded" version.

What board are you using for the T1 connection?

BTW, this command is an alternative to find out what version of Linux is running:
> cat /proc/version
Avatar of shkiti

ASKER

I started from scratch, installed Fedora 5, then obtained the Asterisk source code from ftp to get the (zaptel,libpri, asterisk, asterisk-sounds) directories, now iam trying to compile zaptel by doing a make clean and make install where I get this error messages:
[root@localhost zaptel-1.2.6]# make clean
rm -f torisatool makefw tor2fw.h radfw.h
rm -f ztcfg torisatool makefw ztmonitor ztspeed zttool zttest fxotune
rm -f *.o ztcfg tzdriver sethdlc sethdlc-new
rm -f zonedata.lo tonezone.lo libtonezone.so *.lo
make -C /lib/modules/2.6.15-1.2054_FC5smp/build SUBDIRS=/usr/src/zaptel-1.2.6 clean
make: *** /lib/modules/2.6.15-1.2054_FC5smp/build: No such file or directory.  Stop.
make: *** [clean] Error 2

however this file is available
here is
[root@localhost modules]# ls
2.6.15-1.2054_FC5smp

and when I do
Make install I get the error below.
You do not appear to have the sources for the 2.6.15-1.2054_FC5smp kernel installed.
make: *** [linux26] Error 1

thanks
ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shkiti

ASKER

yeah, had to do a
yum install kernel
yum install kernel-devel
it basically resolved the brocken link error I was getting.
thanks for the help