Can not make outbound calling on analog trunk

I have an Asterisk 1.6.2.7 system with a Digium TDM card with 2 FXO ports and 2 FXS ports. I think the card is in good shape. All its port lights are green, and I can make internal calls (within Asterisk) using a 2500 set connected to one of the FXS ports.

I have made a connection from one of the FXO ports to my company’s phone network, but I can not make outbound calls. I receive an “all circuits are busy” message. I can not make inbound calls either, but I will save that for later.

In FreePBX, I have set up a trunk and then linked an outbound route to it. In /var/log/asterisk/full, there is the following snippet:

[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:13] Set(“DAHDI/1-1”, “OUTNUM=92482”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“DAHDI/1-1”, “custom=DAHDI/g0”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“DAHDI/1-1”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:16] Macro(“DAHDI/1-1”, “dialout-trunk-predial-hook,”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“DAHDI/1-1”, “”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:17] GotoIf(“DAHDI/1-1”, “0?bypass,1”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“DAHDI/1-1”, “0?customtrunk”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:19] Dial(“DAHDI/1-1”, “DAHDI/g0/92482,300,”) in new stack
[Mar 7 17:13:02] WARNING[2837] app_dial.c: Unable to create channel of type ‘DAHDI’ (cause 0 - Unknown)
[Mar 7 17:13:02] VERBOSE[2837] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:20] NoOp(“DAHDI/1-1”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-dialout-trunk:21] Goto(“DAHDI/1-1”, “s-CHANUNAVAIL,1”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“DAHDI/1-1”, “RC=0”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“DAHDI/1-1”, “0,1”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Goto (macro-dialout-trunk,0,1)
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [0@macro-dialout-trunk:1] Goto(“DAHDI/1-1”, “continue,1”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Goto (macro-dialout-trunk,continue,1)
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [continue@macro-dialout-trunk:1] GotoIf(“DAHDI/1-1”, “1?noreport”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Goto (macro-dialout-trunk,continue,3)
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [continue@macro-dialout-trunk:3] NoOp(“DAHDI/1-1”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other trunks”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [continue@macro-dialout-trunk:4] Set(“DAHDI/1-1”, “CALLERID(number)=”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [92482@from-internal:5] Macro(“DAHDI/1-1”, “outisbusy,”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-outisbusy:1] Progress(“DAHDI/1-1”, “”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-outisbusy:2] GotoIf(“DAHDI/1-1”, “0?emergency,1”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-outisbusy:3] GotoIf(“DAHDI/1-1”, “0?intracompany,1”) in new stack
[Mar 7 17:13:02] VERBOSE[2837] pbx.c: – Executing [s@macro-outisbusy:4] Playback(“DAHDI/1-1”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack

This is my first post on this forum. I do not know yet whether I can attach any files to provide better information.

Thanks in advance for any help.

aghorn

I have an inbound call scenariou working now. If I set up an inbound route to go to a particular extension (set up a DID), then create a zap channel DID, and then edit chan_dahdi_groups.conf by updating the context for my channel:

context=from-zaptel

…then an inbound call goes to the extension I specified for the DID.

Well, I shutdown and powered off the Asterisk server. Then powered it back on and got dial tone to the 2500 set (on FXS port 1). And I am able to make outbound calls (using FXO port 3) to our inhouse extensions. Not sure why this kick started things.

I am unable to make inbound calls yet. I have set up an inbound route, but when calling from an inhouse extension I get a quick “Bye”. I am not sure who is sending this, but I suspect it is Asterisk.

Is the analog trunk a POTS line? If you plug a standard POTS phone onto it can you get a dial tone and make and receive calls?

Sorry for the delayed response. I am not dealing with a VoIP trunk. I am dealing with an analog trunk.

I don’t know where or anything about the connections on our legacy inhouse PBX. But I do know that I connect a proprietary VoIP PBX analog trunk port to the same legacy extension box and make trunk calls. So the connection at the legacy PBX is ok.

Here’s the deal…

If you are connecting to an FXO port on the Asterisk Server, you must connect to an FXS port on the legacy PBX. FXO must always connect to an FXS.

A VoIP trunk can’t be analog. The IP on VoIP stands for internet protocol, which is digital by nature.

The trunk port, FXO port 3 on the card, is connected to a telephone drop box of our inhouse legacy PBX system.

A few days ago, I was able to make outbound calls to a legacy PBX extension but not inbound calls. I could also make calls from a 2500 set connected to the FXS port 1 on the card to other Asterisk extensions. The 2500 set would get dial tone from Asterisk.

Unfortunately, I do not get either now. The Asterisk system may have been rebooted since then. I am not sure (power outage?). It may have been lucky to have had this much working and not had things properly configured.

I know this doesn’t help much, but that was the situation.

Then the port to which you are connected on the legacy is FXS?

No. The FXS is connected to the 2500 set. The FXO is connected to the legacy PBX extension.

The FXO on the Asterisk box should be connected to the FXS on the Legacy Box.

BF

I know this may be obvious, but do you the card plugged into the FXS Port?

I have the trunk plugged into a FXO port, port 3 on the card.

If you connect a phone to the trunk, do you have dialtone?

Let me restate that…

What port are you connecting to on your legacy pbx? Is it pulling dialtone from the the FreePbx Server?

Yes, 92482 is short. It is an external call from Asterisk’s perspective. I am actually calling my extension in our office. I have the analog card port connected to an office extension from which outbound Asterisk calls can go to other internal office extensions or destinations outside our office (with another 9 added to the dialing).

Is this DAHDI/g0/92482 the expected number you are dialing? Seem rather short? This is an internal or external call?

i think something may be wrong with your dahdi installation. Can you type on Asterisk cli “dahdi show channels” and see also, on the linux box, type dahdi_tool

Thank you for responding. This is what they show. Now my analog set is not getting dial tone. A system reboot may have occurred in the intervening time. I can not remember.

Chan Extension Context Language MOH Interpret Blocked State

pseudo default default InService

1          from-internal    default               InService

2          from-analog      default               InService

3          from-analog      default               InService

4          from-analog      default               InService

dahdi_tool shows:

Wildcard TDM400P Rev H Board 5

Current Alarm: No alarm
Sync Source: Internally clocked
IRQ Misses: 0
Bipolar Unit: 0
Tx/Rx Levels: 0/0
Total/Conf/Act: 4/4/0

  1234

TxA ----
TxB ----
TxC ----
TxD ----

RxA ----
RxB ----
RxC ----
RxD ----