Net2Phone Trunk Refresh

Hi Experts,

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.

Why is this causing trouble?

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.

Stewart1,

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

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog '[email protected]:5060 ’ Method: OPTIONS
Really destroying SIP dialog ‘[email protected]’ Method: R EGISTER
Really destroying SIP dialog ‘[email protected]’ Method: RE GISTER
[2019-06-18 13:39:45] NOTICE[2976]: chan_sip.c:15753 sip_reregister: – Re-re gistration for [email protected]
REGISTER 12 headers, 0 lines
Reliably Transmitting (NAT) to 169.132.196.33:5060:
REGISTER sip:siptrunk.net2phone.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.31:5060;branch=z9hG4bK223a826b;rport
Max-Forwards: 70
From: sip:[email protected];tag=as050203d3
To: sip:[email protected]
Call-ID: [email protected][::1]
CSeq: 6905 REGISTER
Supported: replaces, timer
User-Agent: FPBX-14.0.11(13.22.0)
Authorization: Digest username=“Username”, realm=“net2phone”, algorithm=MD5, u ri=“sip:siptrunk.net2phone.com”, nonce=“04BBF7AAAC55D33029ACEE10BCF8A857”, respo nse=“b06fc5743cd729190dc5f3e214ec350f”
Expires: 120
Contact: sip:[email protected]:5060
Content-Length: 0


<— SIP read from UDP:169.132.196.33:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.31:5060;branch=z9hG4bK223a826b;received=104.52.126.14 5;rport=5060
From: sip:[email protected];tag=as050203d3
To: sip:[email protected]
Call-ID: [email protected][::1]
CSeq: 6905 REGISTER
Server: net2phone
Contact: sip:[email protected]:5060;expires=60
Content-Length: 0

<------------->

<------------->
— (8 headers 0 lines) —
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog ‘sbcctl_b10sb08_698624005_b53sep03_2136211_7_201906 1814390949_9669’ Method: ACK
[2019-06-18 13:40:30] NOTICE[2976]: chan_sip.c:15753 sip_reregister: – Re-re gistration for [email protected]
REGISTER 12 headers, 0 lines
Reliably Transmitting (NAT) to 169.132.196.33:5060:
REGISTER sip:siptrunk.net2phone.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.31:5060;branch=z9hG4bK3a0ba204;rport
Max-Forwards: 70
From: sip:[email protected];tag=as050203d3
To: sip:[email protected]
Call-ID: [email protected][::1]
CSeq: 6906 REGISTER
Supported: replaces, timer
User-Agent: FPBX-14.0.11(13.22.0)
Authorization: Digest username=“Username”, realm=“net2phone”, algorithm=MD5, u ri=“sip:siptrunk.net2phone.com”, nonce=“04BBF7AAAC55D33029ACEE10BCF8A857”, respo nse=“b06fc5743cd729190dc5f3e214ec350f”
Expires: 120
Contact: sip:[email protected]:5060
Content-Length: 0


<— SIP read from UDP:169.132.196.33:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.31:5060;branch=z9hG4bK3a0ba204;received=104.52.126.14 5;rport=5060
From: sip:[email protected];tag=as050203d3
To: sip:[email protected]
Call-ID: [email protected][::1]
CSeq: 6906 REGISTER
Server: net2phone
Contact: sip:[email protected]:5060;expires=60
Content-Length: 0

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).

Thank you Stewart1 for the clarification.

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

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