Problem with incoming calls- delayed intermittently so it fails over

First of All, thanks to all you guys. My work is actually far from programming (I’m in the health sector).

I had a professional setup the local network and installed FreePBX (he didn’t want to mess with the phone system lol). From there on, I configured the FreePBX system because of all the knowledge gained in this forum. At this point, all is good except I could not seem to fix my incoming calls problem.

It would episodically failover to a secondary phone. Sometimes it would connect to my IVR (I guess the port is opened per comments on the forum, when I call successively hence it lets calls through at times)

I asked my DID number/SIP account provider (DIDforSale) and they told me it would episodically take 40secs from the DID to connect to my sip trunk hence it fails over to my cell phone. They said all looked good on their side.

I have already checked the STUN server settings (based on recommendations here) and it was actually left blank so I’m ok there.

I am seeing that I need to check the DNS or NAT settings as the next step, is that correct? What should it be?

My setup:
FreePBX installed in a virtual machine.

Trunk Settings:

Outbound

PEER Details:

type=friend
secret=password
username=accountname
qualify=no
host=domaingivenbydidforsale
dtmfmode=rfc2833
context=from-trunk
canreinvite=no
allow=ulaw
insecure=port,invite
fromdomain=domaingivenbydidforsale

Inbound

USER Details:

type=friend
secret=password
username=accountname
qualify=no
host=domaingivenbydidforsale
dtmfmode=rfc2833
context=from-trunk
canreinvite=no
allow=ulaw
insecure=port,invite
fromdomain=domaingivenbydidforsale

Register String: accountname:password@domaingivenbydidforsale

Thanks again.

You should set your local system (127.0.0.1) to be a caching DNS service (if you are using the Distro, you should be good to go). After that, there are a bunch of possible choices, including the ones your ITSP/ISP suggests, and then 8.8.8.8 (Google) or any of a couple others.

Your /var/log/asterisk/full file should show the incoming call being processed. If this is a DNS issue, you’ll see it in the timestamps.

If you can, use IP addresses instead of names to circumvent needing to hit the DNS servers. This is particularly true in the “host=” line.

If your provider supports it, you can also reduce handshaking time by using a static external IP address and using IP authentication instead of registration strings. It’s arguably more secure (since it only works with your system’s IP) and is definitely faster (no lookups).

Also, unless you have a compelling reason to do it, you can get rid of all of the “user” settings. You have a “friend” Peer set up with all of the same credentials, and the friend type is bi-directional. It shouldn’t make any difference, but it will cut down on typing if any changed need to be made.

Unless you have a requirement for STUN, just set STUN Server Address blank. A failing STUN lookup will introduce about 10 seconds of delay.

1 Like

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