Beruflich Dokumente
Kultur Dokumente
IPQualityofServiceAsteriskProjectAsteriskProjectWiki
AsteriskProject / / GeneralConfigurationInformation
IP Quality of Service
CrparMalcolmDavenport,derniremodificationlejuil.08,2015
Introduction
AsterisksupportsdifferentQoSsettingsattheapplicationlevelforvariousprotocolsonbothsignalingandmedia.TheTypeofService
(TOS)bytecanbesetonoutgoingIPpacketsforvariousprotocols.TheTOSbyteisusedbythenetworktoprovidesomelevelof
QualityofService(QoS)evenifthenetworkiscongestedwithothertraffic.
AsteriskrunningonLinuxcanalsoset802.1pCoSmarksinVLANpacketsfortheVoIPprotocolsituses.Thisisusefulwhenworkingin
aswitchedenvironment.InfactAsteriskonlysetpriorityforLinuxsocket.FormappingthispriorityandVLANCoSmarkyouneedtouse
thiscommand:
vconfigset_egress_map[vlandevice][skbpriority][vlanqos]
ThetablebelowshowsallVoIPchanneldriversandotherAsteriskmodulesthatsupportQoSsettingsfornetworktraffic.Italsoshows
thetype(s)oftrafficforwhicheachmodulecansupportsettingQoSsettings:
Signaling
Audio
Video
Text
chan_sip
chan_skinny
chan_mgcp
chan_unistm
chan_h323
chan_iax2
chan_pjsip
DUNDI
+(tossetting)
IAXProv
+(tossetting)
IPTOSvalues
Theallowablevaluesforanyofthetosparametersare:CS0,CS1,CS2,CS3,CS4,CS5,CS6,CS7,AF11,AF12,AF13,AF21,AF22,
AF23,AF31,AF32,AF33,AF41,AF42,AF43andef(expeditedforwarding),*
Thetosparametersalsotakenumericvalues.*
NotethatonaLinuxsystem,AsteriskmustbecompiledwithlibcapinordertousetheeftossettingifAsteriskisnotrunasroot.
Thelowdelay,throughput,reliability,mincost,andnonevalueshavebeenremovedincurrentreleases.
ToSdecimalequivalencetable:
name
decimalvalue
cs0
cs1
32
af11
40
af12
48
af13
56
cs2
64
af21
72
af22
80
af23
88
https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service
1/3
27/7/2015
IPQualityofServiceAsteriskProjectAsteriskProjectWiki
cs3
96
af31
104
af32
112
af33
120
cs4
128
af41
136
af42
144
af43
152
cs5
160
ef
184
cs6
192
cs7
224
802.1pCoSvalues
Because802.1puses3bitsoftheVLANheader,thisparametercantakeintegervaluesfrom0to7.
Recommendedvalues
Therecommendedvaluesshownbelowarealsoincludedinsampleconfigurationfiles:
tos
cos
Signaling
cs3
Audio
ef
Video
af41
Text
af41
Other
ef
IAX2
Iniax.conf,thereisa"tos"parameterthatsetstheglobaldefaultTOSforIAXpacketsgeneratedbychan_iax2.SinceIAXconnections
combinesignalling,audio,andvideointooneUDPstream,itisnotpossibletosettheTOSseparatelyforthedifferenttypesoftraffic.
Iniaxprov.conf,thereisa"tos"parameterthattellstheIAXywhatTOStosetonpacketsitgenerates.Aswiththeparameteriniax.conf,
IAXpacketsgeneratedbyanIAXycannothavedifferentTOSsettingsbaseduponthetypeofpacket.HoweverdifferentIAXydevices
canhavedifferentTOSsettings.
CHAN_SIP
Inchan_sip,therearefourparametersthatcontroltheTOSsettings:"tos_sip","tos_audio","tos_video"and"tos_text".tos_sipcontrols
whatTOSSIPcallsignalingpacketsaresetto.tos_audio,tos_videoandtos_textcontrolwhatTOSvaluesareusedforRTPaudio,
video,andtextpackets,respectively.
Therearefourparameterstocontrol802.1pCoS:"cos_sip","cos_audio","cos_video"and"cos_text".Thebehavioroftheseparameters
isthesameasfortheSIPTOSsettingsdescribedabove.
CHAN_PJSIP
Inchan_pjsip,therearethreeparametersthatcontroltheTOSsettings:atosoptionforatype=transportthatcontrolstheTOSofSIP
signalingpackets,atos_audiooptionforatype=endpointthatcontrolstheTOSofRTPaudiopackets,andatos_videooptionfora
type=endpointthatcontrolstheTOSofvideopackets.
Similarly,therearethereparametersthatcontrolthe802.1pCoSsettings:acosoptionforatype=transportthatcontrolsthe802.1p
valueforSIPsignalingpackets,acos_audiooptionforatype=endpointthatcontrolsthe802.1pvalueofRTPaudiopackets,and
https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service
2/3
27/7/2015
IPQualityofServiceAsteriskProjectAsteriskProjectWiki
acos_videooptionforatype=endpointthatcontrolsthe802.1pvalueforvideopackets.
Changestoachan_pjsiptype=transportrequireanAsteriskrestarttobeaffected.Theyarenotaffectedbysimplyreloading
Asterisk.
OtherRTPchannels
chan_mgcp,chan_h323,chan_skinnyandchan_unistimalsosupportTOSandCoSviasettingtosandcosparametersintheir
correspondingconfigurationfiles.Namingstyleandbehaviorarethesameasforchan_sip.
Reference
IEEE802.1QStandard:http://standards.ieee.org/getieee802/download/802.1Q1998.pdfRelatedprotocols:IEEE802.3,802.2,802.1D,
802.1Q
RFC2474"DefinitionoftheDifferentiatedServicesField(DSfield)intheIPv4andIPv6Headers",Nichols,K.,etal,December1998.
IANAAssignments,DSCPregistryDifferentiatedServicesFieldCodepointshttp://www.iana.org/assignments/dscpregistry
TogetthemostoutofsettingtheTOSonpacketsgeneratedbyAsterisk,youwillneedtoensurethatyournetworkhandlespacketswith
aTOSproperly.ForCiscodevices,seethepreviouslymentioned"EnterpriseQoSSolutionReferenceNetworkDesignGuide".ForLinux
systemsseethe"LinuxAdvancedRouting&TrafficControlHOWTO"athttp://www.lartc.org/.
FormoreinformationonQualityofServiceforVoIPnetworksseethe"EnterpriseQoSSolutionReferenceNetworkDesignGuide"
version3.3fromCiscoat:http://www.cisco.com/application/pdf/en/us/guest/netsol/ns432/c649/ccmigration_09186a008049b062.pdf
https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service
3/3