All circuits busy - flowroute - IP based outgoing registration

For many months I have been dealing with this issue/trying to troubleshoot it.

The system is a PI4/“raspbx” - everything up to date. My inbound seems fine 24/7.
But, my outbound only works after a reboot for hours / days(?).

Eventually, the outbound starts up with “All circuits are busy.” “Please try your call again later.” And of course I usually discover this as I am about to make an important call out.

My outbound registration is setup at FLOWROUTE to do IP based auth. NOT passwords.

I have read many forum posts already and nothing seems to fit my problem precisely.

I turned up debugging. Side note: Had to turn the ‘full’ log back on (Settings/Asterisk Logfile Settings/Log Files) - somehow it was off since August.

At any rate, the only error I can find is this:

[2020-11-19 10:19:26] DEBUG[16465][C-00000008] pbx.c: Launching 'Dial'
[2020-11-19 10:19:26] VERBOSE[16465][C-00000008] pbx.c: Executing [[email protected]:27] Dial("PJSIP/100-00000008", "PJSIP/9999999*[email protected],300,Tb(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^19999999999^19999999999^1^1111111111^CallerIDNAMEREMOVED^13149999999)") in new stack
[2020-11-19 10:19:26] ERROR[28971] res_pjsip.c: Endpoint 'us-east-va.sip.flowroute.com': Could not create dialog to invalid URI 'us-east-va.sip.flowroute.com'.  Is endpoint registered and reachable?
[2020-11-19 10:19:26] ERROR[28971] chan_pjsip.c: Failed to create outgoing session to endpoint 'us-east-va.sip.flowroute.com'
[2020-11-19 10:19:26] WARNING[16465][C-00000008] app_dial.c: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[2020-11-19 10:19:26] VERBOSE[16465][C-00000008] app_dial.c: No devices or endpoints to dial (technology/resource)
[2020-11-19 10:19:26] DEBUG[16465][C-00000008] app_dial.c: Exiting with DIALSTATUS=CHANUNAVAIL.
[2020-11-19 10:19:26] DEBUG[16465][C-00000008] app_macro.c: Executed application: Dial
[2020-11-19 10:19:26] DEBUG[16465][C-00000008] pbx.c: Launching 'NoOp'

(I have masked the dialout numbers, outbound dial prefix and my originating # / callerid in output^.)

I can see the error, but not sure why it says that? I can still ping the provider. I think I can rule out nameserver failure.

And as I mentioned, if I reboot it, it works fine for however long-

I can make outbound calls for the rest of day (usually). Not sure how long it takes to finally give a failure on outbound, but once it fails, it stays that way till I reboot again.

Any help is appreciated.

That looks like a DNS/Network problem.

Are you using Flowroute server names or IP addresses in your PJ-SIP Configuration?

Flowroute updated their network some time ago and added a bunch of IP’s. I seem to remember that mostly affects inbound so that may not be your problem. Anyways, if you are using CHAN_SIP you need to add a separate trunk for each inbound IP address because an inbound call could be assigned to any one of them randomly.

I think there are something like 20-40 of them. You only need to configure the inbound part of the trunk and I think you only need 2 or 3 lines. host=xx.xx.xx.xx, context=from-trunk, type=peer. In your case, since it is affecting outbound, check if there is more than one outbound IP address associated with your assigned dns name and create a separate outbound trunk for that.

If you are using CHAN_PJSIP it is not a problem because it checks for any IP address associated with a DNS name. I think CHAN_SIP only checks the first one returned and only on initialization which is why a reboot or restart sometimes corrects the problem temporarily. If you have dig installed you can check for those ip’s by doing

dig your.assigned.flowroute.dnsname.com

This error tells us you are using PJ-SIP, so the Chan-SIP weirdness that usually causes this is probably not in play. This could be something crazy like you local DNS not caching the the IP address, a general failure in DNS, or some other network issues that we’re not going to be able to troubleshoot. If you are using a Firewall, you might want to look at that to make sure that the connections to the outside world are working reliably.

For outbound connections, I usually recommend that you pick the Flowroute POP that works best for you and put in its IP address so you avoid DNS strangeness.

1 Like

Thanks to you both for the replies. Yes, networking/dns was my first thought as well after seeing the log results above.

When it had this issue last, I ran dig both against localhost dns (caching) resolver (dnsmasq) -and- the LAN/local resolver (Unbound) and outside resolvers like google. All lookups worked fine. Tried phone call. “All circuits busy” / same error in log.

dig us-east-va.sip.flowroute.com
...
;; ANSWER SECTION:
us-east-va.sip.flowroute.com. 60 IN     A       34.226.36.32
;; Query time: 15 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)

dig @8.8.4.4 us-east-va.sip.flowroute.com A
...
;; ANSWER SECTION:
us-east-va.sip.flowroute.com. 11 IN     A       34.226.36.32
;; Query time: 22 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)

etc

Getting the feeling it’s something RPi related (or dnsmasq related), but searching for similar issues on ‘raspbx’/etc doesn’t yield anything helpful. Also, there is the fact that I ran freepbx updates the other day after the first post above. ‘Core’ updated among many others.
After the update I could make outgoing calls again and do not recall rebooting it.

At this point, I can only wait for the issue to show up again before I can run any more tests. If anyone has any suggestions in the meantime I am all ears…

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