Incoming calls work, but outgoing calls don't work

I’m using Asterisk 1.6.0.3 and Dahdi 2.1.0.3. Internal calls and incoming calls are working just fine, but I get this error when trying to dial out:

== Using SIP RTP CoS mark 5
– Executing [94737385@numberplan-custom-1:1] Dial(“SIP/90-08ef2888”, ““DAHDI/G2”/1234567”) in new stack
[Jan 19 15:07:13] WARNING[13037]: app_dial.c:1502 dial_exec_full: Unable to create channel of type ‘DAHDI’ (cause 0 - Unknown)
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘SIP/90-08ef2888’ status is ‘CHANUNAVAIL’

Here is some config info:

[root@pbx ~]# cat /etc/asterisk/chan_dahdi.conf

[trunkgroups]

[channels]
switchtype=national
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=yes
;echotraining=128
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
signalling = fxs_ks
channel => 1,2,3,4

[root@pbx ~]# cat /etc/asterisk/extensions.conf

[general]
static = yes
writeprotect = no
clearglobalvars = no

[globals]
TRUNK = DAHDI/g1 ; Trunk interface
TRUNKMSD = 1 ; MSD digits to strip (usually 1 or 0)
exten => s,1,Goto(${ARG1},1)

[trunklocal]
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => 911,1,Dial(${GLOBAL(TRUNK)}/911)
exten => 9911,1,Dial(${GLOBAL(TRUNK)}/911)

Thanks for any insight you can offer.

Hooray! I found the problem. I needed to add a context line to my chan_dahdi.conf file:

context=DID_trunk_1

My DAHDI channels were setup with the DID_trunk_1 context. This line wasn’t in my old configuration when I was using zaptel and an older version of Asterisk, so one of those updates must have a new requirement for it.