Softphone registers 2nd time, exceeding max contact count

Hi there. Running FreePBX distro.
Current PBX Version:14.0.1.31
Current System Version:12.7.4-1801-3.sng7
Asterisk Version: 13.18.4
Running on Dell server (no VM)

I have two Bria Softphone users, inside the network, that once in a while say “Account could not be enabled. Unknown error.” These users have both a softphone and a Yealink desk phone. The UCP softphone is disabled for all users (not really ready yet :smirk: ).

I’m posting with CounterPath as well, but want to see if anyone has run into this issue and solved it via FreePBX settings or not. I could obviously add another max contact, but this opens the door to unauthorized use of an extension.

When I look into asterisk logs I see the the softphone becoming unreachable, then trying to register again and getting max contacts error. (max contacts is set to 2 for these users). An hour or so later, it resets and is able to connect again. These users report not using the softphone for a chunk of time, then suddenly finding it erroring out.

[2018-03-27 14:50:54] VERBOSE[16862] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:52352;rinstance=59c7ef17126ac24c is now Unreachable. RTT: 0.000 msec
[2018-03-27 14:50:54] VERBOSE[16862] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:52352;rinstance=59c7ef17126ac24c is now Unreachable. RTT: 0.000 msec
[2018-03-27 14:53:05] WARNING[4874] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:53:18] WARNING[30110] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:53:18] WARNING[12895] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:53:51] WARNING[28588] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:53:52] WARNING[17863] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:55:00] WARNING[12895] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:55:01] WARNING[31962] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:57:58] WARNING[4874] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:59:05] WARNING[10624] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 14:59:06] WARNING[30110] res_pjsip_registrar.c: Registration attempt from endpoint ‘253’ to AOR ‘253’ will exceed max contacts of 2
[2018-03-27 15:28:57] VERBOSE[26545] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:52352;rinstance=59c7ef17126ac24c has been deleted
[2018-03-27 15:58:26] VERBOSE[31962] res_pjsip_registrar.c: Added contact ‘sip:[email protected]:54423;rinstance=4a6f5f03c68577f8’ to AOR ‘253’ with expiration of 3600 seconds
[2018-03-27 15:58:26] VERBOSE[16862] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:54423;rinstance=4a6f5f03c68577f8 has been created
[2018-03-27 15:58:26] VERBOSE[2070] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:54423;rinstance=4a6f5f03c68577f8 is now Reachable. RTT: 3.023 msec
[2018-03-27 15:58:26] VERBOSE[30319] res_pjsip_registrar.c: Removed contact ‘sip:[email protected]:54423;rinstance=4a6f5f03c68577f8’ from AOR ‘253’ due to request
[2018-03-27 15:58:26] VERBOSE[16862] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:54423;rinstance=4a6f5f03c68577f8 has been deleted
[2018-03-27 15:58:27] VERBOSE[14616] res_pjsip_registrar.c: Added contact ‘sip:[email protected]:54423;rinstance=4a6f5f03c68577f8’ to AOR ‘253’ with expiration of 3600 seconds
[2018-03-27 15:58:27] VERBOSE[16862] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:54423;rinstance=4a6f5f03c68577f8 has been created
[2018-03-27 15:58:27] VERBOSE[2070] res_pjsip/pjsip_configuration.c: Contact 253/sip:[email protected]:54423;rinstance=4a6f5f03c68577f8 is now Reachable. RTT: 7.305 msec

What I think is happening:

  • Extension 253 registered with an expiration of 60 minutes.
  • The extension thinks it’s dropped and it tries to re-register, but the old registration is still “awake” from the previous session.
  • The re-register fails because Asterisk thinks the old one is still active. The phone’s “new” registration fails so the phone doesn’t reconnect. Asterisk still thinks the old registration is active (since it hasn’t expired).
  • 30 minutes later, the phone actually disconnects.
  • 60 minutes later, the phone tries to reconnect and succeeds because Asterisk has deleted the registration.

As to solutions - try reducing all of the timeouts from hours to minutes or increase your number of contacts to 3. If you’re really concerned about the number of connections, you need find a more secure connection method. It’s dead simple for someone to take over one of your connections when no one is looking right now, so being concerned about setting the max contacts is just worrying about the wrong bad guy.

I understand that this should work the way you have it set up, but clearly that isn’t the case, so you’re going to have to jack around with the settings unless you can figure out if Bria or the network is causing the problem.

Thank you very much Dave. That is a helpful diagnosis. I will give this some testing.

And as to security, someone would still need the password, I imagine… so max contacts would prevent them from brute forcing the password. (not giving any response for a good or bad password). Be nice to hear people’s opinions on this… and maybe help newcomers on how they should set up their system.

is there any way to delet old registratios. i’m having the same problem, how did you change the local port from 5160 to 5260. this is happening in all the phone and they are all sangomas 500 and 405 and i have try manual configuration and epm with the same results chan sip

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