I recently got service from Net2Phone. We have an issue with the trunk being refresh at the wrong time. Currently the refresh is set somewhere to 45 , I need to change that setting to 60.
I looked everywhere on how I could modify that setting but with no success. I looked under “Asterisk SIP Settings”> one setting is Registertimeout=20 but whatever I put into it , it still shows 45.
Any help would be very appreciated.
Thanks
David
This is what shows under the Chan_Sip Registry (the 45 is what I would like to change):
Host dnsmgr Username Refresh State Reg.Time siptrunk.net2phone.com:5060 Y 8764771 45 Registered Fri, 14 Jun 2019 10:06:52
1 SIP registrations.
Asterisk REGISTER requests ‘suggest’ an expiry time of Registration Default Expiry, but that can be overridden by the provider in the response. Then, Asterisk will normally start attempting to reregister 15 seconds before expiration, to be reasonably sure that the new registration is successful before time runs out.
The trunk setting defaultexpiry can override the default, though that can still be overridden by the provider.
To see what is happening in detail, at the Asterisk command prompt, type sip set debug on
and wait for a REGISTER request and the response to be displayed / logged.
Why are you using chan_sip in the first place?
If you have a static IP address and Net2Phone offers IP Authentication, you probably shouldn’t be using registration at all.
Thank you for your prompt response.
I have been working with the provider for more than a week to try to figure out this issue and everywhere online I found the same answer: The provider can override the registration expiration. When I mentioned that to the provider, he tells me it’s my FreePBX that needs to be updated.
He told me that if we can’t fix that then we will do IP Authentication.
I run the SIP debug and this is what I am getting . I will post it on a separate reply
OK, so the net2phone response to your REGISTER contains Contact: sip:[email protected]:5060;expires=60
Asterisk subtracts 15 seconds from 60 and starts a new registration after 45 seconds. This is perfectly normal. Why does anyone care?
Anyhow, IP authentication is the better approach and you should switch to that. There is never an issue with ‘lost registration’, it’s a little more secure (no credentials for an attacker to steal) and it’s faster (no need for challenge / authorize on every call).
For some reason the tech support told me to use IP authentication if we still have issue. I am not sure why we didn’t set it up right from the beginning.I will make sure to switch to this registration at the first issue we have.
Thanks again