Traffic shaping Voip Traffic to and from an asterisk box

Hi,

After installing a trixbox voip machine behind my MT router i noticed that the voip stutters if some else starts a download. How can i fix this.?

My MT box has 4 interfaces

WAN - Which connects to the DSL modem 10.0.0.250/24
XS4ALL - Which is the internet connection actualy
LAN1 - The interface where my network is connected 192.168.100.0/24
LAN2 - Where the neigbours network is connected using a wireless bridge 192.168.50.0/24

My trixbox ( asterisk ) is on the lan network with ip adress 192.168.100.44/32

I have used the search but i`m not sure what to use

Some of my clients are connected on the outside of mu MT box and there are a few clients on the LAN network.

Priotize is needed for the WAN clients and the WAN interface i think. An outbound que on the WAN interface en an outbound que on the LAN interface to get the send an recieve priotized

I found this. But will this work with my NAT setup ?

Try something similar to these\

/ip firewall mangle add chain=prerouting tos=184
action=mark-packet new-packet-mark=voip

/ip firewall mangle
add chain=prerouting src-address=192.168.100.44 action=mark-connection
new-connection-mark=voip passthrough=yes comment=“” disabled=no

add chain=prerouting dst-address=192.168.100.44 action=mark-connection
new-connection-mark=voip passthrough=yes comment=“” disabled=no

add chain=prerouting connection-mark=voip action=mark-packet
new-packet-mark=voip passthrough=no comment=“” disabled=no


where x.x.x.6 is say the address of your internal Asterisk box, or VOIP
manager. Then add a custom queue tree for the marked packets

/queue tree add name=“voip” parent=global-in packet-mark=voip
limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s


You need to know some of the VOIP TOS/DSCP variables.
such as for Cisco etc With Asterisk change its TOS variable in sip.conf
to 0xb8

EF DiffServ decimal: 184
EF DiffServ hexadecimal: 0xb8
EF DiffServ binary: 10111000

EF DSCP decimal: 46
EF DSCP hexadecimal: 0x2e
EF DSCP binary: 101110

The DSCP field is contained within the 6 first bits of the DiffServ byte.

But many manufacturers use different values.

If any doubt, use a sniffer such as Ethereal. If settings are correct, it will show the Differentiated Services Field in any of the RTP packets, whith a value of 0xb8 (DSCP 0x2e: Expedited Forwarding: ECN: 0x00).

Then run some voice calls to see if your traffic counts increment in the
mangle rules and queue.