2011-12-29

QoS for Asterisk/PiaF on CentOS with Cisco hard phones & switches

Now that I'm moved into the new office for $WORK, I had to diagnose some phone issues with our new Asterisk based PBX-in-a-Flash phone system. Thankfully, the new office setup is better in a few ways:
  1. All jacks in the office are active, with PoE
  2. All the switches are the same model number, Cisco WS-C3560G-48PS
  3. All the phones are the same model, Cisco SPA504G
After tweaking some SIP settings in PiaF, I found myself looking into QoS. The old office did not have it configured, but I wanted to give it a second look.

Thankfully, Cisco has a QoS feature for those without an CCIE certification - Auto QoS. To enable QoS for our network here, the process was as follows:

! optional: enable debug to watch command macros execute
debug auto qos
! configure the switch
conf t
  ! cdp must be running
  cdp run
  ! first configure all end-user ports
  int range gi0/1 - 42
    cdp enable
    auto qos voip cisco-phone
  ! next configure the PBX port and uplink to other switch
  int range gi0/46, gi0/52
    cdp enable
    auto qos voip trust
  exit
exit
! disable debug
no debug auto qos

And AFAICT that's that. Repeat for all switches and redundant ports for the PBX. For more details, there's a configuration example and additional documentation on Cisco's site.

Ratings and Recommendations by outbrain