Setting DSCP (ToS) bits on your voice packets

Found this on freepbx.org (Setting DSCP (ToS) bits on your voice packets ) to prioritise your VOIP packets.

Provided you are running Asterisk/Trixbox with 'standard' ports - otherwise alter applicable, insert following into your startup (/etc/rc.d/rc.local or the like:
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 4569 -j DSCP --set-dscp-class ef 
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp-class ef
/sbin/iptables -A OUTPUT -t mangle -p udp -m udp --sport 5060 -j DSCP --set-dscp-class ef