I had a bad morning :-). Inbound calls on 3 FreePBX 14 stopped to work and after some searching in the log files I found out the following situation:
For whatever reason during the night our VoIP provider had a problem with his authentication server and it was not only a timeout during the maintenance, they also sent an authentication error back. They solved their problem, but Asterisk stopped to try re-registering after 3 tries.
[Mar 2 17:50:30] NOTICE chan_sip.c: Failed to authenticate on REGISTER to ‘[email protected]’ (Tries 3)
[Mar 2 17:50:50] NOTICE chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #4)
[Mar 2 17:50:50] NOTICE chan_sip.c: Failed to authenticate on REGISTER to ‘[email protected]’ (Tries 3)
[Mar 2 17:51:10] NOTICE chan_sip.c: – Registration for ‘[email protected]’ timed out, trying again (Attempt #8)
[Mar 2 17:51:10] WARNING chan_sip.c: Forbidden - wrong password on authentication for REGISTER for ‘43123456’ to ‘sip.domain.at’
After a reload of Asterisk it registered again and all was fine. To make finding the problem even harder, outgoing calls worked as expected because each call does its own registration separated from the inbound registration.
Question: Is it possible to let Asterisk retry forever, even the “Failed to authenticate” occurs? The retry setting in SIP setting is set to 0, so timeout retries endlessly.
Thank you for any hint.
There’s a PJSIP parameter that controls this:
It’s time to be using pjsip for your trunks anyway.
Thank you for your answer. FreePBX 22.214.171.124 does not have this setting for pjsip, but it has the registration settings for SIP, which is set to 0, means endlessly. This works as long as there is no "Failed to authenticate " . If this happens it stops retrying registration after 3 tries. I do not want to blind change to PJSIP without testing in advance, so i am looking for a fast solution to increase this 3 tries. Unsure if PJSIP will work that out, or if PJSIP also only retries if no "Failed to authenticate " occurs.
There was a time when I knew chan_sip config without consulting docs, but no longer. Notwithstanding that the FreePBX tool tip that states a value of 0 = infinite retries, that is not documented in the sip.conf sample file. here: https://github.com/asterisk/asterisk/blob/master/configs/samples/pjsip.conf.sample#L1340
In my very quick search, I couldn’t find documented support for 0=infinite retries. Perhaps someone recalls details of this parameter better than I do.
In any case, it’s past time to be using chan_sip for anything. This coming fall Asterisk 20 will be released, and it will not support chan_sip at all.
Thank you for your answer again. Looks like I will check which Asterisk Version does not use PJSIP before 2.12 to be safe and then swith to PJSIP. Currently FreePBX 14 has Asterisk 13. Will start updating one box to see how it works out.
jfrog . com/blog/jfrog-discloses-5-memory-corruption-vulnerabilities-in-pjsip-a-popular-multimedia-library/#impacted
Asterisk does not use any version of pjsua, which is what the alert is about.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.