Busy signals with FreePBX and Sangoma A102 PRI card

Hi everyone,
I’m trying out FreePBX and I can’t get my Sangoma A102 PRI card to work - specifically I keep getting a busy signal when I call one of my DIDs. I know the card/PRI/DIDs works because the entire setup was working on Trixbox CE.

I have the standard config for my PRI: B8ZS/EFS/National 2/T1/PRI - CPE/Context: from-digital and there’s no alarms (everything is green).

Symptoms:

  1. When I call one of the DIDs, I get the busy signal on my cell phone and there’s no movement on any of the channels (I was watching the channels with: watch “asterisk -vvvvvrx ‘core show channels verbose’” )

  2. Outgoing calls also do not work, I get “all circuits are busy now” and the following log output:

    localhost*CLI>
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    – Executing [[email protected]:1] Macro(“SIP/6002-00000009”, “user-callerid,LIMIT,”) in new stack
    – Executing [[email protected]:1] Set(“SIP/6002-00000009”, “TOUCH_MONITOR=1371555526.10”) in new stack
    – Executing [[email protected]:2] Set(“SIP/6002-00000009”, “AMPUSER=6002”) in new stack
    – Executing [[email protected]:3] GotoIf(“SIP/6002-00000009”, “0?report”) in new stack
    – Executing [[email protected]:4] ExecIf(“SIP/6002-00000009”, “1?Set(REALCALLERIDNUM=6002)”) in new stack
    – Executing [[email protected]:5] Set(“SIP/6002-00000009”, “AMPUSER=6002”) in new stack
    – Executing [[email protected]:6] Set(“SIP/6002-00000009”, “AMPUSERCIDNAME=IT Testbench 2”) in new stack
    – Executing [[email protected]:7] GotoIf(“SIP/6002-00000009”, “0?report”) in new stack
    – Executing [[email protected]:8] Set(“SIP/6002-00000009”, “AMPUSERCID=6002”) in new stack
    – Executing [[email protected]:9] Set(“SIP/6002-00000009”, “__DIAL_OPTIONS=Ttr”) in new stack
    – Executing [[email protected]:10] Set(“SIP/6002-00000009”, "CALLERID(all)=“IT Testbench 2” ") in new stack
    – Executing [[email protected]:11] GotoIf(“SIP/6002-00000009”, “0?limit”) in new stack
    – Executing [[email protected]:12] ExecIf(“SIP/6002-00000009”, “1?Set(GROUP(concurrency_limit)=6002)”) in new stack
    – Executing [[email protected]:13] GosubIf(“SIP/6002-00000009”, “7?sub-ccss,s,1(from-internal,0001234)”) in new stack
    – Executing [[email protected]:1] ExecIf(“SIP/6002-00000009”, “0?Return()”) in new stack
    – Executing [[email protected]:2] Set(“SIP/6002-00000009”, “CCSS_SETUP=TRUE”) in new stack
    – Executing [[email protected]:3] GosubIf(“SIP/6002-00000009”, “0?monitor_config,1(from-internal,0001234):monitor_default,1(from-internal,0001234)”) in new stack
    – Executing [[email protected]:1] GotoIf(“SIP/6002-00000009”, “0?is_exten”) in new stack
    – Executing [[email protected]:2] StackPop(“SIP/6002-00000009”, “”) in new stack
    – Executing [[email protected]:3] Return(“SIP/6002-00000009”, “FALSE”) in new stack
    – Executing [[email protected]:14] ExecIf(“SIP/6002-00000009”, “0?Set(CHANNEL(language)=)”) in new stack
    – Executing [[email protected]:15] GotoIf(“SIP/6002-00000009”, “1?continue”) in new stack
    – Goto (macro-user-callerid,s,28)
    – Executing [[email protected]:28] Set(“SIP/6002-00000009”, “CALLERID(number)=6002”) in new stack
    – Executing [[email protected]:29] Set(“SIP/6002-00000009”, “CALLERID(name)=IT Testbench 2”) in new stack
    – Executing [[email protected]:30] Set(“SIP/6002-00000009”, “CDR(cnum)=6002”) in new stack
    – Executing [[email protected]:31] Set(“SIP/6002-00000009”, “CDR(cnam)=IT Testbench 2”) in new stack
    – Executing [[email protected]:32] Set(“SIP/6002-00000009”, “CHANNEL(language)=en”) in new stack
    – Executing [[email protected]:2] Set(“SIP/6002-00000009”, “MOHCLASS=default”) in new stack
    – Executing [[email protected]:3] Set(“SIP/6002-00000009”, “_NODEST=”) in new stack
    – Executing [[email protected]:4] Gosub(“SIP/6002-00000009”, “sub-record-check,s,1(out,0001234,)”) in new stack
    – Executing [[email protected]:1] Set(“SIP/6002-00000009”, “REC_POLICY_MODE_SAVE=”) in new stack
    – Executing [[email protected]:2] GotoIf(“SIP/6002-00000009”, “1?check”) in new stack
    – Goto (sub-record-check,s,7)
    – Executing [[email protected]:7] Set(“SIP/6002-00000009”, “__MON_FMT=wav”) in new stack
    – Executing [[email protected]:8] GotoIf(“SIP/6002-00000009”, “1?next”) in new stack
    – Goto (sub-record-check,s,11)
    – Executing [[email protected]:11] ExecIf(“SIP/6002-00000009”, “0?Return()”) in new stack
    – Executing [[email protected]:12] ExecIf(“SIP/6002-00000009”, “0?Set(__REC_POLICY_MODE=)”) in new stack
    – Executing [[email protected]:13] GotoIf(“SIP/6002-00000009”, “0?out,1”) in new stack
    – Executing [[email protected]:14] Set(“SIP/6002-00000009”, “__REC_STATUS=INITIALIZED”) in new stack
    – Executing [[email protected]:15] Set(“SIP/6002-00000009”, “NOW=1371555526”) in new stack
    – Executing [[email protected]:16] Set(“SIP/6002-00000009”, “__DAY=18”) in new stack
    – Executing [[email protected]:17] Set(“SIP/6002-00000009”, “__MONTH=06”) in new stack
    – Executing [[email protected]:18] Set(“SIP/6002-00000009”, “__YEAR=2013”) in new stack
    – Executing [[email protected]:19] Set(“SIP/6002-00000009”, “__TIMESTR=20130618-073846”) in new stack
    – Executing [[email protected]:20] Set(“SIP/6002-00000009”, “__FROMEXTEN=6002”) in new stack
    – Executing [[email protected]:21] Set(“SIP/6002-00000009”, “__CALLFILENAME=out-0001234-6002-20130618-073846-1371555526.10”) in new stack
    – Executing [[email protected]:22] Goto(“SIP/6002-00000009”, “out,1”) in new stack
    – Goto (sub-record-check,out,1)
    – Executing [[email protected]:1] ExecIf(“SIP/6002-00000009”, “1?Set(__REC_POLICY_MODE=dontcare)”) in new stack
    – Executing [[email protected]:2] GosubIf(“SIP/6002-00000009”, “0?record,1(exten,0001234,6002)”) in new stack
    – Executing [[email protected]:3] Return(“SIP/6002-00000009”, “”) in new stack
    – Executing [[email protected]:5] Macro(“SIP/6002-00000009”, “dialout-trunk,1,0001234,off”) in new stack
    – Executing [[email protected]:1] Set(“SIP/6002-00000009”, “DIAL_TRUNK=1”) in new stack
    – Executing [[email protected]:2] GosubIf(“SIP/6002-00000009”, “0?sub-pincheck,s,1()”) in new stack
    – Executing [[email protected]:3] GotoIf(“SIP/6002-00000009”, “0?disabletrunk,1”) in new stack
    – Executing [[email protected]:4] Set(“SIP/6002-00000009”, “DIAL_NUMBER=0001234”) in new stack
    – Executing [[email protected]:5] Set(“SIP/6002-00000009”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
    – Executing [[email protected]:6] Set(“SIP/6002-00000009”, “OUTBOUND_GROUP=OUT_1”) in new stack
    – Executing [[email protected]:7] GotoIf(“SIP/6002-00000009”, “1?nomax”) in new stack
    – Goto (macro-dialout-trunk,s,9)
    – Executing [[email protected]:9] GotoIf(“SIP/6002-00000009”, “0?skipoutcid”) in new stack
    – Executing [[email protected]:10] Set(“SIP/6002-00000009”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
    – Executing [[email protected]:11] Macro(“SIP/6002-00000009”, “outbound-callerid,1”) in new stack
    – Executing [[email protected]:1] ExecIf(“SIP/6002-00000009”, “0?Set(CALLERPRES()=)”) in new stack
    – Executing [[email protected]:2] ExecIf(“SIP/6002-00000009”, “0?Set(REALCALLERIDNUM=6002)”) in new stack
    – Executing [[email protected]:3] GotoIf(“SIP/6002-00000009”, “1?normcid”) in new stack
    – Goto (macro-outbound-callerid,s,6)
    – Executing [[email protected]:6] Set(“SIP/6002-00000009”, “USEROUTCID=”) in new stack
    – Executing [[email protected]:7] Set(“SIP/6002-00000009”, “EMERGENCYCID=”) in new stack
    – Executing [[email protected]:8] Set(“SIP/6002-00000009”, “TRUNKOUTCID=”) in new stack
    – Executing [[email protected]:9] GotoIf(“SIP/6002-00000009”, “1?trunkcid”) in new stack
    – Goto (macro-outbound-callerid,s,14)
    – Executing [[email protected]:14] ExecIf(“SIP/6002-00000009”, “0?Set(CALLERID(all)=)”) in new stack
    – Executing [[email protected]:15] ExecIf(“SIP/6002-00000009”, “0?Set(CALLERID(all)=)”) in new stack
    – Executing [[email protected]nd-callerid:16] ExecIf(“SIP/6002-00000009”, “0?Set(CALLERID(all)=)”) in new stack
    – Executing [[email protected]:17] ExecIf(“SIP/6002-00000009”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
    – Executing [[email protected]:18] Set(“SIP/6002-00000009”, “CDR(outbound_cnum)=6002”) in new stack
    – Executing [[email protected]:19] Set(“SIP/6002-00000009”, “CDR(outbound_cnam)=IT Testbench 2”) in new stack
    – Executing [[email protected]:12] GosubIf(“SIP/6002-00000009”, “0?sub-flp-1,s,1()”) in new stack
    – Executing [[email protected]:13] Set(“SIP/6002-00000009”, “OUTNUM=0001234”) in new stack
    – Executing [[email protected]:14] Set(“SIP/6002-00000009”, “custom=DAHDI/g0”) in new stack
    – Executing [[email protected]:15] ExecIf(“SIP/6002-00000009”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
    – Executing [[email protected]:16] ExecIf(“SIP/6002-00000009”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
    – Executing [[email protected]:17] Macro(“SIP/6002-00000009”, “dialout-trunk-predial-hook,”) in new stack
    – Executing [[email protected]:1] MacroExit(“SIP/6002-00000009”, “”) in new stack
    – Executing [[email protected]:18] GotoIf(“SIP/6002-00000009”, “0?bypass,1”) in new stack
    – Executing [[email protected]:19] ExecIf(“SIP/6002-00000009”, “1?Set(CONNECTEDLINE(num,i)=0001234)”) in new stack
    – Executing [[email protected]:20] ExecIf(“SIP/6002-00000009”, “1?Set(CONNECTEDLINE(name,i)=CID:6002)”) in new stack
    – Executing [[email protected]:21] GotoIf(“SIP/6002-00000009”, “0?customtrunk”) in new stack
    – Executing [[email protected]:22] Dial(“SIP/6002-00000009”, “DAHDI/g0/0001234,300,Tt”) in new stack
    [2013-06-18 07:38:46] DEBUG[19481]: sig_pri.c:1016 sig_pri_request: sig_pri_request 1
    [2013-06-18 07:38:46] DEBUG[19481]: sig_pri.c:6603 sig_pri_call: CALLER NAME: IT Testbench 2 NUM: 6002
    – Requested transfer capability: 0x00 - SPEECH
    – Called DAHDI/g0/0001234
    – Span 1: Channel 0/1 got hangup, cause 27
    – DAHDI/i1/0001234-2 is circuit-busy
    – Hungup ‘DAHDI/i1/0001234-2’
    == Everyone is busy/congested at this time (1:0/1/0)
    – Executing [[email protected]:23] NoOp(“SIP/6002-00000009”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 27”) in new stack
    – Executing [[email protected]:24] GotoIf(“SIP/6002-00000009”, “0?continue,1:s-CONGESTION,1”) in new stack
    – Goto (macro-dialout-trunk,s-CONGESTION,1)
    – Executing [[email protected]:1] Set(“SIP/6002-00000009”, “RC=27”) in new stack
    – Executing [[email protected]:2] Goto(“SIP/6002-00000009”, “27,1”) in new stack
    – Goto (macro-dialout-trunk,27,1)
    – Executing [[email protected]:1] Goto(“SIP/6002-00000009”, “continue,1”) in new stack
    – Goto (macro-dialout-trunk,continue,1)
    – Executing [[email protected]:1] NoOp(“SIP/6002-00000009”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 27 - failing through to other trunks”) in new stack
    – Executing [[email protected]:2] Set(“SIP/6002-00000009”, “CALLERID(number)=6002”) in new stack
    – Executing [[email protected]:6] Macro(“SIP/6002-00000009”, “outisbusy,”) in new stack
    – Executing [[email protected]:1] Progress(“SIP/6002-00000009”, “”) in new stack
    – Executing [[email protected]:2] GotoIf(“SIP/6002-00000009”, “0?emergency,1”) in new stack
    – Executing [[email protected]:3] GotoIf(“SIP/6002-00000009”, “0?intracompany,1”) in new stack
    – Executing [[email protected]:4] Playback(“SIP/6002-00000009”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
    – <SIP/6002-00000009> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
    – <SIP/6002-00000009> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
    == Spawn extension (macro-outisbusy, s, 4) exited non-zero on ‘SIP/6002-00000009’ in macro ‘outisbusy’
    == Spawn extension (from-internal, 0001234, 6) exited non-zero on ‘SIP/6002-00000009’
    – Executing [[email protected]:1] Hangup(“SIP/6002-00000009”, “”) in new stack
    == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/6002-00000009’

I realize the critical line here is " – Span 1: Channel 0/1 got hangup, cause 27" but when I issue dahdi_cfg -vv I get:
DAHDI Version: 2.6.1
Echo Canceller(s): HWEC, MG2
Configuration

SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 07)
Channel 08: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 08)
Channel 09: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 09)
Channel 10: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 10)
Channel 11: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 11)
Channel 12: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 12)
Channel 13: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 13)
Channel 14: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 14)
Channel 15: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 15)
Channel 16: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 16)
Channel 17: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 17)
Channel 18: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 18)
Channel 19: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 19)
Channel 20: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 20)
Channel 21: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 21)
Channel 22: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 22)
Channel 23: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 23)
Channel 24: Hardware assisted D-channel (Default) (Echo Canceler: none) (Slaves: 24)
Channel 25: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 25)
Channel 26: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 26)
Channel 27: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 27)
Channel 28: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 28)
Channel 29: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 29)
Channel 30: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 30)
Channel 31: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 31)
Channel 32: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 32)
Channel 33: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 33)
Channel 34: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 34)
Channel 35: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 35)
Channel 36: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 36)
Channel 37: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 37)
Channel 38: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 38)
Channel 39: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 39)
Channel 40: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 40)
Channel 41: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 41)
Channel 42: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 42)
Channel 43: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 43)
Channel 44: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 44)
Channel 45: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 45)
Channel 46: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 46)
Channel 47: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 47)
Channel 48: Hardware assisted D-channel (Default) (Echo Canceler: none) (Slaves: 48)

