Process voip traffic with highest priority

I have an openwrt router (19.07.2), which is running yate (a PBX software like asterisk).

Yate works at the same time as a server and a client. My ip phones register with yate as their voip server. Yate itself registers with my voip provider as a client.

All my ip phones reside in a vlan (vid 50,, there are no other devices in this vlan. The yate server address is

The ip phones (Gigaset GoBox series) are vlan capable, they are configured to use vid 50 with prio=7. So the network traffic between the ip phones and the yate server has highest priority. All other devices in the other vlans have prio=0.

My problem: how can I give the voip traffic highest priority on the wan side?

What I want:

  • voip traffic is served first, so it blocks service for other traffic
  • other traffic is served, when there is no voip traffic

Is it possible to meet these requirements and how?

My internet connection is via LTE, depending on the time of day the bandwidth varies from 20 mbps to 100 mbps. Therefore I want to avoid any solution with bandwidth parameters.

SQM scripts will do this. If Yate does DSCP marking, then you can use layer_cake

This will handle the prioritisation on your outbound wan interface. However, once it leaves your wan interface, your ISP may (and probably may not) respect the DSCP markings. You have no control once it leaves your network perimeter.

The good old pfifo_fast will prioritize some DSCP's hard (precedence), see and

But SQM requires bandwidth specification. And this is my problem, because my bandwidth varies from 20 mbps to 100 mbps.

If I specify the lower bound, I'll give away bandwidth. If I specify the upper bound, I'll have the opposite.

Thanks for the links, I'll investigate this.