All circuits are busy with outbound call on trunk

I am having trouble making outbound calls through a trunk on a new FreePBX install. I think I might have a dial pattern problem, but I can’t figure it out.

When I dial a 7-digit number (5551212), I get:

A 10-digit number (6185551212) gets me:

Dialing 11 digits (16185551212) gets me:

== Setting global variable ‘SIPDOMAIN’ to ‘’
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– Executing [[email protected]:1] ResetCDR(“PJSIP/202-0000003b”, “”) in new stack
– Executing [[email protected]:2] NoCDR(“PJSIP/202-0000003b”, “”) in new stack
– Executing [16185551[email protected]:3] Progress(“PJSIP/202-0000003b”, “”) in new stack
– Executing [[email protected]:4] Wait(“PJSIP/202-0000003b”, “1”) in new stack
> 0x7f8354543650 – Strict RTP learning after remote address set to:
> 0x7f8354543650 – Strict RTP switching to RTP target address as source
– Executing [[email protected]:5] Playback(“PJSIP/202-0000003b”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <PJSIP/202-0000003b> Playing ‘silence/1.ulaw’ (language ‘en’)
– <PJSIP/202-0000003b> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
– <PJSIP/202-0000003b> Playing ‘check-number-dial-again.ulaw’ (language ‘en’)
– Executing [[email protected]:1] Macro(“PJSIP/202-0000003b”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/202-0000003b”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“PJSIP/202-0000003b”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] NoOp(“PJSIP/202-0000003b”, " montior file= ") in new stack
– Executing [[email protected]:5] GotoIf(“PJSIP/202-0000003b”, “1?skipagi”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] Hangup(“PJSIP/202-0000003b”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/202-0000003b’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/202-0000003b’

My trunk has dial patterns of:

Prepend 1618 (noprefix) NXXXXXX
Prepend 1 (noprefix) NXXNXXXXXX

In summary, dialing 7 and 10 digits give me the “All circuits are busy” message. Dialing 11 gives me the “Your call cannot be completed as dialed.” Interestingly, dialing the echo test number, 4443, gets me the same “Your call cannot be completed as dialed” message.

Can somebody point me in the right direction?

You need to add patterns to your Outbound Route to allow dialing 1NXXNXXXXXX and 4443.

The 7- and 10-digit calls were rejected by I’m guessing that the caller ID you sent was not acceptable. I believe that they require 10 digits on calls to North America, but starting with the country code for overseas calls.

If that’s not it, at the Asterisk command prompt type
pjsip set logger on
make another failing call, paste the Asterisk log for the call (which will now include a SIP trace) at and post the link here.

With luck, the trace will tell us why the call was rejected.

Thanks for the reply.

I typed pjsip set logger on and tried again. Here’s the output from that attempt:

Looks like I have the issue solved! I think there was a problem with the trunk no registering.

Thanks for the help, Stewart!

I don’t believe that requires registration to make a call (they authenticate each outgoing INVITE), but it’s certainly possible that whatever you did to fix registration also affected outbound.

Line 345: From: <sip:[email protected]>;tag=2d95f6da-0157-4655-888a-280a8e569bb5
seems wrong. rejected the INVITE before authentication. I’m not a customer and don’t know whether they require a username in the From header. If they do, you would need a From User setting in the trunk. If they don’t (they use the auth ID supplied when they authenticate), then 202 is not a valid caller ID.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.