[SOLVED] Sangoma Card/SIP/DAHDI - unable to dial out on Distro

Hello,
I installed FreePBX Distro fresh this morning on a brand new Dell T20 server via USB install. I downloaded the latest USB image from the FreePBX website, 64 bit 10.13.66, FreePBX 13 and Asterisk 13. I created some SIP extensions (the one I am using to test is 298) and set up a SIP trunk. I have also got a Sangoma Hybrid FlexBRI card with 2 x BRI and 1 x FXO ports.

The Sangoma card was not auto detected and so I have followed online instructions to install Wanpipe and DAHDI again. This is now working fine for incoming calls, the card picks up the call immediately and routes as expected. The incoming calls from the SIP trunk also work as expected.

However, I am unable to dial out on either trunk - I get an ‘all circuits are busy’ error. I should say that I am a fairly experienced FreePBX user so I know the basics of outbound routes, etc - these have been set up and exactly match those on my other servers.

I am not sure if this could possibly complicate things but this is a second FreePBX server in the same LAN - the other one is my main one and is in a DMZ.

The below is what CLI shows when I try to dial out via SIP trunk. 07XXXXXXXXX is the UK mobile number I am trying to dial, the route is configured so that a prefix of 9 should send calls out via my SIP trunk. 100XXXXXXX is the SIP username for my trunking provider, voipxxxx is their server. 01XXXXXXXXX is the PSTN number linked to the SIP trunk.

= Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/298-00000005”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/298-00000005”, “TOUCH_MONITOR=1468754447.14”) in new stack
– Executing [[email protected]:2] Set(“SIP/298-00000005”, “AMPUSER=298”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/298-00000005”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/298-00000005”, “1?Set(REALCALLERIDNUM=298)”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000005”, “AMPUSER=298”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/298-00000005”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/298-00000005”, “AMPUSERCIDNAME=Test”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/298-00000005”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/298-00000005”, “AMPUSERCID=298”) in new stack
– Executing [[email protected]:10] Set(“SIP/298-00000005”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/298-00000005”, “CALLERID(all)=“Test” <298>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/298-00000005”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/298-00000005”, “1?Set(GROUP(concurrency_limit)=298)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/298-00000005”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/298-00000005”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [[email protected]:29] Set(“SIP/298-00000005”, “CALLERID(number)=298”) in new stack
– Executing [[email protected]:30] Set(“SIP/298-00000005”, “CALLERID(name)=Test”) in new stack
– Executing [[email protected]:31] Set(“SIP/298-00000005”, “CDR(cnum)=298”) in new stack
– Executing [[email protected]:32] Set(“SIP/298-00000005”, “CDR(cnam)=Test”) in new stack
– Executing [[email protected]:33] Set(“SIP/298-00000005”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Gosub(“SIP/298-00000005”, “sub-record-check,s,1(out,907XXXXXXXXX,force)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/298-00000005”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“SIP/298-00000005”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“SIP/298-00000005”, “NOW=1468754447”) in new stack
– Executing [[email protected]:4] Set(“SIP/298-00000005”, “__DAY=17”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000005”, “__MONTH=07”) in new stack
– Executing [[email protected]:6] Set(“SIP/298-00000005”, “__YEAR=2016”) in new stack
– Executing [[email protected]:7] Set(“SIP/298-00000005”, “__TIMESTR=20160717-122047”) in new stack
– Executing [[email protected]:8] Set(“SIP/298-00000005”, “__FROMEXTEN=298”) in new stack
– Executing [[email protected]:9] Set(“SIP/298-00000005”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“SIP/298-00000005”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/298-00000005”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“SIP/298-00000005”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/298-00000005”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/298-00000005”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“SIP/298-00000005”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] NoOp(“SIP/298-00000005”, “Outbound Recording Check from 298 to 907XXXXXXXXX”) in new stack
– Executing [[email protected]:2] Set(“SIP/298-00000005”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/298-00000005”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [[email protected]:7] Gosub(“SIP/298-00000005”, “recordcheck,1(force,out,907XXXXXXXXX)”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/298-00000005”, “Starting recording check against force”) in new stack
– Executing [[email protected]:2] Goto(“SIP/298-00000005”, “force”) in new stack
– Goto (sub-record-check,recordcheck,5)
– Executing [[email protected]:5] Set(“SIP/298-00000005”, “__REC_POLICY_MODE=FORCE”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/298-00000005”, “1?startrec”) in new stack
– Goto (sub-record-check,recordcheck,16)
– Executing [[email protected]:16] NoOp(“SIP/298-00000005”, “Starting recording: out, 907XXXXXXXXX”) in new stack
– Executing [[email protected]:17] Set(“SIP/298-00000005”, “AUDIOHOOK_INHERIT(MixMonitor)=yes”) in new stack
– Executing [[email protected]:18] Set(“SIP/298-00000005”, “__CALLFILENAME=out-907XXXXXXXXX-298-20160717-122047-1468754447.14”) in new stack
– Executing [[email protected]:19] MixMonitor(“SIP/298-00000005”, “2016/07/17/out-907XXXXXXXXX-298-20160717-122047-1468754447.14.wav,ai(LOCAL_MIXMON_ID),”) in new stack
– Executing [[email protected]:20] Set(“SIP/298-00000005”, “__MIXMON_ID=0x7f6830b3ef70”) in new stack
– Executing [[email protected]:21] Set(“SIP/298-00000005”, “__RECORD_ID=SIP/298-00000005”) in new stack
– Executing [[email protected]:22] Set(“SIP/298-00000005”, “__REC_STATUS=RECORDING”) in new stack
– Executing [[email protected]:23] Set(“SIP/298-00000005”, “CDR(recordingfile)=out-907XXXXXXXXX-298-20160717-122047-1468754447.14.wav”) in new stack
– Executing [[email protected]:24] Return(“SIP/298-00000005”, “”) in new stack
– Executing [[email protected]:8] Return(“SIP/298-00000005”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/298-00000005”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [[email protected]:4] GosubIf(“SIP/298-00000005”, “0?sub-diversion-header,s,1()”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000005”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:6] Set(“SIP/298-00000005”, “_NODEST=”) in new stack
– Executing [[email protected]:7] Macro(“SIP/298-00000005”, “dialout-trunk,2,07XXXXXXXXX,off”) in new stack
– Executing [[email protected]:1] Set(“SIP/298-00000005”, “DIAL_TRUNK=2”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/298-00000005”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/298-00000005”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/298-00000005”, “DIAL_NUMBER=07XXXXXXXXX”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000005”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:6] Set(“SIP/298-00000005”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/298-00000005”, “0?nomax”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/298-00000005”, “0?chanfull”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/298-00000005”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/298-00000005”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [[email protected]:11] Macro(“SIP/298-00000005”, “outbound-callerid,2”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/298-00000005”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/298-00000005”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/298-00000005”, “0?Set(REALCALLERIDNUM=298)”) in new stack
– Executing [[email protected]:4] GotoIf(“SIP/298-00000005”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,7)
– Executing [[email protected]:7] Set(“SIP/298-00000005”, “USEROUTCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/298-00000005”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:9] Set(“SIP/298-00000005”, “TRUNKOUTCID=100XXXXXXX”) in new stack
– Executing [[email protected]:10] GotoIf(“SIP/298-00000005”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,15)
– Executing [[email protected]:15] ExecIf(“SIP/298-00000005”, “1?Set(CALLERID(all)=100XXXXXXX)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/298-00000005”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:17] ExecIf(“SIP/298-00000005”, “1?Set(CALLERID(all)=100XXXXXXX)”) in new stack
– Executing [[email protected]:18] ExecIf(“SIP/298-00000005”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [[email protected]:19] ExecIf(“SIP/298-00000005”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [[email protected]:20] Set(“SIP/298-00000005”, “CDR(outbound_cnum)=100XXXXXXX”) in new stack
– Executing [[email protected]:21] Set(“SIP/298-00000005”, “CDR(outbound_cnam)=”) in new stack
[2016-07-17 12:20:47] WARNING[2963]: func_cdr.c:377 cdr_write_callback: CDR requires a value (CDR(variable)=value)
– Executing [[email protected]:12] GosubIf(“SIP/298-00000005”, “0?sub-flp-2,s,1()”) in new stack
== Begin MixMonitor Recording SIP/298-00000005
– Executing [[email protected]:13] Set(“SIP/298-00000005”, “OUTNUM=07XXXXXXXXX”) in new stack
– Executing [[email protected]:14] Set(“SIP/298-00000005”, “custom=SIP/01XXXXXXXXX”) in new stack
– Executing [[email protected]unk:15] ExecIf(“SIP/298-00000005”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/298-00000005”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“SIP/298-00000005”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/298-00000005”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/298-00000005”, “0?bypass,1”) in new stack
– Executing [[email protected]:19] ExecIf(“SIP/298-00000005”, “1?Set(CONNECTEDLINE(num,i)=07XXXXXXXXX)”) in new stack
– Executing [[email protected]:20] ExecIf(“SIP/298-00000005”, “1?Set(CONNECTEDLINE(name,i)=CID:100XXXXXXX)”) in new stack
– Executing [[email protected]:21] ExecIf(“SIP/298-00000005”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)100XXXXXXX)”) in new stack
– Executing [[email protected]:22] GotoIf(“SIP/298-00000005”, “0?customtrunk”) in new stack
– Executing [[email protected]:23] Dial(“SIP/298-00000005”, “SIP/01XXXXXXXXX/07XXXXXXXXX,300,T”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/01XXXXXXXXX/07XXXXXXXXX
[2016-07-17 12:20:47] NOTICE[4084][C-00000009]: chan_sip.c:23808 handle_response_invite: Failed to authenticate on INVITE to ‘sip:[email protected];tag=as0be1f7b0’
– SIP/01XXXXXXXXX-00000006 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [[email protected]:24] NoOp(“SIP/298-00000005”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 21”) in new stack
– Executing [[email protected]:25] GotoIf(“SIP/298-00000005”, “0?continue,1:s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [[email protected]:1] Set(“SIP/298-00000005”, “RC=21”) in new stack
– Executing [[email protected]:2] Goto(“SIP/298-00000005”, “21,1”) in new stack
– Goto (macro-dialout-trunk,21,1)
– Executing [[email protected]:1] Goto(“SIP/298-00000005”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [[email protected]:1] NoOp(“SIP/298-00000005”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/298-00000005”, “1?Set(CALLERID(number)=298)”) in new stack
– Executing [[email protected]:8] Macro(“SIP/298-00000005”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Progress(“SIP/298-00000005”, “”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/298-00000005”, “0?emergency,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/298-00000005”, “0?intracompany,1”) in new stack
– Executing [[email protected]:4] Playback(“SIP/298-00000005”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/298-00000005> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <SIP/298-00000005> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
– Executing [[email protected]:1] Macro(“SIP/298-00000005”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/298-00000005”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/298-00000005”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/298-00000005”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/298-00000005’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/298-00000005’
== MixMonitor close filestream (mixed)
== End MixMonitor Recording SIP/298-00000005

Furthermore, when I try to dial out via the DAHDI trunk with an 8 prefix, I get this:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/298-00000008”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/298-00000008”, “TOUCH_MONITOR=1468754855.18”) in new stack
– Executing [[email protected]:2] Set(“SIP/298-00000008”, “AMPUSER=298”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/298-00000008”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/298-00000008”, “1?Set(REALCALLERIDNUM=298)”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000008”, “AMPUSER=298”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/298-00000008”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/298-00000008”, “AMPUSERCIDNAME=Test”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/298-00000008”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/298-00000008”, “AMPUSERCID=298”) in new stack
– Executing [[email protected]:10] Set(“SIP/298-00000008”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/298-00000008”, “CALLERID(all)=“Test” <298>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/298-00000008”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/298-00000008”, “1?Set(GROUP(concurrency_limit)=298)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/298-00000008”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:15] GotoIf(“SIP/298-00000008”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,29)
– Executing [[email protected]:29] Set(“SIP/298-00000008”, “CALLERID(number)=298”) in new stack
– Executing [[email protected]:30] Set(“SIP/298-00000008”, “CALLERID(name)=Test”) in new stack
– Executing [[email protected]:31] Set(“SIP/298-00000008”, “CDR(cnum)=298”) in new stack
– Executing [[email protected]:32] Set(“SIP/298-00000008”, “CDR(cnam)=Test”) in new stack
– Executing [[email protected]:33] Set(“SIP/298-00000008”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Gosub(“SIP/298-00000008”, “sub-record-check,s,1(out,807XXXXXXXXX,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/298-00000008”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“SIP/298-00000008”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“SIP/298-00000008”, “NOW=1468754855”) in new stack
– Executing [[email protected]:4] Set(“SIP/298-00000008”, “__DAY=17”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000008”, “__MONTH=07”) in new stack
– Executing [[email protected]:6] Set(“SIP/298-00000008”, “__YEAR=2016”) in new stack
– Executing [[email protected]:7] Set(“SIP/298-00000008”, “__TIMESTR=20160717-122735”) in new stack
– Executing [[email protected]:8] Set(“SIP/298-00000008”, “__FROMEXTEN=298”) in new stack
– Executing [[email protected]:9] Set(“SIP/298-00000008”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“SIP/298-00000008”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/298-00000008”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“SIP/298-00000008”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/298-00000008”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/298-00000008”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“SIP/298-00000008”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] NoOp(“SIP/298-00000008”, “Outbound Recording Check from 298 to 807XXXXXXXXX”) in new stack
– Executing [[email protected]:2] Set(“SIP/298-00000008”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/298-00000008”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [[email protected]:7] Gosub(“SIP/298-00000008”, “recordcheck,1(dontcare,out,807XXXXXXXXX)”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/298-00000008”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“SIP/298-00000008”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“SIP/298-00000008”, “”) in new stack
– Executing [[email protected]:8] Return(“SIP/298-00000008”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/298-00000008”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [[email protected]:4] GosubIf(“SIP/298-00000008”, “0?sub-diversion-header,s,1()”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000008”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:6] Set(“SIP/298-00000008”, “_NODEST=”) in new stack
– Executing [[email protected]:7] Macro(“SIP/298-00000008”, “dialout-trunk,1,07XXXXXXXXX,off”) in new stack
– Executing [[email protected]:1] Set(“SIP/298-00000008”, “DIAL_TRUNK=1”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/298-00000008”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/298-00000008”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/298-00000008”, “DIAL_NUMBER=07XXXXXXXXX”) in new stack
– Executing [[email protected]:5] Set(“SIP/298-00000008”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:6] Set(“SIP/298-00000008”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/298-00000008”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/298-00000008”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/298-00000008”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [[email protected]:11] Macro(“SIP/298-00000008”, “outbound-callerid,1”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/298-00000008”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/298-00000008”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/298-00000008”, “0?Set(REALCALLERIDNUM=298)”) in new stack
– Executing [[email protected]:4] GotoIf(“SIP/298-00000008”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,7)
– Executing [[email protected]:7] Set(“SIP/298-00000008”, “USEROUTCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/298-00000008”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:9] Set(“SIP/298-00000008”, “TRUNKOUTCID=”) in new stack
– Executing [[email protected]:10] GotoIf(“SIP/298-00000008”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,15)
– Executing [[email protected]:15] ExecIf(“SIP/298-00000008”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/298-00000008”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:17] ExecIf(“SIP/298-00000008”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:18] ExecIf(“SIP/298-00000008”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [[email protected]:19] ExecIf(“SIP/298-00000008”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [[email protected]:20] Set(“SIP/298-00000008”, “CDR(outbound_cnum)=298”) in new stack
– Executing [[email protected]:21] Set(“SIP/298-00000008”, “CDR(outbound_cnam)=Test”) in new stack
– Executing [[email protected]:12] GosubIf(“SIP/298-00000008”, “0?sub-flp-1,s,1()”) in new stack
– Executing [[email protected]:13] Set(“SIP/298-00000008”, “OUTNUM=07XXXXXXXXX”) in new stack
– Executing [[email protected]:14] Set(“SIP/298-00000008”, “custom=DAHDI/r1”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/298-00000008”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/298-00000008”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“SIP/298-00000008”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/298-00000008”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/298-00000008”, “0?bypass,1”) in new stack
– Executing [[email protected]:19] ExecIf(“SIP/298-00000008”, “1?Set(CONNECTEDLINE(num,i)=07XXXXXXXXX)”) in new stack
– Executing [[email protected]:20] ExecIf(“SIP/298-00000008”, “1?Set(CONNECTEDLINE(name,i)=CID:298)”) in new stack
– Executing [[email protected]:21] ExecIf(“SIP/298-00000008”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)298)”) in new stack
– Executing [[email protected]:22] GotoIf(“SIP/298-00000008”, “0?customtrunk”) in new stack
– Executing [[email protected]:23] Dial(“SIP/298-00000008”, “DAHDI/r1/07XXXXXXXXX,300,T”) in new stack
– Called DAHDI/r1/07XXXXXXXXX
– Hanging up on ‘DAHDI/8-1’
– Hungup ‘DAHDI/8-1’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [[email protected]:24] NoOp(“SIP/298-00000008”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0”) in new stack
– Executing [[email protected]:25] GotoIf(“SIP/298-00000008”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [[email protected]:1] Set(“SIP/298-00000008”, “RC=0”) in new stack
– Executing [[email protected]:2] Goto(“SIP/298-00000008”, “0,1”) in new stack
– Goto (macro-dialout-trunk,0,1)
– Executing [[email protected]:1] Goto(“SIP/298-00000008”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [[email protected]:1] NoOp(“SIP/298-00000008”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other trunks”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/298-00000008”, “1?Set(CALLERID(number)=298)”) in new stack
– Executing [[email protected]:8] Macro(“SIP/298-00000008”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Progress(“SIP/298-00000008”, “”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/298-00000008”, “0?emergency,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/298-00000008”, “0?intracompany,1”) in new stack
– Executing [[email protected]:4] Playback(“SIP/298-00000008”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/298-00000008> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <SIP/298-00000008> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
– Executing [[email protected]:1] Macro(“SIP/298-00000008”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/298-00000008”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/298-00000008”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/298-00000008”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/298-00000008’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/298-00000008’

Except when doing it via DAHDI, between these two lines:
– Called DAHDI/r1/07XXXXXXXXX
– Hanging up on 'DAHDI/8-1’
My mobile phone actually starts ringing and I can answer it. DAHDI does not seem to detect that the phone has been answered, and only when I hang up my mobile does the ‘Hanging up’ message appear in CLI.

My DAHDI config is as follows:

/etc/dahdi/system.conf:

span=1,0,0,CCS,AMI
span=2,0,0,CCS,AMI
bchan=1-2,4-5
hardhdlc=3,6
fxsks=7,8
echocanceller=oslec,7,8
loadzone=uk
defaultzone=uk

etc/asterisk/chan_dahdi.conf

[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=yes
busycount=10
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=yes
faxdetect=no
rxgain=8
txgain=2
progzone=uk
callprogress=yes
ukcallerid=yes
cidsignalling=v23
cidstart=polarity
loadzone=uk
defaultzone=uk

Lastly, out of frustration with this, I tried creating an IAX2 trunk between this server and my other server on the same network. This IAX trunk worked fine and allowed me to dial out using the SIP trunks connected to the other server.

I have exhausted my knowledge of these issues and would really appreciate some advice. I hope I’ve included everything you need, please let me know if not.

Post what dahdi-channels.conf file has.

dahdi-channels.conf is completely empty - 0 bytes.

Just to add to this - I have been experimenting with dialing out on the SIP trunk. My SIP provider has the option to dial 8000 to access their voicemail system. When I dial 8000 via this trunk, I get connected but it’s a really choppy line and totally impossible to understand. It still won’t let me dial any outside numbers, giving me the error messages as described above.

Sorry to keep replying to myself but I’ve eliminated part of the problem. The issue with not being able to dial out via SIP was because there are 2 asterisk servers on my network - having removed the new system from here completely and taken it elsewhere to test, the SIP trunk worked as expected. My only issue now is not being able to dial out via DAHDI.

Resolved by removing callprogress=yes from the chan_dahdi.conf.