Asterisk sip tos

SIP.conf: [GENERAL] section: tos=

Asterisk 1.2

Set to value or
  • lowdelay
  • throughput
  • reliability
  • mincost
  • none

Alternatively you can directly set the bit values:
tos=0x18 ; where the tos bits are set individually and in combination
For example

tos=0x10 low delay
tos=0x08 high throughput
tos=0x04 high reliability
tos=0x02 ECT bit set
tos=0x01 CE bit set

or set multiple bits, such as


to set both low delay and high throughput.

For Asterisk Deployments in DiffServ environments, tos=0xB8 will set the Diffserv EF (Expedited Forwarding) bits.

Asterisk 1.4

For be completed... see doc/README.tos or doc/ip-tos.txt

tos_sip=cs3 ; Sets TOS for SIP packets.
tos_audio=ef ; Sets TOS for RTP audio packets.
tos_video=af41 ; Sets TOS for RTP video packets.

Asterisk 1.6

The 'lowdelay', 'throughput' etc values are no longer supported. However, you can still use the hex values (0x10 for low delay). Otherwise you can use DSCP names (cs3, ef etc) ).

README.tos as of Jan 2006

Asterisk can set the Type of Service (TOS) byte on outgoing IP packets
for various protocols. The TOS byte is used by the network to provide
some level of Quality of Service (QoS) even if the network is
congested with other traffic. For more information on Quality of
Service for VoIP networks see the "Enterprise QoS Solution Reference
Network Design Guide" version 3.3 from Cisco at:


In sip.conf, there are three parameters that control the TOS settings:
tos_sip, tos_audio, and tos_video. tos_sip controls what TOS SIP call
signalling packets are set to. tos_audio controls what TOS RTP audio
packets are set to. tos_video controls what TOS RTP video packets are
set to. There is a "tos" parameter that is supported for backwards
compatibility. The tos parameter should be avoided in sip.conf
because it sets all three tos settings in sip.conf to the same value.

In iax.conf, there is a tos parameter that sets the global default TOS
for IAX packets generated by chan_iax2. Since IAX connections combine
signalling, audio, and video into one UDP stream, it is not possible
to set the TOS separately for the different types of traffic.

In iaxprov.conf, there is a tos parameter that tells the IAXy what TOS
to set on packets it generates. As with the parameter in iax.conf,
IAX packets generated by an IAXy cannot have different TOS settings
based upon the type of packet. However different IAXy devices can
have different TOS settings.

The allowable values for any of the tos* parameters are:

be (best effort), cs1, af11, af12, af13, cs2, af21, af22, af23, cs3,
af31, af32, af33, cs4, af41, af42, af42, ef (expedited forwarding),
lowdelay, throughput, reliability, mincost, none

The tos* parameters also take numeric values.

The lowdelay, throughput, reliability, mincost, and none values are
deprecated because they set the IP TOS using the outdated "IP
prececence" model as defined in RFC 791 and RFC 1349.

Configuation Parameter Recommended
File Setting
- - - - - - - - - - - - - - - - - - - - - -
sip.conf tos_sip cs3
sip.conf tos_audio ef
sip.conf tos_video af41
- - - - - - - - - - - - - - - - - - - - - -
iax.conf tos ef
- - - - - - - - - - - - - - - - - - - - - -
iaxprov.conf tos ef

To get the most out of setting the TOS on packets generated by
Asterisk, you will need to ensure that your network handles packets
with a TOS properly. For Cisco devices, see the previously mentioned
"Enterprise QoS Solution Reference Network Design Guide". For Linux
systems see the "Linux Advanced Routing & Traffic Control HOWTO" at

Informational, some TOS equivalent translations from the cisco platform.

ef = dscp 46 = 101110 = tos 0xb8 (184) = ip prec 5
af31 = dscp 26 = 011010 | tos 0x68 (104) = ip prec 3
af32 = dscp 28 = 011100 = tos 0x70 (112) = ip prec 3
cs3 = dscp 24 = 011000 = tos 0x60 (96) = ip prec 3

See also

Created by: oej, Last modification: Mon 03 of Mar, 2014 (09:48 UTC) by jcordell
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+