Can't place outgoing call

I’m having trouble placing an outgoing call. I keep getting all circuits are busy.

I’m using a Rhino RCB24FXX to interface with the T1 box from our ISP and X-Lite as a SIP device. I’ve successfully done SIP phone to SIP phone internally, but I can’t seem to get out.

I set up asterisk through freePBX and the only things I changed were the maximum channels on the trunk and added the dial patterns from the insert dropdown.

zaptel.conf:

loadzone = us defaultzone = us fxsks = 1-4 fxols = 5-20

asterisk/zapata.conf:

[code][trunkgroups]

[channels]
signalling=fxs_ks
context=from-pstn
channel => 1-4
group=0

language=en
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

faxdetect=both
[/code]

cat /proc/zaptel/*:

           1 FXO/1/0 FXSKS
           2 FXO/1/1 FXSKS
           3 FXO/1/2 FXSKS
           4 FXO/1/3 FXSKS
           5 FXS/1/4 FXOLS
           6 FXS/1/5 FXOLS
           7 FXS/1/6 FXOLS
           8 FXS/1/7 FXOLS
           9 ---/1/8 FXOLS
          10 ---/1/9 FXOLS
          11 ---/1/10 FXOLS
          12 ---/1/11 FXOLS
          13 ---/1/12 FXOLS
          14 ---/1/13 FXOLS
          15 ---/1/14 FXOLS
          16 ---/1/15 FXOLS
          17 ---/1/16 FXOLS
          18 ---/1/17 FXOLS
          19 ---/1/18 FXOLS
          20 ---/1/19 FXOLS
          21 ---/1/20
          22 ---/1/21
          23 ---/1/22
          24 ---/1/23

Stack trace from asterisk:

[code] == Parsing ‘/etc/asterisk/asterisk.conf’: Found
== Parsing ‘/etc/asterisk/extconfig.conf’: Found
Asterisk 1.2.17 svn rev %{svnrev}, Copyright © 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘show license’ for details.

Connected to Asterisk 1.2.17 svn rev %{svnrev} currently running on asterisk1 (pid = 4335)
Verbosity is at least 9
– Executing Macro(“SIP/201-08ce99d0”, “dialout-trunk|1|9135472963|”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_TRUNK=1”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “_NODEST=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_NUMBER=9135472963”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “ROUTE_PASSWD=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?noauth”) in new stack
– Goto (macro-dialout-trunk,s,8)
– Executing Set(“SIP/201-08ce99d0”, “GROUP()=OUT_1”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “user-callerid|SKIPTTL”) in new stack
– Executing NoOp(“SIP/201-08ce99d0”, “user-callerid: device 201”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?report”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?start”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “REALCALLERIDNUM=201”) in new stack
– Executing NoOp(“SIP/201-08ce99d0”, “REALCALLERIDNUM is 201”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “AMPUSER=201”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “AMPUSERCIDNAME=Kevin”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?report”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “CALLERID(all)=Kevin <201>”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “REALCALLERIDNUM=201”) in new stack
– Executing NoOp(“SIP/201-08ce99d0”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,21)
– Executing NoOp(“SIP/201-08ce99d0”, “Using CallerID “Kevin” <201>”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “record-enable|201|OUT”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing DeadAGI(“SIP/201-08ce99d0”, “recordingcheck|20070428-132822|1177784902.8”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20070428-132822|1177784902.8: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/201-08ce99d0”, “No recording needed”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?skipoutcid”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “outbound-callerid|1”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing NoOp(“SIP/201-08ce99d0”, “REALCALLERIDNUM is 201”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing Set(“SIP/201-08ce99d0”, “USEROUTCID=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “EMERGENCYCID=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “TRUNKOUTCID=”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,16)
– Executing GotoIf(“SIP/201-08ce99d0”, “1?usercid”) in new stack
– Goto (macro-outbound-callerid,s,18)
– Executing GotoIf(“SIP/201-08ce99d0”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing NoOp(“SIP/201-08ce99d0”, “CallerID set to “Kevin” <201>”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,16)
– Executing DeadAGI(“SIP/201-08ce99d0”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing Set(“SIP/201-08ce99d0”, “OUTNUM=9135472963”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “custom=ZAP/g0”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?customtrunk”) in new stack
– Executing Dial(“SIP/201-08ce99d0”, “ZAP/g0/9135472963|300|”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing Goto(“SIP/201-08ce99d0”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing NoOp(“SIP/201-08ce99d0”, “Dial failed due to CHANUNAVAIL - failing through to other trunks”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “outisbusy|”) in new stack
– Executing Playback(“SIP/201-08ce99d0”, “all-circuits-busy-now|noanswer”) in new stack
– Playing ‘all-circuits-busy-now’ (language ‘en’)
– Executing Playback(“SIP/201-08ce99d0”, “pls-try-call-later|noanswer”) in new stack
– Playing ‘pls-try-call-later’ (language ‘en’)
– Executing Macro(“SIP/201-08ce99d0”, “hangupcall”) in new stack
– Executing ResetCDR(“SIP/201-08ce99d0”, “w”) in new stack
– Executing NoCDR(“SIP/201-08ce99d0”, “”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing GotoIf(“SIP/201-08ce99d0”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing Wait(“SIP/201-08ce99d0”, “5”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-08ce99d0’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-08ce99d0’ in macro ‘outisbusy’
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-08ce99d0’
– Executing Macro(“SIP/201-08ce99d0”, “dialout-trunk|1|19135472963|”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_TRUNK=1”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “_NODEST=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_NUMBER=19135472963”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “ROUTE_PASSWD=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?noauth”) in new stack
– Goto (macro-dialout-trunk,s,8)
– Executing Set(“SIP/201-08ce99d0”, “GROUP()=OUT_1”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “user-callerid|SKIPTTL”) in new stack
– Executing NoOp(“SIP/201-08ce99d0”, “user-callerid: device 201”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?report”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?start”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “REALCALLERIDNUM=201”) in new stack
– Executing NoOp(“SIP/201-08ce99d0”, “REALCALLERIDNUM is 201”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “AMPUSER=201”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “AMPUSERCIDNAME=Kevin”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?report”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “CALLERID(all)=Kevin <201>”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “REALCALLERIDNUM=201”) in new stack
– Executing NoOp(“SIP/201-08ce99d0”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,21)
– Executing NoOp(“SIP/201-08ce99d0”, “Using CallerID “Kevin” <201>”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “record-enable|201|OUT”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing DeadAGI(“SIP/201-08ce99d0”, “recordingcheck|20070428-132840|1177784920.9”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20070428-132840|1177784920.9: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing NoOp(“SIP/201-08ce99d0”, “No recording needed”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?skipoutcid”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “outbound-callerid|1”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,3)
– Executing NoOp(“SIP/201-08ce99d0”, “REALCALLERIDNUM is 201”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,9)
– Executing Set(“SIP/201-08ce99d0”, “USEROUTCID=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “EMERGENCYCID=”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “TRUNKOUTCID=”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,16)
– Executing GotoIf(“SIP/201-08ce99d0”, “1?usercid”) in new stack
– Goto (macro-outbound-callerid,s,18)
– Executing GotoIf(“SIP/201-08ce99d0”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing NoOp(“SIP/201-08ce99d0”, “CallerID set to “Kevin” <201>”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,16)
– Executing DeadAGI(“SIP/201-08ce99d0”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing Set(“SIP/201-08ce99d0”, “OUTNUM=19135472963”) in new stack
– Executing Set(“SIP/201-08ce99d0”, “custom=ZAP/g0”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “0?customtrunk”) in new stack
– Executing Dial(“SIP/201-08ce99d0”, “ZAP/g0/19135472963|300|”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing Goto(“SIP/201-08ce99d0”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing NoOp(“SIP/201-08ce99d0”, “Dial failed due to CHANUNAVAIL - failing through to other trunks”) in new stack
– Executing Macro(“SIP/201-08ce99d0”, “outisbusy|”) in new stack
– Executing Playback(“SIP/201-08ce99d0”, “all-circuits-busy-now|noanswer”) in new stack
– Playing ‘all-circuits-busy-now’ (language ‘en’)
– Executing Playback(“SIP/201-08ce99d0”, “pls-try-call-later|noanswer”) in new stack
– Playing ‘pls-try-call-later’ (language ‘en’)
– Executing Macro(“SIP/201-08ce99d0”, “hangupcall”) in new stack
– Executing ResetCDR(“SIP/201-08ce99d0”, “w”) in new stack
– Executing NoCDR(“SIP/201-08ce99d0”, “”) in new stack
– Executing GotoIf(“SIP/201-08ce99d0”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing GotoIf(“SIP/201-08ce99d0”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing Wait(“SIP/201-08ce99d0”, “5”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-08ce99d0’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-08ce99d0’ in macro ‘outisbusy’
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/201-08ce99d0’
[/code]

Edit: Moved group above and now I get call established, but it still doesn’t go through. So it’s down to two things, either wiring or possibly since we have call forwarding to a cell phone on one of our numbers it’s not going through.

Removing channel 1 made it work. However, now I have an analog phone hooked up to channel 6 but it doesn’t get a dialtone.

I added this to my zapata.conf:
signalling=fxo_ls
context=from-zaptel
group=0
channel => 6

and added a zap extension with settings:
Display Name: Server Room
channel: 6
context: from-zaptel
immediate: no
signalling: fxo_ls
echocancel: yes
echocancelwhenbridged: no
echotraining: 800
busydetect: no
busycount: 7
callprogress: no
dial: ZAP/6