TE122 E1 PRI inbound OK / outbound ERROR

Hi All – I’m trying to configure the following:

FreePBX 2.5.2.2
Asterisk 1.4.26.2
Digium Wildcard TE122 connected to E1 PRI

After several hours of playing around I’ve managed to get the PRI up and talking correctly. DID works fine and the test range of extensions I’ve configured are able to dial amongst themselves. The issue I’m experiencing is with dialing OUT from the system to the PSTN, which generates an ‘All circuits are busy now, please try your call again later’.

Console output produces the following with -vvvvvvvv:

— BEGIN CONSOLE OUTPUT —
– Executing [92115500@from-internal:1] Macro(“SIP/500-0a033bf8”, “user-callerid|SKIPTTL|”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/500-0a033bf8”, “AMPUSER=500”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/500-0a033bf8”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/500-0a033bf8”, “1|Set|REALCALLERIDNUM=500”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/500-0a033bf8”, “AMPUSER=500”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/500-0a033bf8”, “AMPUSERCIDNAME=Ext 500”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/500-0a033bf8”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/500-0a033bf8”, “AMPUSERCID=500”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/500-0a033bf8”, “CALLERID(all)=“Ext 500” <500>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/500-0a033bf8”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [s@macro-user-callerid:18] NoOp(“SIP/500-0a033bf8”, “Using CallerID “Ext 500” <500>”) in new stack
– Executing [92115500@from-internal:2] Set(“SIP/500-0a033bf8”, “_NODEST=”) in new stack
– Executing [92115500@from-internal:3] Macro(“SIP/500-0a033bf8”, “record-enable|500|OUT|”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/500-0a033bf8”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/500-0a033bf8”, “recordingcheck|20090924-014924|1253720964.3”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20090924-014924|1253720964.3: Outbound recording not enabled
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“SIP/500-0a033bf8”, “”) in new stack
– Executing [92115500@from-internal:4] Macro(“SIP/500-0a033bf8”, “dialout-trunk|1|92115500||”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/500-0a033bf8”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/500-0a033bf8”, “0?sub-pincheck|s|1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/500-0a033bf8”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/500-0a033bf8”, “DIAL_NUMBER=92115500”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/500-0a033bf8”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/500-0a033bf8”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/500-0a033bf8”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/500-0a033bf8”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/500-0a033bf8”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/500-0a033bf8”, “outbound-callerid|1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/500-0a033bf8”, “0|SetCallerPres|”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/500-0a033bf8”, “0|Set|REALCALLERIDNUM=500”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/500-0a033bf8”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/500-0a033bf8”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/500-0a033bf8”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/500-0a033bf8”, “TRUNKOUTCID=0386623000”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/500-0a033bf8”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/500-0a033bf8”, “1|Set|CALLERID(all)=0386623000”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/500-0a033bf8”, “0|Set|CALLERID(all)=”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/500-0a033bf8”, “0|SetCallerPres|prohib_passed_screen”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/500-0a033bf8”, “1|AGI|fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern XXXXXXXXXX
> fixlocalprefix: Using pattern XXXXXXXX
== fixlocalprefix: Dialpattern XXXXXXXX matched. 92115500 -> 92115500
– AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/500-0a033bf8”, “OUTNUM=92115500”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/500-0a033bf8”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/500-0a033bf8”, “0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/500-0a033bf8”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/500-0a033bf8”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/500-0a033bf8”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/500-0a033bf8”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/500-0a033bf8”, “DAHDI/g0/92115500|300|”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:20] Goto(“SIP/500-0a033bf8”, “s-CHANUNAVAIL|1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf(“SIP/500-0a033bf8”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp(“SIP/500-0a033bf8”, “TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 66) - failing through to other trunks”) in new stack
– Executing [92115500@from-internal:5] Macro(“SIP/500-0a033bf8”, “outisbusy|”) in new stack
– Executing [s@macro-outisbusy:1] Playback(“SIP/500-0a033bf8”, “all-circuits-busy-now|noanswer”) in new stack
– <SIP/500-0a033bf8> Playing ‘all-circuits-busy-now’ (language ‘en’)
– Executing [s@macro-outisbusy:2] Playback(“SIP/500-0a033bf8”, “pls-try-call-later|noanswer”) in new stack
– <SIP/500-0a033bf8> Playing ‘pls-try-call-later’ (language ‘en’)
– Executing [s@macro-outisbusy:3] Macro(“SIP/500-0a033bf8”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/500-0a033bf8”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/500-0a033bf8”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/500-0a033bf8”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/500-0a033bf8”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/500-0a033bf8’ in macro ‘hangupcall’
== Spawn extension (macro-outisbusy, s, 3) exited non-zero on ‘SIP/500-0a033bf8’ in macro ‘outisbusy’
== Spawn extension (from-internal, 92115500, 5) exited non-zero on ‘SIP/500-0a033bf8’
– Executing [h@from-internal:1] Macro(“SIP/500-0a033bf8”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/500-0a033bf8”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/500-0a033bf8”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/500-0a033bf8”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/500-0a033bf8”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/500-0a033bf8’ in macro ‘hangupcall’
== Spawn extension (from-internal, s, 1) exited non-zero on ‘SIP/500-0a033bf8’
— END CONSOLE OUTPUT —

My configuration files are as follows:

— BEGIN /etc/zaptel.conf —
span=1,1,0,ccs,hdb3,crc4
bchan=1-15
bchan=17-31
dchan=16
loadzone=au
defaultzone=au
— END /etc/zaptel.conf —

— BEGIN /etc/asterisk/zapata.conf —
[channels]
language=en

usecallerid=yes
hidecallerid=no
callerid=asreceived
restrictcid=no
usecallingpres=yes

context=from-zaptel

switchtype=euroisdn
signalling=pri_cpe
immediate=no

overlapdial=yes

echocancel=yes
echocancelwhenbridged=yes
echotraining=800

channel=>1-15
channel=>17-31
group=0
— END /etc/asterisk/zapata.conf —

I have another FreePBX system which runs with a SIP trunk for external calling and works fine, but am really new to the Zaptel stuff. Any help/guidance you guys could offer would be greatly appreciated.

T.

Had the same exact problem. All my outbound tests were failing (T1 PRI, Digium TE122p). Once I added an outbound CallerID to the extension, the calls were successfully going outbound.

No joy unfortunately. Is there any chance you could post your zapata.conf for the working configuration with this device?

I’m not at work today but will have another play with it next week. If I have any luck I’ll post the working configuration here as well. In the meantime, if anyone does have any other advise to offer I’d greatly appreciate it =)

T.

DIAL_NUMBER=92115500

You system is dialing 92115500. Is that the number you intended to send to the PSTN? If not, I would bet you forgot to strip the 9 off of the front.

Change your outbound route dial patterns to:

9|.

and that will strip the 9 before it goes to the T-1.

Yeah, it’s an AU number =)

I’m almost convinced it’s something to do with the channel allocation/configuration in zapata.conf, but I can’t peg what it is…

T.

I’m using the latest version of AsteriskNow (ASterisk 1.4.26.2)that doesn’t use the zapata.conf. Uses DAHDI which uses the chan_dahdi.conf, but this file is automatically generated when you run /usr/sbin/dahdi_genconf.

You can see in your asterisk output where it’s referring to DAHDI:
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/500-0a033bf8”, “DAHDI/g0/92115500|300|”)

Make sure your /etc/dahdi/system.conf is correct.