Need Help Converting from Zaptel to Dahdi

My setup is:

Asterisk-1.6.0.9
dahdi-linux-complete-current
Okay now don’t laugh guys, an X101P analog PCI card connected to the PSTN jack in my house.

This must be one of the good X101P cards because in almost 3 years, I’ve never had a problem with it. It makes and receives calls without a hitch.

I only switched over to Linux last night and was using zaptel on FreeBSD. Everything seems to be working well but I could use a little help with my extension for the old ZAP channel. How would I replace this in my extension.conf for use with dahdi:

[outbound-local]
exten => _9NXXNXXXXXX,1,Set(CALLERID(all)=${MCallerID})
exten => _9NXXNXXXXXX,n,Dial(Zap/1/${EXTEN:1})
exten => _9NXXNXXXXXX,n,Congestion()

Dahdi is obviously seeing the X101P Wildcard and seems ready to use it. When I want to use the PSTN I dial 9 first and then the number. This worked well under zaptel. Any advice would be appreciated.

exten => _9NXXNXXXXXX,n,Dial(Dahdi/1/${EXTEN:1})

if you have all settings in dahdi.conf you can just change Zap to Dahdi

I’m getting this error message when I try to make an outbound call.

WARNING[2664] app_dial.c: Unable to create channel of type ‘DAHDI’ (cause 0 - Unknown)

Dahdi seems to be working and dahdi_scan, dahdi_test recongize the X101P Wildcard that’s in my server.

dahdi_scan produces this output

[1]
active=yes
alarms=OK
description=Wildcard X101P Board 1
name=WCFXO/0
manufacturer=Digium
devicetype=Wildcard X101P
location=PCI Bus 02 Slot 13
basechan=1
totchans=1
irq=17
type=analog
port=1,FXO

Here is my /etc/dahdi/system.conf file

fxsks=1
loadzone=us
defaultzone=us

/etc/asterisk/chan_dahdi file looks like this

;
; DAHDI telephony
;
; Configuration file
;
[trunkgroups]

[channels]
language=en
context=deluxe
signalling=fxs_ks
channel=>1
disconnectsupervision=yes
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
threewaycalling=no
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
transfer=yes
echocancel=yes
echotraining=yes
echocancelwhenbridged=yes
cancallforward=yes
callreturn=yes
immediate=no
group=1
echocancel=yes
group=1
callgroup=1
pickupgroup=1
; -----------------------------------------------------------------------

Okay, somone told me that the line:

channel=>1

in my /etc/asterisk/chan_dahdi file was causing everything below it to be ignored. I wasn’t aware of this and rearranged the line so it’s at the bottom of the file. Then from a remote location via ssh I restarted asterisk and did a console dial to my cell phone. And viola, it worked. I then tried to call the asterisk box from this remote location but it would not answer. Here is what was on the CLI screen:

[Apr 15 08:59:32] WARNING[8057]: pbx.c:3080 pbx_extension_helper: No application ‘Wait,20’ for extension (deluxe, s, 1)
== Spawn extension (deluxe, s, 1) exited non-zero on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’

The extension.conf file I’m using is the exact copy of what I was using under Asterisk-1.4.21 with zaptel. I’m not sure what this means but is it trying to tell me the “Wait” command is not valid?

Here is part of my extensions.conf file which answers incoming calls:

[incoming]
exten => s,1,Wait,20 ; Wait 20 seconds
exten => s,n,Answer() ; Answer the call
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=7) ; Set Response Timeout to 10 seconds
exten => s,n(restart),BackGround(mywelcome) ; Play the initial welcome message
exten => s,n,WaitExten(7) ; Wait for an extension to be dialed.
exten => s,n,Voicemail(210@default,u) ; Send Caller to Voicemail

Any advice would be appreciated.

I found most of my problems and resolved them thanks to the team at #asterisk on Freenode IRC. Some of the issues I’m finding are with old syntax left from 1.4 version of my conf files. Wish the guys at Digium would stop changing syntax. Programs like Asterisk with no real support or documentation are hard enough to keep up without making a moving target out of the commands.

I’m pleased thus far with Asterisk on Linux. FreeBSD just made it too hard to keep in step.