All channels busy on PRI link but works incomming

Hi, my problem is I have no outgoing calls on the PRI which always reports busy yet incoming calls work. The far end sees the PRI as working and when I turn on level 2 debug on the PRI the failure occurs without anything hitting the PRI link itself.

Onto the details
pci:0000:04:08.0 wct4xxp+ d161:1420 Wildcard TE420 (5th Gen)
pci:0000:06:08.0 wctdm24xxp+ d161:8002 Wildcard AEX800

There are 4 telephone extensions on the AEX800 and they all work
We have a number of IVR’s provisioned and they all seem to work
We have 8 SIP lines provisioned and they also seem to work

I have 2 PRI links where FreePBX is network connected to a protocol converter and onto some V5.2 equipment. I can make calls from the V5.2 equipment to the handsets and IVR’s and all works OK. I cannot terminate a call on the V5.2 equipment. The whole network is a test environment with no real world/ telco connections.

What I have tried so far:

  1. Change FreePBX from pri_net to pri_cpe (and do the opposite on the protocol converter)
  2. Circuit seizure on Protocol Converter to be descending thus making FreePBX ascending and the Protocol Converter Descending
  3. Set the following: priindication=outofband, busydetect=no, pridialplan=unknown, prilocaldialplan=unknown in chan_dahdi.conf(including asterisk stop, dahdi restart and asterisk start)
  4. moved the group = 63 from my dahdi-channels.conf file to come just before the signalling = pri_net line. (not sure why this should make a difference but 1 post said it did).
  5. I added a handset as the 3rd option to one of my outgoing routes and the call failed as below on the pri links but worked to the handset so it look like the numbing is correct (even if it is a bit wacky as my V5.2 equipment has single and 2 digit numbers right now except for one line which has a 4 digit number but results are the same on single, double and 4 digit numbers.)
  6. I turned on “core set debug 9 app_dial.c” from the CLI thinking I would get more details of the failure but it looks exactly the same as the trace below.

I can’t seem to figure out why the call fails without asterisk ever communicating with the PRI. There must be a setting wrong somewhere but I can’t find it.

All the gory details below and in the 3 linked files:

I have
dahdi Ver 2.6.1
FreePBX ver 2.10.0-28

running on Intel® Core™2 CPU 6400 @ 2.13GHz
uname -a
Linux localhost.localdomain 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:00 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
256Meg RAM
110Gig HDD with root partition 3% used 100G free. Boot partition 13% used 82Meg Free
See below for config files

I have 3 links to pastebin files but the system won’t let me post them the codes are 2917729, 2917629 and 2917636 with in front of the number

Various Log Files are at
cat extensions_additional.conf is at
cat extensions.conf is at

Your system is extremely out of date. Please upgrade. Saying that, it sounds like your outbound trunk for dahdi is incorrect. But before you go chasing down that rabbit hole, you need to upgrade (at least to FreePBX 12 and asterisk 11)

Hi xrobau,

Thank you for the advice, It was one of the things on our list of things to try but thought we should ask first in case we had made some stupid mistake.

I have just started the upgrade now but using a new HDD and FreePBX 6.12.25. Figure this way we can access config on the old drive and revert if necessary.

Thankyou for the advice, will post once we are up, running and configured on the new version.

Best Regards dpqld

It is unlikely that a dahdi channel will complete a call to 6154 unless it is an internal trunk, if it is then your tie-line trunk’s far end translation of extension 6154 is mis-configured against your outbound routing to accept such calls, if that is your scenario then check both ends for correct routing . . .

    -- Executing [[email protected]:22] Dial("DAHDI/128-1", "DAHDI/0,11/6154,300,") in new stack
