Can receive calls but can't make calls, All circuits are busy

This is a new installation of Asterix PBXact 16 on hardware that was running version 15 previously. The upgrade process failed so I decided to just do a fresh install. I’m using Twilio as my SIP provider. I’m able to receive calls but I’m not able to make calls. I’ve set up notifications for both my 911 and standard outbound routes but I never get any emails. I’ve set up the email in the sys admin and that tests fine in that I can send out emails fine. At one point I was able to make an outbound call after rebooting the server but a short while later, it stopped working.

Outbound route:
Name: Emergency 911
Route CID: “company name” (I’ve also tried just the phone number.)
Override Extension: Yes
Trunk Sequence: Twilio-Us1-North-America-Virgina
Twilio-US2-North-America-Oregon
Dial Patterns:
+, blank, 1911
+, blank, 1933
+1, blank, 911
+1, blank, 933

Name: TwilioSIPOutbound
Route CID: “Company”
Override Extension: No
Trunk Sequence: Twilio-Us1-North-America-Virgina
Twilio-US2-North-America-Oregon
Dial Patterns:
+, blank, 1NXXNXXXXXX
+1, blank, NXXNXXXXXX

Trunks:
Name: Twilio-US1-North-America-Virginia
Type: pjsip
Hide Caller ID: No
Outbound Caller ID: +1[number associated with trunk]
CID Options: Allow Any CID
Asterisk Trunk Dial Options: Tt
pjsip settings:
Auth: None
Reg: None
SIP Server: [company].pstn.ashburn.twilio.com
SIP Server Port: 5060
Context: from-pstn-e164-us
Transport: 0.0.0.0-udp
DTMF Mode: RFC 4733
ulaw only codec checked.
Second trunk is configured the same except the name.

Log for a 933 call:

