SIP Trunk Not Registering or Attempting Registration

Status
Not open for further replies.

the131

Silver Partner
Basic Certified
Joined
Mar 15, 2016
Messages
13
Reaction score
2
Hello,

Ran into a strange issue today with all of my 3CX clients that we support. Every one was showing that the SIP Trunk was unregistered. The strange part about this, was that 3CX did not appear to have ever attempted registration. There was no history, nothing in the logs, it was just unregistered. Any attempt to manually register with the buttons at the top did nothing, "Refresh Registration" and "Enable all" did nothing. The ONLY way I could get my SIP Trunks to register was to go into the SIP Trunk settings, click around, then hit "OK". Then it registered. On the last two I fixed I attempted to just go in, hit OK, which did not fix it. I actually had to go into the settings and click a few fields so that the system would actually "Save" the SIP Trunk (even though I changed nothing). Then it registered.

Obviously this is a huge problem and I am surprised nobody else is posting about it. I figured I'd post here in case any one else had this issue.
 
it seem to be the same problem encountered in previous SP5 release with some trunks were unable to register due to an internal DNS bug in 3cx letting trunk unregistred and with no new attempt and buttons like you said do nothing.
if you use a SIP FQDN in trunk settings try with provider IP adress instead.

check if this is the same , original post here
https://www.3cx.com/community/threa...lving-since-updating-to-16-5-yesterday.72721/

Hope the fix 3CX done in SP5 didn't revert to previous state in SP6
 
Hi @the131

Did you end up resolving this?

I am getting the same issue for a client today. An unsupported trunk unregistered and i can not get the thing to re-register! I have changed the Registration gateway to an IP but still no luck.
 
I too had installed SP6 and ran into the same problem, I just rolled my system back to SP5 and left it with that. At least now I know I am no the only one having the issue.
 
when it was doing this in SP5, I was replacing sip domain by IP, and sometimes i needed to use button disable all, then enable all, and finally refresh registration
 
This is something we can test for:

1. Start a capture on your PBX. In a 2nd tab, go and restart your SIP service.

2. It will restart the service and attempt to re-register your trunks.

3. After about a minute stop the capture and check to see if the PBX sends a DNS request for your registrar, if it gets a reply back, and if it tries to connect to the IP it has resolved.
 
I just updated again, prior to install Stun worked just fine, but after the install it can no longer reach the Stun Servers?
 
This is something we can test for:

1. Start a capture on your PBX. In a 2nd tab, go and restart your SIP service.

2. It will restart the service and attempt to re-register your trunks.

3. After about a minute stop the capture and check to see if the PBX sends a DNS request for your registrar, if it gets a reply back, and if it tries to connect to the IP it has resolved.
Can you please provide more thorough instructions? How do i start a capture exactly? I followed the remainder of your instructions and it made no change. Still having to mess with 3CX until it decides to actually register my SIP Trunk. This is not resolved. My provider doesn't allow me to use an IP.
 
Can you please provide more thorough instructions? How do i start a capture exactly? I followed the remainder of your instructions and it made no change. Still having to mess with 3CX until it decides to actually register my SIP Trunk. This is not resolved. My provider doesn't allow me to use an IP.
Just took me over an hour to get one site back up. It is just completely random when it decides to register. Never says it attempted registration until it is registered. These are all different physical servers at different sites. I actually have four DNS servers configured on this particular server:
DNS Servers . . . . . . . . . . . :
75.75.75.75
75.75.76.76
8.8.8.8
192.168.161.2 (local AD server)
 
SP5 was working fine, so I uninstalled SP5 and installed SP6 using a backup config.
If I set my IP to static and run a firewall check everything works including DNS Resolution for the stun servers. Turning it to dynamic results in:
STUN server stun2.3cx.com:3478 could not be reached (host name is not resolved). It could be that the STUN server you are using is down or a network problem is preventing STUN resolutions. This might cause problems if you use VoIP Providers.

This of course causes my SIP Trunk Registration to fail.
 
SP5 was working fine, so I uninstalled SP5 and installed SP6 using a backup config.
If I set my IP to static and run a firewall check everything works including DNS Resolution for the stun servers. Turning it to dynamic results in:
STUN server stun2.3cx.com:3478 could not be reached (host name is not resolved). It could be that the STUN server you are using is down or a network problem is preventing STUN resolutions. This might cause problems if you use VoIP Providers.

This of course causes my SIP Trunk Registration to fail.
I'm seeing similar results. We use siptrunk.com and here is what I'm seeing logs:

