• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Incoming Calls from SIP Trunk stop working after XX minutes?

Status
Not open for further replies.

PeeBeeEx

Trainee Partner
Joined
Aug 31, 2018
Messages
33
Reaction score
2
I have 3CX setup with two different SIP Trunks from two different providers.

Each is SIP Trunk is setup as a Generic VOIP Provider within 3CX.

When viewing them from the SIP Trunks page they always show a green dot and appear to be ok, although I've noticed it doesn't seem to refresh registration very often - i.e. Registration Sent/OK can show many hours in the past. (Doesn't seem to show Failed Register very often either)

I've recently noticed that 1 of the providers starts failing to receive incoming calls about 5 minutes after registration.

If I simply refresh registration, it will start receiving incoming calls again immediately and work fine for another 5 minutes, after which it fails to receive any incoming calls again.

Outbound calls from this same SIP Trunk seem to always work fine, even several hours after registration.

What's even more strange, is that if I wait 5 minutes for incoming calls to start failing and then place an outgoing call from the trunk, incoming calls immediately start working again for 5 minutes and then fail.

Initially I thought that when you make an outbound call it probably just immediately sends a re-registration request, but when I check the SIP Trunks page after making an outbound call it doesn't change the registration Sent/OK values.

Is there anything in particular I could try looking at to troubleshoot the issue? If I look at Call Logs / Activity logs while the incoming calls aren't being received I don't see any activity.

I'm not sure if I should try experimenting/re configuring anything in the advanced options for the SIP trunk config? I've tried reducing re-register from 600 to 300 seconds, but again - neither of my trunks seem to follow this setting and go many hours without appearing to send a registration:



Our other trunk appears to always work fine, both incoming/outgoing calls, regardless of how long ago registration has been sent, so it definitely seems to be something to do with this particular provider.

For what it's worth: I don't think we were having these issues up until recently - so not sure if this has only started happening with the Beta 6 update - might try reinstalling an older version and see what happens.
 
Last edited:
Have you run the firewall checker? It sounds like you don't have the correct ports forwarded.
 
To try and ascertain if the issue is more to do with the SIP Account or 3CX Config, I've set it up directly on a Yealink T28P handset.

I just factory reset the handset, logged in to the WebUI, clicked on the Account tab and entered the SIP details - nothing more. I didn't make any other changes to the config.

Initially, all incoming calls would ring the Yealink once and then go straight to the service provider's voicemail (very strange) so I requested to have their voicemail service disabled. The problematic SIP account now seems to be functioning as it should when directly setup on the Yealink T28P as a SIP account:

- Outgoing calls can be made, audio works both ways
- Incoming calls can be received, audio works both ways

Surprisingly, this is all working without actually setting up any port forwarding to the IP of the handset.

I have left the handset idle for 20+ minutes and it can still receive incoming calls.

Will try leaving this idle for another 1 hour or so and see if it can continue to receive incoming calls.

Have you run the firewall checker? It sounds like you don't have the correct ports forwarded.

Have ran the firewall checker and everything is definitely forwarded/opened correctly - the other trunk is working perfectly fine, which to me would indicate network setup is fine.

Have also tried SIP ports 5060 and 5070 just in case there's any ISP oddities, both have the same outcome.

I have tried factory resetting the modem/router but was still seeing the same issues:

- Incoming calls continue to work fine on our secondary trunk (this rules out networking)
- Incoming calls work fine on the primary trunk for 5 minutes after registration, then stop coming in
- Placing an outgoing call from the primary trunk, results in incoming calls working another 5 minutes

Oddly enough, everything seems worked fine without any port forwarding configured on the router whatsoever - incoming calls could still be received.

In any case, I have reconfigured all port forwarding and firewall checker on 3CX is again showing all green.
 
UPDATE: Everything seems to be working as expected now. I've left everything idle for varying amounts of time (up to about an hour so far) and calls still seem to come in as expected.

Not entirely sure if there was an issue with the SIP provider or it was something I did that resolved the issue.

Things I did were:

- Backed up, ran /usr/sbin/3CXWizard --cleanup and recovered PBX (could of really just rebuilt from new here)
- Changed SIP port from 5070 back to 5060 (seems I can open it now and firewall checker passes)
- Hard reset the modem/router, reconfigured all port forwarding rules (calls still seemed to work without them anyway)
- Factory reset the Yealink handset, configured SIP provider natively within this for testing (discovered potential voicemail issue here - this caused the Yealink to ring once then go straight to the providers voicemail service)
- Factory reset the Yealink again and re-provisioned this entirely
- Provisioned a 3CX client on the receiving extension

I'm not entirely sure if the issue would have been anything to do with my setup, because it seems strange that the incoming calls would work for 5 minutes, but then fail.

If it were something dodgy with my handset causing registration issues, I'd imagine the calls would have just went straight through to voicemail as per forwarding rules.

If it were something to do with my setup, I'd imagine the incoming calls would have never worked, not just worked for 5 minutes and then stopped.

But then setting up the problematic SIP account with the service providers included ATA seemed to work fine.

The only thing I can really think of is that there was perhaps something wrong with my 3CX installation and running the 3CX Wizard cleanup may have resolved things by reinstalling/configuring all of the services?

I'll continue to monitor this closely over the next couple of days and see if anything changes/reverts back.

I'm still a litte confused about the "Re-Register Timeout" setting within 3CX, from what I can see this is set to 600 (seconds?) which would be about 10 minutes. Shouldn't this mean the SIP Trunks automatically re-register every 10 minutes?

Details we're given from one SIP provider are:
Register Expiry: 180

Details from the other SIP provider are:
Registration Expire Timeout - 3600
Registration Retry Interval - 20

The latter being the one we were having issues with.

Looking at the SIP Trunks page in 3CX "Register Sent" hasn't occurred in over an hour for all trunks and I'm certain I've seen the trunks go multiple hours without a register sent occurring.
 
Last edited:
UPDATE: Left everything as-is overnight. Tested incoming calls this morning and they appeared to be working fine, even though Register Sent/OK on the SIP Trunks page showed that the SIP Trunks had not updated in over 12+ hours - is this normal?

What is even more strange, is that after doing some minor tinkering on the SIP provider's Modem+Router+ATA to remove the SIP account config and add an analogue handset to 3CX - the SIP trunk in 3CX appeared to be once again doing the 5 minute thing.

Also noticed firewall checker was failing on port 5060 - although not sure if this was consequential.

The secondary SIP trunk however, continued to operate fine.

To troubleshoot/resolve I've gone through the following process now:

- Factory resetting the SIP service provider's Modem+Router+ATA
- Left the built-in ATA configured with the problematic SIP account (in a Registered state)
- Ran /usr/sbin/3CXWizard --cleanup and created a new install/config (fresh 3CX)
- Left all 3CX ports as default - 5000, 5001, 5060, 5090, 9000-9398, 10600-10998
- Setup port forwarding for all of these 3CX ports on the router to point to the 3CX server
- Added only the problematic SIP Trunk
- Added only 1 extension (the default operator extension)
- Added only 1 supported IP Phone - Snom D715
- Ran firewall checker (all passed) and confirmed inbound/outbound calls are working fine

I'm not going to touch anything related to this config for 3-4 days and test incoming calls every few hours.

Not sure if it's coincidence that things went down shortly after me making some minor changes, but I guess we'll see if things remain functional without me altering anything whatsoever. Then I'll start making minor changes one at a time until I can identify what causes the outage.

At this stage I'm thinking that the issue may have something to do with:

- When port 5060 closes up (although then I'm not sure why the other SIP account works fine?)
- When removing the problematic SIP account from the service providers included ATA (this may cause 5060 to close)

The SIP account we're having these issues with is admittedly not intended to be used with anything else other than the service providers ATA. I'm not sure if they have any weird security measures in place to prevent using the SIP account outside of their provided ATA - but if they did, I would assume the service simply wouldn't work at all? (Not seem to work intermittently)

If anyone has any advice on how I can potentially look at some lower level information on the 3CX server, like logs or something that may show registration issues, this would be much appreciated.

- Incoming calls still working 20 minutes after Register OK/Sent time displayed on SIP Trunks page.
- Incoming calls still working 40 minutes after Register OK/Sent time displayed on SIP Trunks page.
- Incoming calls still working 1hr 30 mins after Register OK/Sent time displayed on SIP Trunks page.
 
Last edited:
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,630
Messages
748,953
Members
144,744
Latest member
TLK
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.