FreePBX | Register | Issues | Wiki | Portal | Support

PJSIP trunks do not re-register


(Mike March) #1

Hi everyone. We are running FreePBX 13.0.194.2 and using pjsip for our trunks. Even though we have max retires set to 0 on the trunks, if we have an issue that prevents registration (an Internet outage for example) the trunks stop attempting to register after a certain number of attempts. When the Internet comes back, the trunks do not try to re-register. Am I missing something here? Is there another setting that needs to be set?

2018-04-16 02:30:15] WARNING[15782] res_pjsip_outbound_registration.c: Maximum retries reached when attempting outbound registration to ‘sip:username@sipserver:5060’ with client ‘sip:username@server:5060’, stopping registration attempt


(Lorne Gaetz) #2

How sure are you that setting max_retries to 0 means unlimited? I can’t find any docs to support this, you may be better off with a very high number. The tool tip states a max value of 1000000, but I can’t find any docs to support that either.


(Mike March) #3

I cant recall where I came across that information, possibly on this forum somewhere. If this is not correct, I will try setting the max retries to a very high number to see if that works. I am being told on another forum, that this is a known issue with pjsip and I should try using chan-sip.


#4

Assuming that the public IP address of your PBX is static, if your trunking provider supports IP authentication, consider using that in lieu of registration. As long as your connection is up when a call actually comes in, you should receive it. It also provides a security advantage (an attacker who somehow steals your SIP credentials won’t be able to make calls on your account or hijack your calls).


(Mike March) #5

So I set the retries to some ridiculously high number and ran a test. I disconnected the Internet on my test system, and while the logs show registration attempts, the trunk did not register once the Internet was restored (it registered once I disabled/enabled the trunk). It has been suggested in another forum that this is an issue with pjsip and I should change my trunks to chan-sip. I will probably do this as I cannot find another answer to this problem.

[2018-04-16 15:35:48] WARNING[2248] res_pjsip_outbound_registration.c: No response received from ‘sip:user@server:5060’ on registration attempt to ‘sip:user@server:5060’, retrying in ‘60’

Line 36575: [2018-04-16 15:55:33] VERBOSE[2253] res_pjsip/pjsip_configuration.c: Contact Test_Trunk/sip:user@server:5060 is now Reachable.