Delay in Transfering Incoming Call To Extensions

Status
Not open for further replies.

STRB

Joined
Dec 23, 2014
Messages
15
Reaction score
0
Hi,

I using 3CX v12, running on a netbook behind a router, with a fixed IP. I have 2 numbers being forwarded from a number provider. The numbers are being routed to different extensions based upon the DID. This all works, however there is around a 5 second delay before the extensions start actually ringing. I've posted a verbose log below, any help would be much appreciated.

The 3CX server is running on 192.168.0.200, the extension number 12 is on 192.168.0.100, the fixed ip of the router is 92.27.112.xx, the number provider is forwarding the calls from 84.45.107.52. The dialed DID in question is 01446650xxx

These are the log entries around the delay:

20-Jan-2015 13:17:41.337 [CM503001]: Call(C:72): Incoming call from Line:10002<<07974958xxx to <sip:[email protected]:5070>
20-Jan-2015 13:17:41.309 Line limit check: Current # of calls for line Lc:10002(@TTNC Incoming[<sip:[email protected]:5060>]) is 1; limit is 4
20-Jan-2015 13:17:41.309 Blacklist check: number '07974958xxx', list: ''; result = false
20-Jan-2015 13:17:41.309 NAT/ALG check:L:72.1[Line:10002<<07974958xxx] REQUEST 'INVITE' - basic check passed. No information for extended checks
20-Jan-2015 13:17:41.308 Dev(44):[sip:[email protected]:5060 / 01446555555]: PBX contact is public IP: <sip:[email protected]:5070>
20-Jan-2015 13:17:36.775 Outbound URI is used: sip:[email protected]:5060
20-Jan-2015 13:17:36.774 Dev(44):[sip:[email protected]:5060 / 01446555555]: PBX contact is public IP: <sip:[email protected]:5070>
20-Jan-2015 13:17:34.424 [CM503012]: Inbound any hours rule (DID2) for 10002 forwards to DN:12
20-Jan-2015 13:17:34.424 [Flow] Looking for inbound target: called=01446650xxx; caller="07974958xxx" <sip:07974958xxx@:5060>
20-Jan-2015 13:17:34.424 CallerNameAddr: "07974958xxx"<sip:07974958xxx;nf=e>
20-Jan-2015 13:17:34.424 Tenant's phonebook has failed to load!
20-Jan-2015 13:17:34.424 Looking for phone number 07974958xxx in tenant's 'default' phonebook
20-Jan-2015 13:17:34.424 No inbound caller ID reformat rule for DN:10002 is defined, or it is disabled ()
20-Jan-2015 13:17:34.424 Line 10002 has been updated from DB
20-Jan-2015 13:17:34.423 IPs do not match!
20-Jan-2015 13:17:34.423 Compare IPs: incoming=84.45.107.52; external=0.0.0.0
20-Jan-2015 13:17:34.423 Compare IPs: incoming=84.45.107.52; external=92.27.112.xx
20-Jan-2015 13:17:34.422 IncomingCall: C:72 from <sip:[email protected]:5060> to <sip:[email protected]:5070>
20-Jan-2015 13:17:34.422 Added leg L:C:72.1[No endpoint yet]
20-Jan-2015 13:17:34.421 UasSession 108985 started
20-Jan-2015 13:17:34.421 Call from "07974958xxx"<sip:[email protected]>;tag=ey2c6Np4SBe0a to <sip:[email protected]:5070>;tag=7a28cb7f
20-Jan-2015 13:17:34.419 IPs do not match!
20-Jan-2015 13:17:34.419 Compare IPs: incoming=84.45.107.52; external=0.0.0.0
20-Jan-2015 13:17:34.419 IPs do not match!
20-Jan-2015 13:17:34.419 Compare IPs: incoming=84.45.107.52; external=92.27.112.xx
20-Jan-2015 13:17:28.043 Currently active calls [none]
 
