Re: [OpenSIPStack] How to obtain a name of the current audio codec or PayLoadType?
Brought to you by:
joegenbaclor
From: H.Kropf <mai...@gl...> - 2008-09-11 09:35:52
|
Hi, Joegen How to obtain a name of the current audio codec or PayLoadType? I need it for calculation of ICPIF ("The Calculated Planning Impairment Factor") I get other necessary parametres (packetsLost, packetsTooLate etc.) in OpalOSSConnection::OnRTPStatistics() "Cisco IP Service Level Agreements — Analyzing VoIP Service Levels Using the UDP Jitter Operation" Lost = (packetsLost + packetsTooLate + packetsOutOfOrder) *100.0 / packetsReceived if (Codec == G729) || (Codec == ILBC) { if (Lost< 2.0) then (Ie = 0) else if (Lost< 4.0) then (Ie = 20) else if (Lost< 6.0) then (Ie = 30) else if (Lost< 8.0) then (Ie = 38) else Ie = 40 } else{ if (Lost< 2.0) then (Ie = 0) else if (Lost< 4.0) then (Ie = 12) else if (Lost< 6.0) then (Ie = 22) else if (Lost< 8.0) then (Ie = 28) else Ie = 32 } if (averageReceiveTime < 50) then (Idd = 0) else if (averageReceiveTime < 100) then (Idd = 1) else if (averageReceiveTime < 150) then (Idd = 2) else if (averageReceiveTime < 200) then (Idd = 4) else Idd = 7 ICPIF = Idd + Ie if (ICPIF < 5 ) then print ("Very good") else if (ICPIF < 10 ) then print ("Good") else if (ICPIF < 20 ) then print ("Adequate") else if (ICPIF < 30 ) then print ("Limiting case") else if (ICPIF < 45 ) then print ("Exceptional limiting case") else print ("Change of network operator") print ICPIF |