09/01/2020 2:32:11 PM - Lc:10002(@SIPTRUNK.com[<sip:@:0/UDP>]): Registration postponed until target's destination is resolved

Pretty frustrated. This is happening on all my sites. How do i get the SP5 version to reinstall?
 
Hi @the131

Instructions on how to capture: https://www.3cx.com/docs/capture-network-traffic/

Replicate my instructions on my previous post, and once you have the capture open in wireshark, the first thing to look for is to filter using the word dns so we can see if there is a DNS request to your registrar and what replies come back.

By the way, please also share your:

1. provider and registrar address
2. ALL the relvant details outlined here before anything else https://www.3cx.com/community/threads/information-to-provide-when-requesting-help.67558/
 
Thanks for your help JohnS_3CX.

This seems to be a pretty complicated issue. I thought it was just a DNS record issue but it is not. So what is happening is that 3CX is doing DNS queries for our "Registrar/Server/Gateway Hostname or IP" which is gw.siptrunk.com as well as our alternative proxy (options page) which is gw2.siptrunk.com. According to siptrunk.com 3CX should not be performing DNS queries for SRV records on the alternative proxy. It should be finding those records from the "Registrar/Server/Gateway Hostname or IP" only. There actually are no SRV records on the alternative proxy and according to siptrunk.com there should not be. My guess is that since 3CX is bombarding the DNS server with requests, it might be dropping off the first request and only listening to the second request which is for the alternative proxy. Then 3CX has a design flaw in SP6 that is making it not work as it requests SRV records from the alternative proxy.

Furthermore it seems that 3CX doesn't attempt another DNS lookup for a very long time. Not sure how to force it at this point. Only way seems to be rebooting the SIP Service. Makes it hard to troubleshoot during office hours.

Here is the explanation from siptrunk.com:
The way this works is that 3CX will force outbound traffic to the primary outbound proxy first (gw1.siptrunk.com), and then send outbound traffic to the alternate proxy(gw2.siptrunk.com) if the primary fails. The only reason outbound traffic should fail to the primary SIP server at gw1.siptrunk.com is if the server is hard down. The SRV record gw.siptrunk.com that is placed in the host/registrar field is where 3CX pulls the FQDN placed in the domain of the From: header and the Authorization: header, specifically in the realm= field, which we use to authenticate your outbound calls. If gw1.siptrunk.com were to go down, outbound traffic would be pushed to gw2.siptrunk.com via the Alternate proxy and the SRV record at gw.siptrunk.com would tell 3CX to input the information for gw2.siptrunk.com, which is weighted heavier than the information for the gw1.siptrunk.com entry.

I've attached my packet capture. As you can see at first it looks like the issue is that we are not getting a reply from gw.siptrunk.com, but it makes a request at the same exact time for gw2.siptrunk.com (which apparently it shouldn't do), then every subsequent request and response is for gw2.siptrunk.com. Note that changing DNS servers does not change anything, i also tried 8.8.8.8 with same results.

Also:
3CX Version: 16.0.6.641
Server OS: Windows 10 Pro
Trunk Provider: siptrunk.com
Firewall Checker: I can get it to pass.

Left out phone provisioning/model info as that is not a problem.

siptrunk.com is requesting that we downgrade to SP5, how can we download the SP5 version of 3CX?
 

Attachments

  • Packet Capture.png
    Packet Capture.png
    126.1 KB · Views: 22
Last edited:
Ran a packet capture, DNS query never sent, and stun never gets an IP address.
As soon as I switch to dynamic IP using stun the CPU usage goes up to 25% and stays there.
and I get an email:
"3CX has detected that your Public IP Address has changed to ."
If I change it back to static it remains at 25% until I reboot and then settles at the 1-2% range.
I did notice a DNS query for 3cx smtp which resolved.

3CX Version: 16.0.6.641
Server OS: Windows 10 Pro (ver 2004) on an I5 CPU
Trunk Provider: voip.ms
Firewall Checker: Pass
I currently have it set for static IP and am hoping my IP doesn't change.
I rolled the computer back to an August 10 backup and did the SP5 critical update and the SP6 update and the issue remains.
 
Last edited:
Hi @the131

Can you please provide us with some additional info so we can better understand your setup and to help us try and replicate the problem on our machine? We need the following:

- How many trunks you created in your management console with this provider (i.e 1 or 2 or 3 etc)
- A screenshot of each trunk's General tab (hide sensitive data like your numbers)
- A screenshot of each trunk's Options tab
 
