Every Morning "All Circuits are busy try your call again later"

Hi Everyone,

I have a new system running FreePBX 13.0.190.19

Every morning when we come in, we are unable to make any outgoing calls. We get the message (All circuits are busy, please try your call again later.) This has been happening every day since we installed the system about 10 days ago.

So for the first few days I would tweak something and it would start working again. But I have realized it has nothing to do with the tweaking I’m doing. It almost seems like I have to wake the system up before it will allow outgoing calls!?!?!

Here is the error from today (I’m replacing the IP address below with dashes for obvious reasons:

[2017-04-26 09:09:14] WARNING[2327][C-000000d0]: chan_sip.c:23875 handle_response_invite: Received response: “Forbidden” from ‘“Hooman Morvarid” <sip :[email protected]–.--.—.---:5160>;tag=as328c12c8’

[2017-04-26 09:09:18] WARNING[19255][C-000000d0]: channel.c:4982 ast_prod: Prodding channel ‘SIP/111-00000250’ failed

[2017-04-26 09:11:45] WARNING[19471][C-000000d2]: channel.c:4982 ast_prod: Prodding channel ‘SIP/111-00000254’ failed

[2017-04-26 09:11:48] WARNING[2327][C-000000d3]: chan_sip.c:23875 handle_response_invite: Received response: “Forbidden” from ‘“Hooman Morvarid” sip:[email protected]:5160;tag= as787ff0c6’

I would really appreciate any suggestions on how to troubleshoot this?

Thank you in advance.

Does this only happen on the first call of the day, or the first X minutes of the day?

Yes this only happens first thing in the morning and won’t allow any outgoing calls until I log into FreePBX and make any kind of change to kick start it. If that makes any sense! LOL

Yes. Any kinda change, then you hit apply changes?

Yes so what is causing this?

When you hit Apply Config, it reloads Asterisk, and by doing so reconnects your SIP trunks.

Take a look at your logs. You’ll likely see a message saying that the connection has been lost or timed out. I forget the exact wording… You should also see numerous retries to reconnect it.

Are you trying to connect to a SIP provider or another asterisk server?

To a SIP Provided 2Talk.com

I can’t find anything in the log referencing lost connection or timed out or retry or reconnect?!!

All it says is the original error I put:

[2017-04-26 13:15:02] WARNING[2327][C-000000ef] chan_sip.c: Received response: “Forbidden” from ‘“Hooman Morvarid” sip:[email protected]:5160;tag=as10f7cd39’

Under the SIP trunk settings (Outgoing and Incoming) add qualify=yes, and then submit and apply.

I think your Firewall is closing on you.

Maybe this helps,
for me the problem was that it stopped trying to reconnect after a lost connection when there was a 403 forbidden
this solved it.

Our Provider said the “Forbidden” can occour when the connection was lost and is still registred by the provider. Then it takes some minutes until you can re-register. In this time your PBX shows 403 Forbidden. Asterisk does not try to reconnect by default after a 403 error.

With this setting it makes the retry.

sip_custom.conf
register_retry_403=yes

https://issues.freepbx.org/browse/FREEPBX-14249

Thanks Greg,

I looked in my SIP Trunk Settings and I have qualify=yes in the Outgoing tab. In the Incoming tab I only have the Register String and nothing else. But I’m assuming since this is an outgoing call issue, then this is fine?!?

Hi Matthias,

Thank you for your help. I read a little more following the link you provided and checked everything and it seems to be setup properly. But one thing I need to know, where do I put this: register_retry_403=yes

Is this in a file called sip_custom.conf and if so can I access it through the FreePBX Application?

Depends - if your Outgoing server is the same as the Incoming Server then yes, the qualify on the Outgoing should be enough - if they are different, put it in both places.

As to the register_retry_403=yes, that can go under SIP Settings - Chan SIP at the bottom.

I put this line under sip_custom.conf
It is available in the freepbx module “Config Edit”

Thank you so much, Matthias and Greg. I have followed both suggestions and will let you know what happens tomorrow.

I really appreciate the help either way though.

So yesterday all my numbers finally ported to my 2Talk.com account. I started to see this message when making an outgoing call:

[2017-04-28 09:02:37] WARNING[2307][C-00000031]: chan_sip.c:23875 handle_response_invite: Received response: “Forbidden” from ‘“Hooman Morvarid” sip:[email protected]:5160**.**.***.***;tag=as23430876’
[2017-04-28 09:02:37] WARNING[2257]: func_cdr.c:383 cdr_write_callback: CDR requires a value (CDR(variable)=value)

I have a total of 6 trunks all setup separately in my FreePBX. So I decided to put all of them as an option for outgoing routes. The first 5 get the error above and the last one is able to go through!

All the numbers start with 818-553-**** the only one that does not start with that prefix is the one that works!

I’m not sure if this is relevant but that is really the only difference I see. Hopefully you guys can come up with a theory because I am dumb founded with this!>?

Here is a screen shot:

Maybe it’s time to talk with you SIP provider.

Hi,

I had this with Voiptalk.org. Called them and no help. In the end I altered the order of my trunk config file (sip outgoing calls - tried all sorts of combinations - trial and error ) and since its been perfect. Will update this when I get home (and can copy the order).

Dan

I’ve been talking to them but since one of the numbers is working, they are telling me that they are all setup the same way. So if one works then they should all work.