**[2015-02-06 12:29:39] WARNING[5131]: app_dial.c:2274 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 0 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Executing [[email protected]:23] NoOp("DAHDI/128-1", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0") in new stack**

Maybe dahdi is not loaded, from asterisk CLI

post the issue of:-

module unload
module load
dahdi show status
dahdi show channels

Righto, I just had a quick look.

You should be using a GROUP to dialout, not a range of channels (eg, the default is to use ‘g0’, which would be fine).

Secondly, as dicko spotted, you’re only sending 4 digits out the PRI. What’s on the other end of the link?

(I’m assuming ‘qld’ means ‘queensland’, and if that’s true, I’m guessing its a Telstra Onramp 10, which has a limit to the number of simultaneous calls, not the the specific channels. Use g0)

Thank you for the advice,
I am rebuilding with the latest version so there is still some config work to do getting us back to where we were.

The GROUP dialout is a very real possibility which I will test as soon as I have enough config back in. The previous version we were running didn’t seem to have a g0.

qld does indeed mean Queensland well spotted.

Our numbing plan is unusual because there is no external connectivity, we don’t connect to any carriers either on E1, ethernet or ATM (we built a BRAS in a separate box. This part all works, or did until I upgraded).

The 4 digit numbers (in our case 61XX and 62XX) are meant to be put out to the E1 links exactly as 4 digit numbers, it hits a protocol converter that does a PRI to V5.2 translation and then gets pushed to a bunch of telephones connected to a DSLAM. The DSLAM is limited to the L3 number range it can cope with, 4 digits only. It is easier to use these 4 digits all the way to FreePBX rather than get the Protocol Converter to do a translation to a full 10 digit number

The system was all working because I could dial from the DSLAM phones and ring the FreePBX extensions or RVA’s. The busy problem was only going from FreePBX out the E1 card.

Will update as soon as we have enough config to test. Currently working through the configuration document trying to do things in the correct order. Thought this was better than putting old and possibly faulty config back in.

Many thanks for the advice

Not TERRIBLY well spotted, I’m in Gladstone :sunglasses:

Really, as far as I can remember, it’s install Distro. Go to Dahdi Setup, and click ‘configure’, and that’s pretty much it.

The major issue you’re going to have is a timing source. Asterisk doesn’t make THAT wonderful a timing source, so you normally want to have ‘the other end’ act as the source, unless the other end is even worse than Asterisk.

‘pri show span 0’ is the best place to start.

The 6154 number is intentional. 6154 is meant to be routed out the PRI E1. It goes to a Protocol Converter that translates this to V5.2 on an E1 that terminates through a DSLAM to a PSTN phone. The DSLAM is limited to 4 digit L3 numbers and rather than have the protocol converter change that to a 10 digit number we just use it as is.

As for the commands here is the output
CLI> dahdi show status
Description Alarms IRQ bpviol CRC Fra Codi Options LBO
T4XXP (PCI) Card 0 Span 1 OK 2 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
T4XXP (PCI) Card 0 Span 2 OK 2 0 0 CCS HDB3 CRC4 0 db (CSU)/0-133 feet (DSX-1)
T4XXP (PCI) Card 0 Span 3 RED 2 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)
T4XXP (PCI) Card 0 Span 4 RED 2 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)
Wildcard AEX800 OK 0 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)
CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State Description
pseudo default default In Service
1 from-digital au default In Service
2 from-digital au default In Service
3 from-digital au default In Service
4 from-digital au default In Service
as above all the way down to
62 from-digital au default In Service
125 from-analog au default In Service
126 from-analog au default In Service
127 from-analog au default In Service
128 from-analog au default In Service
129 from-analog au default In Service
130 from-analog au default In Service
131 from-analog au default In Service
132 from-analog au default In Service
The module unload and load made no difference to the above results. The only errors I get are on the load when it tells me my 4 FXS lines have a red alarm.
CLI> module unload
== Unregistered application ‘DAHDISendKeypadFacility’
== Unregistered application ‘DAHDISendCallreroutingFacility’
== Unregistered application ‘DAHDIAcceptR2Call’
== Manager unregistered action DAHDIDialOffhook
== Manager unregistered action DAHDIHangup
== Manager unregistered action DAHDITransfer
== Manager unregistered action DAHDIDNDoff
== Manager unregistered action DAHDIDNDon
== Manager unregistered action DAHDIShowChannels
== Manager unregistered action DAHDIRestart
== Manager unregistered action PRIShowSpans
== Manager unregistered action WATSendSms
== Manager unregistered action WATShowSpan
== Manager unregistered action WATShowSpans
== Unregistered channel type ‘DAHDI’
– Unregistered channel -2
– Unregistered channel 1
and so on down to 132

CLI> module load
== Registered application ‘DAHDISendKeypadFacility’
== Registered application ‘DAHDISendCallreroutingFacility’
– Registered libwat
== Parsing ‘/etc/asterisk/chan_dahdi.conf’: Found
== Parsing ‘/etc/asterisk/chan_dahdi_general.conf’: Found
== Parsing ‘/etc/asterisk/chan_dahdi_general_custom.conf’: Found
== Parsing ‘/etc/asterisk/chan_dahdi_channels_custom.conf’: Found
== Parsing ‘/etc/asterisk/chan_dahdi_groups.conf’: Found
== Parsing ‘/etc/asterisk/chan_dahdi_additional.conf’: Found
– Registered channel 1, ISDN PRI signalling
– Registered channel 2, ISDN PRI signalling
and so on down to
– Registered channel 62, ISDN PRI signalling
[2015-02-10 11:53:29] WARNING[6175]: chan_dahdi.c:8386 handle_alarms: Detected alarm on channel 129: Red Alarm
– Registered channel 129, FXS Kewlstart signalling
[2015-02-10 11:53:29] WARNING[6175]: chan_dahdi.c:8386 handle_alarms: Detected alarm on channel 130: Red Alarm
– Registered channel 130, FXS Kewlstart signalling
[2015-02-10 11:53:29] WARNING[6175]: chan_dahdi.c:8386 handle_alarms: Detected alarm on channel 131: Red Alarm
– Registered channel 131, FXS Kewlstart signalling
[2015-02-10 11:53:29] WARNING[6175]: chan_dahdi.c:8386 handle_alarms: Detected alarm on channel 132: Red Alarm
– Registered channel 132, FXS Kewlstart signalling
– Registered channel 125, FXO Kewlstart signalling
– Registered channel 126, FXO Kewlstart signalling
– Registered channel 127, FXO Kewlstart signalling
– Registered channel 128, FXO Kewlstart signalling
– Automatically generated pseudo channel
== Starting D-Channel on span 1
== Starting D-Channel on span 2
== Registered channel type ‘DAHDI’ (DAHDI Telephony Driver w/PRI & SS7 & MFC/R2 & WAT)
== Registered application ‘DAHDIAcceptR2Call’
== Manager registered action DAHDITransfer
== Manager registered action DAHDIHangup
== Manager registered action DAHDIDialOffhook
== Manager registered action DAHDIDNDon
== Manager registered action DAHDIDNDoff
== Manager registered action DAHDIShowChannels
== Manager registered action DAHDIRestart
== Manager registered action PRIShowSpans
== Manager registered action WATSendSms
== Manager registered action WATShowSpan
== Manager registered action WATShowSpans
Loaded => (DAHDI Telephony Driver w/PRI & SS7 & MFC/R2 & WAT)
== Primary D-Channel on span 2 up
== Primary D-Channel on span 1 up
– Restart requested on entire span 1
– Restart requested on entire span 2