Hi @JohnS_3CX

Well today got more interesting, yesterday i removed the alternative proxy because it seemed like just having that was causing the issues. But I couldn't test it until this morning as I have their primary trunk working (they have 2 trunks). Their primary trunk I have working with IP Auth and i had to use the IP (couldn't use gw.siptrunk.com) as the server. Today I did a wireshark capture and rebooted the services, DNS looks great, it gets the SRV record, and still 3CX shows no attempt to register the SIP Trunk and the SIP trunk is not registered. The secondary one I haven't been able to get working since Tuesday now. All my other clients are up right now only because they haven't rebooted. I've attached the pictures you requested as well as the wireshark image showing DNS resolution. Since trunk one is now IP Auth i didn't see how it would be helpful to attach those images, trunk 2 is setup the same way as trunk 1 was setup when it wasn't working.
 

Attachments

  • Options-Trunk2.jpg
    Options-Trunk2.jpg
    151.9 KB · Views: 38
  • General-Trunk2.jpg
    General-Trunk2.jpg
    193 KB · Views: 38
  • Wireshark.png
    Wireshark.png
    78 KB · Views: 34
  • Trunk Status.png
    Trunk Status.png
    18.7 KB · Views: 38
I'm seeing the same thing across multiple client systems. Primarily I have seen this with my clients using siptrunk.com for a provider. Any time services reboot the trunk will fail to register and never re-register itself. I can manually refresh the registration and then it will register fine, but it will not register correctly on its own. All of the affected systems are running version 16.0.641.
 
Hi @the131

I would suggest the following to continue the troubleshooting:

  • Firstly remove the trunks and rebuild them using our default templates. Those have been tested with this provider during our interop and we can confirm that they work correctly. It's important that you use them as designed and certified by us in cooperation with your provider.

  • Secondly, switch the DNS order so that 8.8.8.8 is on top, and hope that your local firewall will not intercept the requests and attempt to resolve them on its own. If you can prevent it from doing so it will be good. A capture on the actual firewall should show you whether it sends the request out, and whether it passes the reply back to your PBX exactly as the external DNS 8.8.8.8 sent it. If you see the external DNS replying one thing, and your firewall passing some other thing to your PBX, then we may have found the problem.

  • And something to note: if there is a failure, the system may wait up to 5 mins to retry, but if the DNS does not respond properly this will perpetuate.

Your provider's requirements should be met, and you should get successful registrations once the PBX receives the correct DNS replies it expects.

Let us know what you find with regards to the capture directly off of the firewall, and we can proceed accordingly.
 
Hi @JohnS_3CX ,

I rebuilt the secondary SIP Trunk using the templates as suggested. This did change some things in the config, however, nothing changed and it still never shows a registration attempt or registers.

I changed my firewall configuration as well just to be sure, I made a rule that allows DNS traffic unfiltered out. Did a packet capture, and I'm seeing all the packets I see in wire shark on the firewall. Nothing seems to be dropping off.

In Wire shark, it is a bit different now that i rebuilt the trunk. It seems to be trying to get records for gw1.siptrunk.com first, then goes to gw2 and again tries to get the SRV record for gw2. As stated above from siptrunk.com they are telling me this is a design flaw in 3CX and it should not be doing that. It should be getting SRV records from the Registrar/Server/Gateway. It doesn't attempt to get any DNS records from the Registrar/Server/Gateway now.

I'll ask again - siptrunk.com recommended I downgrade to SP5. Is that an option? Can I get that installer? At the very least then we'll know for certain it's either an issue with SP6 or with our network.
 

Attachments

  • Annotation 2020-09-04 065141.png
    Annotation 2020-09-04 065141.png
    42.7 KB · Views: 13
  • Like
Reactions: Nickelpede
Today i got also same problem on Openip trunk provider as i got in SP5 .
Trunk goes down at 13h15 and never reconnect.
Actions on button refresh has no effect.
just replaced SIP provider domain by IP adress and got trunk registred in second.
Tryied to revert to Domain name and it never refresh nor connect stayed desperately red.
My DNS resolver is 8.8.8.8 first.

Noticed ressources went up and stay to 25% when pbx is idle with no phone traffic. After a reboot started from database service restart CPU stay 0%

Is it the same problem you patched in .612 Release for windows pbxs?
 
Last edited:
Status
Not open for further replies.

Forum statistics

Threads
112,025
Messages
590,367
Members
164,976
Latest member
Roman Mazur