In our quest to implement an Asterisk PBX in our office, we are evaluating several VOIP (Voice Over IP) providers. VOIP provides several benefits over traditional phone lines including:
- low cost (typically around $0.02 per minute)
- available in pre-paid plans
- can support concurrent concurrent calls on the same number
However, implementing VOIP successfully is not trivial. You must have a reliable internet connection and we have found you must implement some type of Quality of Service (QoS) in the router. The first problem I ran into was calls sounded great to me, but people I called mentioned the calls sometimes sounded garbled to them. This article discusses the diagnosis of this problem and how to implement QoS in a Linksys router to fix this issue.
Our connection is a standard DSL connection — 5Mb/sec down and 640Kb/sec up. There is plenty of bandwidth for incoming voice, but bandwidth for outgoing voice is much more limited. A few tests confirmed this — when a ftp upload or some other bulk transfer was occurring, the outgoing voice sounded really bad.
The solution to this problem is to implement some type of Quality of Service (QoS) mechanism that prioritizes the VOIP traffic over all other types of traffic. Vonage and other “boxed” solutions no doubt do this as they recommend placing their box between the modem and the router. It turns out that QoS can be implemented in a standard Linksys router/firewall. I spent some time trying to get QoS working using a Linksys WRT54G v5 router with no success, I ended up loading the dd-wrt firmware (http://www.dd-wrt.com) on an older Linksys router I had laying around. The dd-wrt firmware is quite nice and is worthy of consideration if you have a v4 or earlier Linksys router or the WRT54GL version. QoS may have worked on the WRT54G v5 with Linksys firmware with some more effort, but after trying dd-wrt, I’m not going back.
Setting up QOS
The QoS settings can be found under Applications & Gaming -> QoS.
There are many ways to assign priority to your VOIP system. I just used the IP address as shown below. 192.168.1.10 is the LAN private IP of the Asterisk system.
With the priority of the Asterisk box set to high, we should be all set. It turns out that unless you cap the bandwidth, you will still have QoS problems. Enter around 85% of your up and down bandwidth in the Uplink and Downlink boxes. Capping the bandwidth is required to keep the latency low. Otherwise, your bandwidth is filled up with large packets and the priority settings are not effective for VOIP traffic. See http://www.dd-wrt.com/wiki/index.php/Quality_of_Service for more information.
With the above settings, VOIP calls are now clear even with other concurrent activities.
Several people have reported being able to install dd-wrt on v6 WRT54 routers and the QoS configuration is the same.