I tried adding a Grandstream GXP2170 to my existing FreePBX server hosted on CyberLynk, and found that on incoming calls there is a two second audio delay to the calling party. This happens when calling from any phone, internal or external. So, if one of my business customers anwers an incoming call and says “Hello, thank you for calling X business” the person calling does not hear the greeting.
Once connection is made there is no ongoing delay or echo. When I call another phone from the Grandstream, there is no delay. I have 11 other phones in four locations without this issue. I added a new server, loaded FreePBX 17, adn added the GXP2170 updated to the latest firmware without inbound our outbound routes (to eliminate a service provider issue). When I call the Grandstream from another phone dialing the extension only, the problem persists.
I haven’t found a resolution searching the forum. Is anyone using the Grandstream GXP phones on a hosted FreePBX server without this issue?
Hi @timd1118
Di dyou tried to apply TCPDUMP or SNGREP? to find From where is coming this delay ?
You have to see Asterisk logs too..
Where are the NAT boundaries in your system, and in which direction are they>
What steps have you tried to compensate for NAT.
I’m assujming that the system is having to learn the media addrss from actual traffic, rather than the SDP.
Thank you for the suggestions. I’m a noobie so will have to research TCPDUMP, SNGREP, and generating Asterisk logs. I will do that and respond.
Thank you @david55. I chose NAT Traversal = Auto on the Grandstream phone. In FreePBX 17/Settings/Asterisk SIP Settings/General SIP Settings/NAT Settings the External Address is xxx.xx.xx.205 and the Local Networks is xxx.xx.xx.128 / 25. Sorry for the dumb question, but is this what you were asking?
@shahin: I found FreePBX/Reports/System Logfiles, made a call, then downloaded the report to my PC, but don’t know what to look for. I’ll continue to research.
External Address should never match any of the networks on Local Networks, and normally Local Networks is not sensitive information.
Combined with the setting of an External address, the answer seems that you have two NAT traversals, private to public from Asterisk, and public to private onward to the phone. Can you confirm this? Generally a VPN is a better approach than this.
The two seconds may be what the phone needs to implement its automatic NAT traversal, or it may be that the phone is not able to work out the correct media address, and this is the time for Asterisk to switch from the one sent in the SDP, to the one from which it is receiving media.
@david55: “External Address should never match any of the networks on Local Networks, and normally Local Networks is not sensitive information.”
The first three octets shown as xxx.xx.xx are the same between External Address and Local Networks. Is this because of the setup with my cloud hosted virtual server?
You’re right about two NAT’s. The server is cloud hosted, and my office is remote, of course. I haven’t considered a VPN for each of the four offices this PBX services. Your explanation of NAT and media address makes sense conceptually, but I don’t know how to change these. I will continue to research and see if I get anywhere. Thanks.
Hi, I mean when you are applying call test. Before that you have to SSH to your FreePBX box and run Linux CLI command sngrep
to see your call(s) SIP dialog(s). and you can find which side has 2sec delay.
No. It’s because your NAT settings are wrong, in FreePBX.
These options are used when you are inside NAT. Local Networks should only be inside addresses, and External Network should only be an outside address.
I was not able to SSH into my server to run “sngrep”, (will have to figure that out). But, I found out I can do a packet capture in System Admin. It showed a 3 second gap when answering and the line: “res_rtp_asterisk.c: (0x7f4308054a40) RTP audio difference is 1487143864 set mark”. Is that simply telling me there is a delay, or is there a hidden clue to where it’s coming from?
Sorry for being so dumb, but it looks like I figured it out. The Grandstream GXP2170 network setting for NAT has to be set to STUN instead of the Default. That made the phone respond immediately on receiver pickup like my other phones do. Thank you for trying to help me out. You were both right, it was a NAT issue. I simply had to fix it on the phone end.