Outbound packet voip prioritizing


Hello All,

I run an centos 5 server that runs as a terminal server for a couple thin clients for home usage that runs my asterisk server as well.
My asterisk setup works like a charm.
I also have an Vonage phone hooked up on the internal nic/switch behind, this server as well.
Voice quality is perfect until someone tries to download anything I have residing on the ftp server running on this same server.
I do write some very simple programs for Linux.
My ISP,has finally upped their bandwidth to a respectable 3 MB , down, but,I only get 256 upload, consistently.
I tried the following setup for outbound packet priritization,and thought even by looking ,it looks too simple.
After setting these rules to the firewall/iptables, both my Vonage phone, as well as any of my asterisk connected phones can not ‘talk’ while a download is being made.
( I can hear the calling person fine).

Here is the simple config I put into the iptables. I found this on another website that claimed this would in fact do good outbound voice prioritizing:

#Cherebrum’s DSCP marking iptables
iptables -t mangle -A OUTPUT -p udp -m udp --sport 4569 -j DSCP --set-dscp-class ef # mark IAX2 packets with EF
iptables -t mangle -A OUTPUT -p udp -m udp --sport 5060 -j DSCP --set-dscp-class cs3 # mark SIP UDP packets with CS3
iptables -t mangle -A OUTPUT -p tcp --sport 5060 -j DSCP --set-dscp-class cs3 # mark SIP TCP packets with CS3
iptables -t mangle -A OUTPUT -p tcp --sport 5061 -j DSCP --set-dscp-class cs3 # mark SIP TLS packets with CS3
iptables -t mangle -A OUTPUT -p udp -m udp --sport 16384:32767 -j DSCP --set-dscp-class ef # mark RTP packets with EF

Any ideas how to overcome my scenario?

Thank You,


Setting DSCP will do nothing unless the routers are configured for it. In any case, you can set these in sip.conf etc. (except possibly for the TCP SIP one.

On a DSCP aware network, setting them may actually be counter-productive, as they will be subject to quotas, and going over quota may cause packets to be preferentially dropped.

You need to look into packet scheduling in Linux, as first priority. DSCP is really only for corporate networks, as I don’t think many ISPs will honour it.

In any case, your problem is with downloads, not uploads. Inbound packets can only be successfully prioritised from the ISP end. Nothing you can set can give them priority, although setting a small TCP window for the downloads, may throttle those, and prevent buffer bloat at the ISP.