This tutorial is for you if you are using DSL connection with Cisco ASA5505 and using hosted VOIP system.   You are also experiencing bad call quality.  More than likely its the person on the other end of the call who is having hard time hearing you.  This is because your router is sending out packets using First In – First Out.  If we can tweak the router so that VOIP packets go out first than you will have a much better call quality.   I am going to show you how you can do this using Cisco ASA 5505.

First of all, lets do a bandwidth test to see what kind of bandwidth we are getting.  I used the

Ok – See we have .64 Mbps or 640Kbps of upload that we can manage.  No need to worry about download because we have no way of controlling how service provider will send the packets. 


Common mistake I find in VOIP Networks is that QoS is being done using SIP protocols.  SIP is only used as call control.  RTP is being used while call is in session.   Therefore, I recommend using RTP to prioritize your Voice Traffic.  I used the port numbers 16384 to 32767 to prioritize my RTP traffic.  These port numbers are used by Cisco for RTP traffic.  So, basically I created a new class VOIP and matched the RTP traffic. (As Shown on Left)

Than, I created Policy Map VOIP to gave it a priority.  This Policy Map will tell the ASA What to do with the class VOIP.  In other words – now RTP traffic is identified and ASA knows that it needs to give it a priority.  

Now, I create another Policy Map named QOS.  I will use this policy map to shape all other traffic.  You can do using class “class-default”.  This class is already prebuilt.  I simply shaped it to 280,000.  

 Why 280,000 ? This is not a magic number.  I did a bandwidth test on DSL network and found that my upload speed is about .63Mbps or 630Kbps. I wanted to ensure I can make up to 4 calls without running into VOIP trouble.  Each call takes about 80K.  4 calls will take 80 x 4 = 320K.  So I need to guarantee 320Kbps of bandwidth for my calls and save the rest for all applications.   630 – 320 = 310 kbps.  I reduced it to little less (280K).  This is because you can only apply the average shape in the multiple of 8000.  This is the limitation fo Cisco ASA 5505.

In my Policy QOS, I also created an exception for my VOIP traffic by adding service-policy VOIP comman. Basically, this tells the ASA to limit all traffic to 280K except the VOIP traffic (which is RTP traffic).  

Last step left is to apply the policy to interface.  We do this using service-policy QOS interface outside.

Result:  Please note – there is no drop in VOIP traffic

Now, lets a do a bandwidth test again to see our internet bandwidth is limited to .28 Mbps or not.  I will use the again.

Perfect, as you can see how our upload bandwidth is down to .26 Mbps 

 After applying the policy, I uploaded a video on youtube to see how this impacts my voice quality and here is the result:

 How can you test to see if QoS is working ?

You can use the following commands to see if QoS is working.

  • Show service-policy
  • show service-policy shape






  • Guest

    Nice artical, but I have question, so the VOIP is prioritize in the default class or its a differnet class? if its a differnet one then no need to  prioritize !!. there is always 320K free bandwidht for it. Also you need to apply the priority-queue outside.
    Thanks for sharing