Reply To: QOS and VoIP

Home Page Forums Network Management ZeroShell QOS and VoIP Reply To: QOS and VoIP



@drmca wrote:

It looks like there is no way to set up working QoS for VOIP phone, at least not using Linksys PAP2T adapter.
Correct me if I am wrong, but SIP travels over UDP ports specified per line, i.e. 5060 and 5061 in my case. I can QoS those.
But actual voice traffic travels over RTP protocol using port range specified per device, which would make it impossible to QoS that port range, as we don’t know which SIP port the RTP ports correspond to.
Basically with the way PAP2T handles VOIP, there is no way to direct one VOIP line’s traffic over one DSL connection, and other VOIP line’s to another.

Hoping I am making sense.


modprobe nf_nat_sip

to your pre-boot script will mean that the RTP packets associated with a call setup with SIP will be detected and marked as “related”. This should take care of having to know which RTP packets are associated with which SIP session.

Next you need to tag the RTP packets for the QOS. I have the following in my QoS classifier:

MARK udp opt -- in * out * -> udp spt:5060 MARK set 0xb
MARK udp opt -- in * out * -> udp dpt:5060 MARK set 0xb
MARK udp opt -- in * out * -> helper match "sip" MARK set 0xb

So anything to or from port 5060 is marked as VoIP. You’d need to add rules for 5061 for your setup.