Hello,
I’m trying to install my first Digium card (model TE220B). I downloaded the Zaptel source code (zaptel-1.4.4) and compiled it. Some warnings appeared about deprecated code (looks to be deprecated code in the linux kernel -2.6.22-, not in the Zaptel drive itself).:
warning: 'deprecated_irq_flag' is deprecated (declared at include/linux/interrupt.h:66)
Another more important warning was a complain about implicit declaration of pci_module_init:
wcte12xp.c:2015: warning: implicit declaration of function 'pci_module_init'
I searched throught the linux kernel source and found not such declatarion which made me think something was really wrong.
Still the kernel modules (*ko) were generated and properlly installed.
Then I configured /etc/zaptel.conf and /etc/asterisk/zapata.conf. Started Asterisk and … nothing. When “starting” the module the flashing “red light” in the card changed to green, but that’s all. Then conecting to Asterisk:
~> asterisk -r
Connected to Asterisk 1.4.11 currently running on LaPantoja (pid = 20796)
LaPantoja*CLI> zap restart
[Aug 24 12:21:12] WARNING[20828]: chan_zap.c:903 zt_open: Unable to specify channel 1: Device or resource busy
[Aug 24 12:21:12] ERROR[20828]: chan_zap.c:7160 mkintf: Unable to open channel 1: Device or resource busy
here = 0, tmp->channel = 1, channel = 1
[Aug 24 12:21:12] ERROR[20828]: chan_zap.c:10466 build_channels: Unable to register channel '1-15'
[Aug 24 12:21:12] WARNING[20828]: chan_zap.c:9764 zap_restart: Reload channels from zap config failed!
The most curious is that if I try a second time:
LaPantoja*CLI> zap restart
[Aug 24 12:30:48] ERROR[20838]: chan_zap.c:9355 start_pri: Unable to open D-channel 16 (Device or resource busy)
[Aug 24 12:30:48] ERROR[20838]: chan_zap.c:11266 setup_zap: Unable to start D-channel on span 1
[Aug 24 12:30:48] WARNING[20838]: chan_zap.c:9764 zap_restart: Reload channels from zap config failed!
The error is different and asterisk CPU ussage grows up to 100% until I restart it (I think this is a “marginal” bug in Asterisk, isn’t it?).
Thanks in advance for any help, hint or link!
Regards!
Enrique
More info about the issue.
I “rolled back” to a kernel 2.6.18 and the compiling warnings dissapeared. Still when I try to make a
LaPantoja*CLI> zap restart
[Aug 24 14:42:18] WARNING[2442]: chan_zap.c:903 zt_open: Unable to specify channel 1: Device or resource busy
[Aug 24 14:42:18] ERROR[2442]: chan_zap.c:7160 mkintf: Unable to open channel 1: Device or resource busy
here = 0, tmp->channel = 1, channel = 1
[Aug 24 14:42:18] ERROR[2442]: chan_zap.c:10466 build_channels: Unable to register channel '1-15'
[Aug 24 14:42:18] WARNING[2442]: chan_zap.c:9764 zap_restart: Reload channels from zap config failed!
LaPantoja*CLI>
I got sure everyone had permissions to access /dev/zap/1 (2,…) still I get the “Device or resource busy”.
Just for curiosity I tried:
~> cat /dev/zap/1
LaPantoja:/usr/src/zaptel-1.4.4# cat /dev/zap/1
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
...
???
Completly lost at this moment
Are you starting zaptel before starting Asterisk? Also since you are on Asterisk 1.4 I would suggest staying with Zaptel 1.4. Try the latest release of zaptel (as of now 1.4.5.1)
Hi,
I’ve only used Digium analog cards so I am not at all sure of this, but do you also need ‘libpri’ to work with the TE220?
It’s a T1/E1 card and I believe that’s what libpri supports.
Info from Asterisk download page;
asterisk.org/downloads
Are you sure you have a proper kernel. New Digium hardware needs a very recent kernel. You shoul check the manual on this.
If you have problems with getting a Digium card up and running Digium will help you with this, the support is part of the deal (afaik)
Thanks all for your help.
I continued the testing. Looks like zaptel was actually working but it just breaks when doing a “zap restart”.
I connect to the asterisk console and switched-on pri debug span 1.
Then I can see the call arrives and is detected by the hardware:
< Protocol Discriminator: Q.931 (8) len=41
< Call Ref: len= 2 (reference 14719/0x397F) (Originator)
< Message type: SETUP (5)
< [a1]
< Sending Complete (len= 1)
< [04 03 80 90 a3]
< Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
< Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
< Ext: 1 User information layer 1: A-Law (35)
< [18 03 a1 83 81]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Preferred Dchan: 0
< ChanSel: Reserved
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 1 ]
< [6c 0b 21 83 39 31 35 36 33 37 37 37 37]
< Calling Number (len=13) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
< Presentation: Presentation allowed of network provided number (3) '91XXXXXXX' ]
< [70 0a a1 39 31 32 37 30 37 32 30 39]
< Called Number (len=12) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) '91XXXXXXX' ]
-- Making new call for cr 14719
-- Processing Q.931 Call Setup
-- Processing IE 161 (cs0, Sending Complete)
-- Processing IE 4 (cs0, Bearer Capability)
-- Processing IE 24 (cs0, Channel Identification)
-- Processing IE 108 (cs0, Calling Party Number)
-- Processing IE 112 (cs0, Called Party Number)
q931.c:3296 q931_receive: call 14719 on channel 1 enters state 6 (Call Present)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Call Present, peerstate Call Initiated
q931.c:2891 q931_release_complete: call 14719 on channel 1 enters state 0 (Null)
> Protocol Discriminator: Q.931 (8) len=9
> Call Ref: len= 2 (reference 14719/0x397F) (Terminator)
> Message type: RELEASE COMPLETE (90)
> [08 02 81 81]
> Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
> Ext: 1 Cause: Unallocated (unassigned) number (1), class = Normal Event (0) ]
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
The “Unallocated (unassigned) number” originates in libpri:
LaPantoja:/usr/lib# strings libpri.so | grep "Unallocated"
Unallocated (unassigned) number
zapata.conf point to “default” context and default context defines Ext 1:
LaPantoja*CLI> dialplan show default
[ Context 'default' created by 'pbx_config' ]
'1' => 1. Answer() [pbx_config]
2. Playback(demo-echotest) [pbx_config]
3. Echo() [pbx_config]
4. Playback(demo-echodone) [pbx_config]
5. Hangup() [pbx_config]
'600' => 1. Answer() [pbx_config]
2. Playback(demo-echotest) [pbx_config]
3. Echo() [pbx_config]
4. Playback(demo-echodone) [pbx_config]
5. Hangup() [pbx_config]
's' => 1. Answer() [pbx_config]
2. Playback(demo-echotest) [pbx_config]
3. Echo() [pbx_config]
4. Playback(demo-echodone) [pbx_config]
5. Hangup() [pbx_config]
Include => 'demo' [pbx_config]
-= 3 extensions (15 priorities) in 1 context. =-
Does anyone knows how to interpret the error?
Thanks you!