STRB said:
20-Jan-2015 13:17:41.308 Dev(44):[sip:[email protected]:5060 / 01446555555]: PBX contact is public IP: <sip:[email protected]:5070>
20-Jan-2015 13:17:36.775 Outbound URI is used: sip:[email protected]:5060

Just a guess...the big delay is happening between these two logs, and I'm assuming that a DNS lookup is being done to acquire the IP for your VoIP provider. What you might try...is to put in the actual IP (into the 3Cx trunk settings), rather than the URL of your provider, thus eliminating the DNS look-up. See if that makes a difference. If it does then you may want to review the DNS server(s) you are currently using, or, "other" network settings relating to DNS.
 
leejor said:
STRB said:
20-Jan-2015 13:17:41.308 Dev(44):[sip:[email protected]:5060 / 01446555555]: PBX contact is public IP: <sip:[email protected]:5070>
20-Jan-2015 13:17:36.775 Outbound URI is used: sip:[email protected]:5060

Just a guess...the big delay is happening between these two logs, and I'm assuming that a DNS lookup is being done to acquire the IP for your VoIP provider. What you might try...is to put in the actual IP (into the 3Cx trunk settings), rather than the URL of your provider, thus eliminating the DNS look-up. See if that makes a difference. If it does then you may want to review the DNS server(s) you are currently using, or, "other" network settings relating to DNS.

Absolutely spot on - many thanks! Entering the IP eliminated the lag altogether. Now to fix the DNS problem, am I correct in thinking this is not to do with any 3CX settings, but rather the computer and network?
 
Yes... Look at the "IPConfig /all" setup on that machine to see what the DNS Settings are.
If they are a 10.x, 172.x or 192.x then they point to an internal server with the issue.
If the DNS matches the Gateway then the router is doing the lookup.
You might try an external DNS Server such as 8.8.8.8 if the Windows 3cx server is not conected to a Domain Controller.
 
craigreilly said:
Yes... Look at the "IPConfig /all" setup on that machine to see what the DNS Settings are.
If they are a 10.x, 172.x or 192.x then they point to an internal server with the issue.
If the DNS matches the Gateway then the router is doing the lookup.
You might try an external DNS Server such as 8.8.8.8 if the Windows 3cx server is not conected to a Domain Controller.

Thanks. Am I correct in thinking that setting it to Google's DNS will mean that there is no DNS cache on the machine?
 
In case it helps others, and to check this will be robust. My latest attempts:

If I set the VOIP provider to their IP Address, the call is transferred immediately. Unfortunately they cannot guarantee the IP.

If I set the VOIP provider back to the domain name sip.ttnc.co.uk, the delay is there. The DNS using ipconfig is shown as 192.168.0.1, the IP of the router. If I run tracert -d 192.168.0.1 it shows 1 hop and less than 1ms. If I look on the router, it shows the DNS as being on 62.24.202.5. If I run tracert to this there is around 8 hops and 200ms. Seems ok.

If I set the DNS on the 3cx machine to 8.8.8.8, and set the VOIP provider back to a domain name, the delay is still there. If I run tracert -d 8.8.8.8 is shows 9 hops and around 160 ms. Seems ok again.

So I assume the problem is not the DNS itself, but rather the communication between 3CX and the DNS. I run a Wireshark trace and see SIP Invite on the incoming call. The SIP invite originates from an IP address, it does not mention the domain name. But I assume the DID mask that I have defined on the VOIP provider in 3cx then wants to check the IP against the specified domain sip.ttnc.co.uk. I see the DNS A query from 192.168.0.200 to 192.168.0.1 on sip.ttnc.co.uk, which has an immediate response of "No such record". 3cx then sends a whole series of NBNS queries to 192.168.0.255, which is where the delay is I assume. So using nslookup on sip.ttnc.co.uk I also get "no such record". Change the specified domain name from sip.ttnc.co.uk to ttnc.co.uk and it all works perfectly!

Phew. Now just to find a SIP trunk provider that works for outgoing calls without using port 5060...
 
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,835
Messages
589,289
Members
164,666
Latest member
infinititravels