Ahh so you are nearby then in relative terms but far enough further north to add several degrees to already warm temperatures. You must like the heat :smile:

Dahdi does seem to be up and happy, just working on the rest of the config. PSTN lines, RVA’s, SIP phones and then the E1’s to the DSLAM

Timing should be OK as the DSLAM has a reasonable clock which is passed thru the protocol converter, it was all working last time except for outgoing calls.

pri set debug 2 span 1 doesn’t show any issues with slips or errors

CLI> pri show span 1
Primary D-channel: 16
Status: Up, Active
Switchtype: EuroISDN
Type: Network
Remote type: CPE
Overlap Dial: 0
Logical Channel Mapping: 0
Timer and counter settings:
N200: 3
N202: 3
K: 7
T200: 1000
T201: 1000
T202: 10000
T203: 10000
T303: 4000
T305: 30000
T308: 4000
T309: 6000
T312: 6000
T313: 4000
T-HOLD: 4000
T-STATUS: 4000
T-CCBS1: 4000
T-CCBS2: 2700000
T-CCBS3: 20000
T-CCBS4: 5000
T-CCBS5: 3600000
T-CCBS6: 3600000
T-CCNR2: 10800000
T-CCNR5: 11700000
T-CCNR6: 11700000
Q931 RX: 1
Q931 TX: 1
Q921 RX: 370
Q921 TX: 370
Q921 Outstanding: 0 (TEI=0)
Total active-calls:0 global:1
CC records:
Overlap Recv: No

So… I’m a bit confused.

You appear to have a 4 port PRI card. You have a PRI link plugged into the first two ports. The other two ports are vacant.

However, you’re then trying do stuff to ports three and four which have nothing plugged into them.

Either way - you need to set them up in groups, properly, unless you really do care about the port – which you may do with the AEX800.

It’s a bit hard to help you out, however, if it’s real digium hardware, they DO offer support. Contact whoever you bought them from, and they’ll help you set it up properly.

Edit: Oh wait. I misread. Sorry. Yes, you’re right. You have channels 1-62 as PRI signalling. So you should add those channels to group 0. Then create a DAHDI trunk that uses that group, and THEN an outbound route that matches 6XXX (or … whatever the other end is expecting) that goes to that new DAHDi trunk group 0.

I think Rob is on the right track and your trunk(s)-? are possibly restrictively defined, just use one trunk G[012…] as appropriate or possibly g[012…] if it is a dslam on the other end and the protocol converter/dslam is not “glare aware” it will reduce call collisions and “isdn cause 0’s” , the group concept will skip busy channels without you having to worry about failover trunk sequences and “hunting” conversely for inbound/outbound calls on the same trunk has always been a “good thing”.

1 Like

Thank you very much for the help and guidance.

Good news I think the FreePBX side of things is all working properly. I can call out of FreePBX and see the call on the outgoing PRI. I haven’t quite got calls terminating properly on the DSLAM but that looks like a CIC misalignment between the protocol converter and DSLAM (which is now part of tomorrow’s problem :slight_smile: and nothing to do with FreePBX or the Digium cards).

Ultimately looks like you both correctly diagnosed my problem which was to do with outbound routing not going via groups.

Upgrading was a neat way around this because it created g0 as part of the install/firstboot script and with DAHDI config done the 2 spans were automatically put into the g0 group.

This new version is hugely more developed and whilst it seems the speaking clock has disappeared there is a lot more functionality available. I have also created a document with the rebuild info so I don’t have to try and remember what I did.

Thanks again. All the best David!

1 Like

The protocol converter is actually pretty smart. It doesn’t map between PRI and V5.2 but dynamically assigns. Can also do fancy SIP things but I haven’t got a driver’s licence for that part yet :smile: