-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 14
-
Fix Version/s: None
-
Component/s: Asterisk SIP Settings
-
Labels:None
-
Asterisk Version:16.9.0
The problem is that if you specify a STUN server in SIP Settings and for some reason there is a problem with that server, Asterisk gets real flaky about completing calls, even local calls that are entirely on the local network using PJSIP. When you dial a number it will be 10-15 seconds before ringing tone is heard, and then another 10 seconds or so before the called phone actually begins ringing (during which time the caller has heard two rings). There is no indication of the problem in the Asterisk CLI or log, so the system administrator can only guess at what is causing the problem. Note that a STUN server can work fine for months or years, so there is no direct correlation between setting a STUN server address and the sudden call delays that may occur only months or even years later. Therefore this becomes an extremely difficult issue to resolve, especially if you have recently made other changes to the system, because you'll probably first suspect one of those changes as being the culprit.
What I specifically think FreePBX should do, at least until this problem is fixed in Asterisk, is try to warn users against specifying a STUN server unless they really need one (which most users don't). At the very least this issue should be mentioned in the tooltip that pops up when you mouse over the question mark icon, but I would personally prefer to see where if a STUN server address is set, a box pops up that says something like this:
"WARNING: Be aware that STUN server failure or connectivity issues can cause call completion times to increase significantly, even on extension-to-extension calls that never leave the local network. The Asterisk log file and/or Asterisk CLI will not give you any indication that you are having STUN server issues. Therefore it is probably not a good idea to specify a STUN server address unless you know you really need one to resolve some specific issue. Most users do not need to specify a STUN server, and should leave this setting blank."
As for Asterisk itself, I see at least three issues here:
1. That STUN server failures or delays have any impact at all on calls that stay entirely on the same local network.
2. That STUN server failures or delays are not reported in the Asterisk CLI or log file.
3. That there is no way (at least not in the FreePBX interface) to enter a secondary STUN server that can be used if the primary one doesn't respond within a second or two. However that is the least important issue, because if the system gives the administrator no indication at all that a STUN server connection is failing, then it could only be a matter of time until the secondary server also fails, and in the meantime all calls would still be delayed by whatever amount of time it takes to check the primary server and wait for it to fail.