86491	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [702[outbound #]@from-internal:7] GotoIf("PJSIP/4003-0000001d", "1?restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb,[outbound #],2:outbound-allroutes,702[outbound number],2") in new stack
[...]
86521	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:3] ExecIf("PJSIP/4003-0000001d", "0 ?Set(CDR(accountcode)=)") in new stack	
86522	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:4] Set("PJSIP/4003-0000001d", "_ROUTEID=4") in new stack	
86523	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:5] Set("PJSIP/4003-0000001d", "_ROUTENAME=TwilioSIPOutbound") in new stack	
86524	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:6] Set("PJSIP/4003-0000001d", "MOHCLASS=default") in new stack	
86525	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:7] ExecIf("PJSIP/4003-0000001d", "0?Set(TRUNKCIDOVERRIDE="Blackstar"<+17027107756>)") in new stack	
86526	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:8] Set("PJSIP/4003-0000001d", "_CALLERIDNAMEINTERNAL=Extension 4003") in new stack	
86527	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:9] Set("PJSIP/4003-0000001d", "_CALLERIDNUMINTERNAL=4003") in new stack	
86528	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:10] Set("PJSIP/4003-0000001d", "_EMAILNOTIFICATION=TRUE") in new stack	
86529	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:11] Set("PJSIP/4003-0000001d", "_NODEST=") in new stack	
86530	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [[outbound #]@restrictedroute-b7b2d5a8d1b4d64f0e89e293d4ac08eb:12] Macro("PJSIP/4003-0000001d", "dialout-trunk,1,+1[outbound #],,off") in new stack	
86531	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/4003-0000001d", "DIAL_TRUNK=1") in new stack	
86532	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:2] UserEvent("PJSIP/4003-0000001d", "zulu-outbound-call,from:4003,to:+1[outbound #]") in new stack	
86533	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:3] ExecIf("PJSIP/4003-0000001d", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack	
86534	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/4003-0000001d", "0?Set(DIAL_OPTIONS=HhTr)") in new stack	
86535	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:5] ExecIf("PJSIP/4003-0000001d", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack	
86536	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:6] GosubIf("PJSIP/4003-0000001d", "0?sub-pincheck,s,1()") in new stack	
86537	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:7] ExecIf("PJSIP/4003-0000001d", "0?Set(CALLERID(num)=4003)") in new stack	
86538	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:8] GotoIf("PJSIP/4003-0000001d", "0?disabletrunk,1") in new stack	
86539	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:9] Set("PJSIP/4003-0000001d", "DIAL_NUMBER=+1[outbound #]") in new stack	
86540	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:10] Set("PJSIP/4003-0000001d", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack	
86541	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:11] Set("PJSIP/4003-0000001d", "OUTBOUND_GROUP=OUT_1") in new stack	
86542	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:12] Set("PJSIP/4003-0000001d", "DIAL_TRUNK_OPTIONS=Tt") in new stack	
86543	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:13] ExecIf("PJSIP/4003-0000001d", "0?Set(DIAL_TRUNK_OPTIONS=t)") in new stack	
86544	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:14] GotoIf("PJSIP/4003-0000001d", "1?nomax") in new stack	
86545	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx_builtins.c: Goto (macro-dialout-trunk,s,16)	
86546	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:16] GotoIf("PJSIP/4003-0000001d", "0?skipoutcid") in new stack	
86547	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:17] Macro("PJSIP/4003-0000001d", "outbound-callerid,1") in new stack	
86548	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/4003-0000001d", "4003") in new stack	
86549	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/4003-0000001d", "") in new stack	
86550	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/4003-0000001d", "off") in new stack	
86551	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/4003-0000001d", "0?Set(CALLERPRES(name-pres)=)") in new stack	
86552	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/4003-0000001d", "0?Set(CALLERPRES(num-pres)=)") in new stack	
86553	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:6] Set("PJSIP/4003-0000001d", "HOTDESCKCHAN=4003-0000001d") in new stack	
86554	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:7] Set("PJSIP/4003-0000001d", "HOTDESKEXTEN=4003") in new stack	
86555	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:8] Set("PJSIP/4003-0000001d", "HOTDESKCALL=0") in new stack	
86556	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:9] ExecIf("PJSIP/4003-0000001d", "0?Set(HOTDESKCALL=1)") in new stack	
86557	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:10] ExecIf("PJSIP/4003-0000001d", "0?Set(CALLERID(name)=)") in new stack	
86558	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:11] Set("PJSIP/4003-0000001d", "ALLOWTHISROUTE=NO") in new stack	
86559	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:12] ExecIf("PJSIP/4003-0000001d", "0?Set(ALLOWTHISROUTE=YES)") in new stack	
86560	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:13] ExecIf("PJSIP/4003-0000001d", "0?Hangup()") in new stack	
86561	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/4003-0000001d", "0?Set(REALCALLERIDNUM=4003)") in new stack	
86562	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/4003-0000001d", "0?Set(AMPUSER=4003)") in new stack	
86563	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-outbound-callerid:16] GotoIf("PJSIP/4003-0000001d", "1?normcid") in new stack	
86564	[2025-08-15 14:08:12] VERBOSE[13661][C-00000019] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)	
[...]
86615	[2025-08-15 14:08:13] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:40] NoOp("PJSIP/4003-0000001d", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 3") in new stack	
86616	[2025-08-15 14:08:13] VERBOSE[13661][C-00000019] pbx.c: Executing [s@macro-dialout-trunk:41] GotoIf("PJSIP/4003-0000001d", "0?continue,1:s-CHANUNAVAIL,1") in new stack	

When you performed a fresh install, did you have to manually configure things for the Twilio outbound on the FreePBX side? I believe the Hangup Cause - 3 means no route to destination. This Twilio reference document is a bit dated, but speaks to aligning both sides → Twilio Doc

Twilio doesn’t require a +1 for 911 calls. These would fail to route because you’re adding +1. You need to fix this. None of your users should be dialing a 1 in front of 911 or 933.

1 Like

Yes, I followed those instructions as I have in the past but no luck this time.

I have the same dial patterns working elsewhere but just for testing I removed the +1 and still didn’t work. It’s as if it’s not matching any of the patterns. I have notifications turned on and an email notification never gets sent.

I removed the +1 and still didn’t work

I suspect that the notifications aren’t being sent due to the calls not being completed. Tom is correct, in that Twilio is looking for the + being passed along, but usually just 911 or 933 is the only other thing being passed along to them. We have Twilio SIP trunking connected to our FreePBX, and it’s all working fine based on standard dial patterns and whatnot.

It should be:

+, blank, 911
+, blank, 933

Did you go through the link I sent that outlines how to ensure both the FreePBX and the Twilio side are configured to be on the same page?

Yes, I did go through that document, several times in fact. I have other PBXact installs and they all have four dial patterns and work find.

I tried the following:

blank, blank, 911
blank, blank, 933
+, blank, 911
+, blank, 933

and none of those worked. Still all circuits are busy.

Reviewed our configuration again. Twilio looks for the + prefix for a “long number.” When it comes to 911 or 933, they aren’t looking for any prefix. So for us at least:

blank, blank, 911
blank, blank, 933

Works fine.

That doesn’t work either. I used the 933 example because it’s easy but I must point out that dialing ANY number generates an “All circuits are busy” message. I see nothing on the twilio end so clearly, it’s not finding a valid route. This is really strange as I’ve done dozens of PBXact but this is my first Asterisk 16 install.

That log you first posted appears as if the outbound route is being selected for placing the call. And you’re sure that the public IP of the PBX is allowed to connect to the port on Twilio’s end?

Hey, 11 posts but no resolution for a simple problem? We need details. Please turn on pjsip logger, make a failing test call to 933, paste the Asterisk log for the call at pastebin.com and post the link here.

Yes, the public IP has not changed and when I detect from the SIP settings in PBXact, it detects the external IP correctly. Nothing has changed as far as port forwards and policies since this is technically an existing installation from the firewall perspective. Unless there is a new requirement for Asterisk 16, nothing should need to be changed. The server is using the same internal IP as it was under the older version of Asterisk.

Here is a log with pjsip logger enabled and I made a 933 call.

PBXact Log 933 Call - Pastebin.com

You have a space in the SIP URI:

sip: redmoontower.pstn.ashburn.twilio.com:5060 needs to be sip:redmoontower.pstn.ashburn.twilio.com:5060

2 Likes

That was it. Maybe the GUI should strip any leading whitespace. Thanks!

I’ve had the same issue—“All circuits are busy” usually points to an outbound route or trunk misconfiguration. Double-check your dial patterns and make sure your SIP trunk is registered correctly. I also log all call attempts through Phonexa on the backend—it gives me detailed traceability and makes it easier to spot what’s breaking in real time.

Did you previously use Twilio on your version 15 ?
What is your firewall ? Is it the same firewall you were using when you were using ver 15 ?

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