Sip trunk status rejected – no notification, no re-registraton

I have a strange issue that I encounter once in a while. A similar thread was created 7 months ago, but this didn’t really help. In total I’ve set up 8 (pjsip) trunks, 6 with the same provider plus 2 with others. On the dashboard everything looks fine, trunks online: 8. In reports -> Summary status looks “quite” OK, PJSip Endpoints: available 8, unavailable 0, unknown 2 (BTW, what is unknown?). When I look into Reports -> Registries, I see that sometimes some trunks are in status rejected. Not always the same trunks go into rejected and not all trunks of the same provider are affected.

Now the things that bother me:

  1. Where in the logs can I find an information when and why the trunks switch to rejected? In none of the logfiles (Reports -> asterisk logfile) can I find something that helps
  2. Why don’t the trunks reconnect automatically? At the moment I help myself by manually disabling one trunk, and reenabling it, thus all other rejected trunks also switch back to registered.
  3. How can I set up an email notification if one of the trunks turn to rejected?

This really gives me a headache if trunks go offline unnoticed and without obvious reason.

Current Asterisk Version is 13.19.1 (I’ll run an upgrade later), currently no commercial modules are installed. Anyway, the above questions are independent of the asterisk version.
Other individual PJSIP settings:
Permanent Auth Rejection: enabled
Forbidden Retry Interval: 10
Fatal Retry Interval: 0
General Retry Interval: 60
Expiration: 120
Max Retries: 999

Thanks for reading & your help,

I assume these trunks are all going to the various IP address your SIP provider uses for calls, right?

If more than one of them is going to a specific IP address, your configuration might be getting confused about how to connect and what to connect to.

The ‘full’ log from the CLI only goes back 500 lines, so this may not get you enough history to troubleshoot the problem. Try opening the file /var/log/asterisk/full (I’d use ‘more’) and see if you can find the reference to your trunk dropping.

1 Like

6 go to the same address, the other 2 to two other addresses. Rejected trunks are spread across sip providers and not only the the one that is used for the 6 going to the same address.

Ah, ok. There I see for one of the rejected trunks:

[2018-04-10 14:40:12] WARNING[20911] res_pjsip_outbound_registration.c: Fatal response ‘401’ received from ‘’ on registration attempt to ‘sip:00497…’, stopping outbound registration

Before that the only message is 10 hours earlier:

[2018-04-10 04:10:15] WARNING[28267] res_pjsip_outbound_registration.c: No response received from ‘’ on registration attempt to ‘sip:00497…’, retrying in ‘60’

Maybe my expecation is too demanding,but what can be done to prevent a crucial part of a telephony system stop operating in a hidden fashion?

Because of the way that Asterisk handles trunks, are you certain you need six trunks to the same IP address? Not sure what you are doing, but that sounds like a recipe for disaster…

Well, with the same provider it’s 6 different phone numbers that require separate sip-user and sip-password.
Giving up the numbers is not an option and setting up separate asterisk-installations per number seems also a bit extreme. The last 8 or so years this has been running smoothly on an avm fritz!box.

What approach would you recommend?