Thursday, 2 February 2012

Configuring QoS for SIP / VoIP

Unless you have a true understanding of the layer protocols and technologies behind SIP, setting up QoS can actually be quite difficult, as I found out myself.

Interestingly when setting up SIP you often set the firewall port to 5060 and leave it at that, so you may simply assume that 5060 is the only required port. What you forget though, is that this is only inbound; what is going outbound?

So my personal understanding of SIP (and some wiresharking later) is that it tends to use the following protocols.

Signalling via port 5060. ALSO each line after uses upward one port.Line 2 5061, Line 3 5062 etc.
Realtime Transport (RTP) 10,000 - 20,000 varying per call.
STUN 3478/3479

So you see straight away that setting QoS to prioritise 5060 will do next to nothing on your network you need to put in three ranges. 5060-5080 (20 lines), 10,000-20,000 & 3478/3479.

All of the above only need to be UDP.

Putting these ports into QoS makes a huge difference to the quality of a call for me. I'd be interested to hear other peoples stories.