Minimizing lag in internal / LAN calls on FreePBX

imekul

Member
Joined
Feb 7, 2011
Messages
97
Reaction score
2
I am self-hosting my own PiaF 1.7.5.7 system with FreePBX 2.9.0.7. I have a bunch of Grandstream GXP-2000s connected. Everything works fine.

I just have a question: I am trying to minimize voice lag as much as possible on internal calls. Right now there is a very slight echo/delay when making an internal call.

I know this is common, and I'm not worried about it since it's so minor, but I'm just wondering what can all be done to minimize or eliminate lag in internal calls.

Ping times from the FreePBX server to a GXP-2000 are consistently 5-10 milliseconds.

I understand there is also encoding/decoding being done on calls, and I'm assuming this is where most of the lag comes from. So with that, I guess I'm just wondering what options -- if any -- I have in minimizing that lag.

Currently, codec priority in the GXP-2000s are: PCMU, PCMA, G.723.1, G.729A/B, G.726-32, PCMA, PCMA, GSM. In FreePBX, it's ULAW, GSM, then ALAW.

Again, this is not a big deal. I'm just curious what steps can be taken to get the lag to be as minimal as possible.
 

coold8

Member
Joined
Feb 14, 2011
Messages
32
Reaction score
0
To be honest, 5-10 ms is a little high. We have a 5-10 millisecond delay but our server is located off-site. When we ping within our network we usually get somewhere south of 1ms, even on the most basic equipment (a Netgear GS724, hooked up to a ClearOS router).

Best bet is revisiting your network setup and seeing if there is anyway to get those ping times down (for example, I prefer not to plug things directly into any router, but rather have a switch). Also, I prefer to have gigabit, so if one of your users is doing a lot of file transfer, the whole network doesn't struggle.
 

imekul

Member
Joined
Feb 7, 2011
Messages
97
Reaction score
2
I'll look into what I can do to shrink those ping times down.

Do you think a latency of 5-10 ms would be significant enough to cause a tiny delay? I mean, even if the latency was 1 ms, I would still likely have a noticeable lag/echo, right?

If that's the case, I guess I'm wondering what else can be done -- in addition to minimizing network latency -- to either eliminate the lag or make it as minimal as possible.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
865
Reaction score
144
Ping times from the FreePBX server to a GXP-2000 are consistently 5-10 milliseconds.
From what I see in this brief test, the latency is being introduced by the GXP-2000s themselves. I have one GXP-2000 at home. Ping times between it and my home PBX are as follows:

Code:
PING 10.9.7.226 (10.9.7.226) 56(84) bytes of data.
64 bytes from 10.9.7.226: icmp_seq=1 ttl=64 time=7.53 ms
64 bytes from 10.9.7.226: icmp_seq=2 ttl=64 time=6.90 ms
64 bytes from 10.9.7.226: icmp_seq=3 ttl=64 time=4.71 ms
64 bytes from 10.9.7.226: icmp_seq=4 ttl=64 time=3.86 ms
64 bytes from 10.9.7.226: icmp_seq=5 ttl=64 time=3.80 ms
64 bytes from 10.9.7.226: icmp_seq=6 ttl=64 time=12.6 ms
64 bytes from 10.9.7.226: icmp_seq=7 ttl=64 time=11.4 ms
64 bytes from 10.9.7.226: icmp_seq=8 ttl=64 time=10.3 ms
64 bytes from 10.9.7.226: icmp_seq=9 ttl=64 time=9.23 ms
64 bytes from 10.9.7.226: icmp_seq=10 ttl=64 time=8.04 ms
Notice it is is all over the place. Next, these are pings to my Aastra 6739i from the home PBX:

Code:
PING 10.9.7.254 (10.9.7.254) 56(84) bytes of data.
64 bytes from 10.9.7.254: icmp_seq=1 ttl=64 time=0.619 ms
64 bytes from 10.9.7.254: icmp_seq=2 ttl=64 time=0.547 ms
64 bytes from 10.9.7.254: icmp_seq=3 ttl=64 time=1.60 ms
64 bytes from 10.9.7.254: icmp_seq=4 ttl=64 time=0.525 ms
64 bytes from 10.9.7.254: icmp_seq=5 ttl=64 time=0.522 ms
64 bytes from 10.9.7.254: icmp_seq=6 ttl=64 time=0.530 ms
64 bytes from 10.9.7.254: icmp_seq=7 ttl=64 time=0.540 ms
64 bytes from 10.9.7.254: icmp_seq=8 ttl=64 time=0.541 ms
64 bytes from 10.9.7.254: icmp_seq=9 ttl=64 time=1.60 ms
64 bytes from 10.9.7.254: icmp_seq=10 ttl=64 time=2.76 ms
There's a reason (actually several) I don't have more GXP-2000s. This wasn't one of them, but I can certainly add it to the list. Don't get me wrong... they're great for starting out on! This was my first hardware phone (circa early 2007) and amazingly it still works. But, I would never seriously consider using them in a production environment (primarily due to poor support and firmware quality). My two cents for what it's worth...

Lastly, I've never noticed any spectacular echo or delay when using the GXP-2000 internally.
 

imekul

Member
Joined
Feb 7, 2011
Messages
97
Reaction score
2
Ah-hah... so the phones themselves might be the culprit for the high ping times.

Now, the latency/lag/echo is not bad. I'm just wondering what the steps are to be taken to minimize latency. Are there any particular considerations, or anything to tweak if lag/echo became an issue?

I understand obviously if I have ping times of 1000ms then I could have problems, but aside from lag and jitter, is there anything else at all to consider? For instance, is there some codec I can use that is perhaps lighter on the CPU and thus is closer to real-time?
 

blanchae

Guru
Joined
Mar 12, 2008
Messages
1,910
Reaction score
9
g.711 (ulaw, PCMU) would be the codec with the least load on the CPU. Do you have your LAN VLAN'd? Voice and data vlans?
 

imekul

Member
Joined
Feb 7, 2011
Messages
97
Reaction score
2
No, I don't have it VLAN'd. Honestly, I'm not real sure what that means.

My current setup is I have my router 192.168.0.1, the FreePBX server 192.168.0.254, and ALL other devices -- computers, other routers, these Grandstream phones, and anything with wifi -- between 192.168.0.2 and 192.168.0.253.

If it's smarter or more efficient to use a VLAN, I'm all for doing that.

Edit: Oh, the router and the FreePBX server each have one NIC currently.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
865
Reaction score
144
imekul,

Basically, think of a VLAN (virtual LAN) as taking a physical Ethernet network and dividing it up into logical networks on an Ethernet switch.

While this article is somewhat dated, it's still a good introduction to the subject.

More than likely, you won't find any performance gains with the Grandstreams by moving them into a VLAN, either. They are what they are. If jitter is a problem, you have the option of enabling the jitter buffer (Tools -> Asterisk SIP Settings -> Jitter Buffer Settings). However, I've never had a reason to enable it.
 

Members online

Forum statistics

Threads
25,824
Messages
167,825
Members
19,247
Latest member
mdauck
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.
Top