48 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Setting echocan for channel 5 to mg2
Setting echocan for channel 6 to mg2
Setting echocan for channel 7 to mg2
Setting echocan for channel 8 to mg2
Setting echocan for channel 9 to mg2
Setting echocan for channel 10 to mg2
Setting echocan for channel 11 to mg2
Setting echocan for channel 12 to mg2
Setting echocan for channel 13 to mg2
Setting echocan for channel 14 to mg2
Setting echocan for channel 15 to mg2
Setting echocan for channel 16 to mg2
Setting echocan for channel 17 to mg2
Setting echocan for channel 18 to mg2
Setting echocan for channel 19 to mg2
Setting echocan for channel 20 to mg2
Setting echocan for channel 21 to mg2
Setting echocan for channel 22 to mg2
Setting echocan for channel 23 to mg2
Setting echocan for channel 24 to none
Setting echocan for channel 25 to mg2
Setting echocan for channel 26 to mg2
Setting echocan for channel 27 to mg2
Setting echocan for channel 28 to mg2
Setting echocan for channel 29 to mg2
Setting echocan for channel 30 to mg2
Setting echocan for channel 31 to mg2
Setting echocan for channel 32 to mg2
Setting echocan for channel 33 to mg2
Setting echocan for channel 34 to mg2
Setting echocan for channel 35 to mg2
Setting echocan for channel 36 to mg2
Setting echocan for channel 37 to mg2
Setting echocan for channel 38 to mg2
Setting echocan for channel 39 to mg2
Setting echocan for channel 40 to mg2
Setting echocan for channel 41 to mg2
Setting echocan for channel 42 to mg2
Setting echocan for channel 43 to mg2
Setting echocan for channel 44 to mg2
Setting echocan for channel 45 to mg2
Setting echocan for channel 46 to mg2
Setting echocan for channel 47 to mg2
Setting echocan for channel 48 to none

So it would appear that all my channels are accounted for and operational.

  1. I get the following log output occasionally:
    PRI Error on span 1: Received MDL/TEI managemement message, but configured for mode other than PTMP!

Anyways, my gut is telling me that there’s a problem with my PRI configuration, but nothing is jumping out at me as being ‘wrong’.

I’ve tried FreePBX version 4.211.64-4 x86/64 and 3.211.63-10 x86/64. I’ve tried using the built-in wanpipe drivers and installing my own. And of course I’ve Googled all of the errors but none of the suggestions work.

Ideas?