# Call statistics available in CDR

|               Field name               | Description                                                                                                                                                                                                                                                                                              |
| :------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|             **Statistics**             |                                                                                                                                                                                                                                                                                                          |
|             @{StatSummary}             | <p>Summary of the RTP and T.38 stats in a pre-defined format:<br>RTP( Rx(Pkt=2 CN=0 Signaling=0 Err=0) Tx(Pkt=0 CN=0 Signaling=0 Err=0)) T38( Rx(Pages=0 Pkt=0 Err=0) Tx(Pages=0 Pkt=0))<br>MOS(In=4.3 Out=4.3}) NetworkQuality(In=100 Out=100)<br>For customized format, use other variables below.</p> |
|           **MOS statistics**           |                                                                                                                                                                                                                                                                                                          |
|               @{Stat:MOS}              | Summary of the MOS stats: (Codec;Ingress;Egress)                                                                                                                                                                                                                                                         |
|            @{Stat:MOS:Codec}           | Maximal MOS value for the audio codec used                                                                                                                                                                                                                                                               |
|           @{Stat:MOS:Ingress}          | Calculated MOS value using RTP RX statistics                                                                                                                                                                                                                                                             |
|           @{Stat:MOS:Egress}           | Calculated MOS value using RTCP statistics (available only when RTCP is enable)                                                                                                                                                                                                                          |
|           @{Stat:MOS:Global}           | Minimum value between MOS ingress and MOS egress                                                                                                                                                                                                                                                         |
|     **Network quality statistics**     |                                                                                                                                                                                                                                                                                                          |
|         @{Stat:NetworkQuality}         | Summary of the network quality stats: (Ingress;Egress)                                                                                                                                                                                                                                                   |
|     @{Stat:NetworkQuality:Ingress}     | Calculated network quality percentage from 0 (bad) to 100 (perfect) for packets received                                                                                                                                                                                                                 |
|      @{Stat:NetworkQuality:Egress}     | Calculated network quality percentage from 0 (bad) to 100 (perfect) for packets transmitted (available only when RTCP is enable)                                                                                                                                                                         |
|      @{Stat:NetworkQuality:Global}     | Minimum value between ingress and egress                                                                                                                                                                                                                                                                 |
|         **Receive statistics**         |                                                                                                                                                                                                                                                                                                          |
|             @{Stat:Rtp:Rx}             | Summary of the Rx stats: (Packets;CNPackets;SignalingPackets;Errors;MOS:Ingress)                                                                                                                                                                                                                         |
|         @{Stat:Rtp:Rx:Packets}         | Number of packets received from the IP network (audio + comfort noise + signaling)                                                                                                                                                                                                                       |
|       @{Stat:Rtp:Rx:VoicePackets}      | Number of voice (audio) packets received from the IP network                                                                                                                                                                                                                                             |
|        @{Stat:Rtp:Rx:VoiceBytes}       | Number of payload bytes from voice (audio) packets received from the IP network                                                                                                                                                                                                                          |
|        @{Stat:Rtp:Rx:CNPackets}        | Number of comfort noise packets received from the IP network                                                                                                                                                                                                                                             |
|     @{Stat:Rtp:Rx:SignalingPackets}    | Number of signaling packets (like "Telephony events") received from the IP network                                                                                                                                                                                                                       |
|        @{Stat:Rtp:Rx:IPPackets}        | Number of packets received from the IP network                                                                                                                                                                                                                                                           |
|         @{Stat:Rtp:Rx:IPBytes}         | Number of bytes received from the IP network                                                                                                                                                                                                                                                             |
|       @{Stat:Rtp:Rx:RFC2833Tones}      | Number of RFC2833 tones received from the IP network, and played back to TDM                                                                                                                                                                                                                             |
|     @{Stat:Rtp:Rx:RedundantPackets}    | Number of redundant packets received from the IP network (same sequence number received more than once)                                                                                                                                                                                                  |
|        @{Stat:Rtp:Rx:MeanPower}        | Mean audio power (from IP to TDM direction), in dBov (0 the loudest, negative is softer level). Available only for calls with Echo cancellation enabled, thus only TDM<->IP calls.                                                                                                                       |
|      @{Stat:Rtp:Rx:VoiceDuration}      | Duration (in seconds) of voice (audio), from IP to TDM direction                                                                                                                                                                                                                                         |
|       @{Stat:Rtp:Rx:PlayoutDelay}      | Current IP to TDM audio delay in millisecond (adaptive jitter buffer delay)                                                                                                                                                                                                                              |
|     @{Stat:Rtp:Rx:MaxPlayoutDelay}     | Maximum (for the whole call) IP to TDM audio delay in millisecond (adaptive jitter buffer delay)                                                                                                                                                                                                         |
|       @{Stat:Rtp:Rx:SsrcChanges}       | Number of changes of "SSRC" RTP header value (counting initial SSRC received as one)                                                                                                                                                                                                                     |
|       @{Stat:Rtp:Rx:Concealments}      | Number of times decoder made audio concealment to preserve audio continuity (frequent upon first packet of a call, or after RFC2833 tones)                                                                                                                                                               |
|      @{Stat:Rtp:Rx:Echo:ERLLevel}      | Attenuation of a signal from the received-out port to the send-in port of an echo canceller                                                                                                                                                                                                              |
|    @{Stat:Rtp:Rx:Error:BufOverflows}   | Number of packets dropped due to jitter buffer adaptation (to keep play-out delay low)                                                                                                                                                                                                                   |
|     @{Stat:Rtp:Rx:Error:SeqErrors}     | Number of sequence errors detected among packets received from the IP network                                                                                                                                                                                                                            |
|     @{Stat:Rtp:Rx:Error:BadPackets}    | Number of packets received with invalid header, or other error preventing proper audio decoding                                                                                                                                                                                                          |
| @{Stat:Rtp:Rx:Error:RFC2833BadPackets: | Number of RFC2833 signaling packets that could not be properly decoded                                                                                                                                                                                                                                   |
|    @{Stat:Rtp:Rx:Error:LatePackets}    | Number of packets that arrived after the moment they should have started to be played-out to TDM                                                                                                                                                                                                         |
|    @{Stat:Rtp:Rx:Error:LostPackets}    | Number of packets considered "lost" (never received for play-out to TDM)                                                                                                                                                                                                                                 |
|          @{Stat:Rtp:Rx:Errors}         | Total of all "Rtp:Rx:Error:" statistics above                                                                                                                                                                                                                                                            |
|         **Transmit statistics**        |                                                                                                                                                                                                                                                                                                          |
|             @{Stat:Rtp:Tx}             | Summary of the Tx stats: (Packets;CNPackets;SignalingPackets;Errors;MOS:Egress)                                                                                                                                                                                                                          |
|         @{Stat:Rtp:Tx:Packets}         | Number of packets sent to the IP network (audio + comfort noise + signaling)                                                                                                                                                                                                                             |
|       @{Stat:Rtp:Tx:VoicePackets}      | Number of voice (audio) packets sent to the IP network                                                                                                                                                                                                                                                   |
|        @{Stat:Rtp:Tx:CNPackets}        | Number of comfort noise packets sent to the IP network                                                                                                                                                                                                                                                   |
|     @{Stat:Rtp:Tx:SignalingPackets}    | Number of signaling packets (like "Telephony events") sent to the IP network                                                                                                                                                                                                                             |
|        @{Stat:Rtp:Tx:IPPackets}        | Number of packets sent to the IP network                                                                                                                                                                                                                                                                 |
|         @{Stat:Rtp:Tx:IPBytes}         | Number of bytes sent to the IP network                                                                                                                                                                                                                                                                   |
|       @{Stat:Rtp:Tx:RFC2833Tones}      | Number of RFC2833 tones sent to the IP network (relaying corresponding detected TDM tones)                                                                                                                                                                                                               |
|        @{Stat:Rtp:Tx:MeanPower}        | Mean audio power (from TDM to IP direction), in dBov (0 the loudest, negative is softer level). Available only for calls with Echo cancellation enabled, thus only TDM<->IP calls.                                                                                                                       |
|      @{Stat:Rtp:Tx:VoiceDuration}      | Duration (in seconds) of voice (audio), from TDM to IP direction                                                                                                                                                                                                                                         |
|      @{Stat:Rtp:Tx:Echo:ACOMLevel}     | Attenuation of a signal from the receive-out port to the send-out port of an echo canceller                                                                                                                                                                                                              |
|    @{Stat:Rtp:Tx:Error:LostPackets}    | Number of packets considered "lost" by remote side (only available if RTCP is used)                                                                                                                                                                                                                      |
|     @{Stat:Rtp:Tx:Error:ArpFailure}    | Number of failures to ARP remote IP address to send RTP packets to (preventing sending any packets)                                                                                                                                                                                                      |
|          @{Stat:Rtp:Tx:Errors}         | Total of all "Rtp:Tx:Error:" statistics above                                                                                                                                                                                                                                                            |
|           **RTCP statistics**          | **(only if RTCP is enabled on the profile)**                                                                                                                                                                                                                                                             |
|              @{Stat:Rtcp}              | Summary of the Rtcp stats: (Packets;LostPackets;Jitter)                                                                                                                                                                                                                                                  |
|          @{Stat:Rtcp:Packets}          | Number of packets reported as received by remote equipment                                                                                                                                                                                                                                               |
|        @{Stat:Rtcp:LostPackets}        | Number of packets reported as lost by remote equipment                                                                                                                                                                                                                                                   |
|           @{Stat:Rtcp:Jitter}          | Inter-packet interval jitter, in millisecond                                                                                                                                                                                                                                                             |
|       @{Stat:Rtcp:RoundTripDelay}      | Round-trip delay in milliseconds. Requires extended RTCP (XRTCP) to be enabled.                                                                                                                                                                                                                          |
|           **T38 statistics**           |                                                                                                                                                                                                                                                                                                          |
|        @{Stat:T38:StateChanges}        | Number of T.38 state changes, through T.30 negotiation between FAX machines                                                                                                                                                                                                                              |
|              @{Stat:T38:Rx             | Summary of the T.38 Rx stats: (Pages;Packets;Errors)                                                                                                                                                                                                                                                     |
|          @{Stat:T38:Rx:Pages}          | Number of FAX pages received from T.38 packets from the IP network                                                                                                                                                                                                                                       |
|         @{Stat:T38:Rx:Packets}         | Number of T.38 packets received from the IP network                                                                                                                                                                                                                                                      |
|          @{Stat:T38:Rx:Bytes}          | Number of T.38 payload bytes from T.38 packets received from the IP network                                                                                                                                                                                                                              |
|         @{Stat:T38:Rx:Duration}        | Duration of the T.38 session from IP to TDM                                                                                                                                                                                                                                                              |
|       @{Stat:T38:Rx:PlayoutDelay}      | Current IP to TDM audio delay in millisecond (re-modulation and jitter buffer delay)                                                                                                                                                                                                                     |
|     @{Stat:T38:Rx:MaxPlayoutDelay}     | Maximum IP to TDM audio delay in millisecond (re-modulation and jitter buffer delay)                                                                                                                                                                                                                     |
|    @{Stat:T38:Rx:Error:BufOverflows}   | Number of packets dropped because "from IP" jitter buffer is full                                                                                                                                                                                                                                        |
|   @{Stat:T38:Rx:Error:BufUnderflows}   | Number of times T.38 re-modulation to TDM had no data (received from IP) to re-modulate                                                                                                                                                                                                                  |
|     @{Stat:T38:Rx:Error:SeqErrors}     | Number of sequence errors detected among packets received from the IP network                                                                                                                                                                                                                            |
|     @{Stat:T38:Rx:Error:BadPackets}    | Number of packets received with invalid header, or other error preventing proper audio decoding                                                                                                                                                                                                          |
|          @{Stat:T38:Rx:Errors}         | Total of all "T38:Rx:Error:" statistics above                                                                                                                                                                                                                                                            |
|             @{Stat:T38:Tx}             | Summary of the T.38 Tx stats: (Pages;Packets)                                                                                                                                                                                                                                                            |
|          @{Stat:T38:Tx:Pages}          | Number of FAX pages received from TDM, sent to T.38 packets to the IP network                                                                                                                                                                                                                            |
|         @{Stat:T38:Tx:Packets}         | Number of T.38 packets sent to the IP network                                                                                                                                                                                                                                                            |
|          @{Stat:T38:Tx:Bytes}          | Number of T.38 payload bytes from T.38 packets sent to the IP network                                                                                                                                                                                                                                    |
|         @{Stat:T38:Tx:Duration}        | Duration of the T.38 session from TDM to IP                                                                                                                                                                                                                                                              |
|      @{Stat:T38:FromTdm:MeanPower}     | Mean audio power received from TDM side, in dBov (0 the loudest, negative is softer level)                                                                                                                                                                                                               |

| Field name                                       | Description                                                                                                                                                                                                                                                 |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Receive statistics                               |                                                                                                                                                                                                                                                             |
| @{ErrorSummary}                                  | <p>Summary of reported leg errors in a pre-defined format:<br>FromNetwork(NoPackets;ExcessivePackets;ExcessivePayloadTypeChanges;ExcessiveIpPortChanges;ExcessiveSsrcChanges) ToNetwork(NoPackets)<br>For customized format, use other variables below.</p> |
| @{Error:FromNetwork}                             | Summary of the leg errors 'from network': (NoPackets;ExcessivePackets;ExcessivePayloadTypeChanges;ExcessiveIpPortChanges;ExcessiveSsrcChanges)                                                                                                              |
| @{FromNetwork:NoPackets}                         | When '1', no packets received from the network in the last few seconds, while packets were expected.                                                                                                                                                        |
| @{Error:FromNetwork:ExcessivePayloadTypeChanges} | When '1', excessive payload type changes were detected in the last few seconds. Payload type changes will be ignored. Packets may be dropped.                                                                                                               |
| @{Error:FromNetwork:ExcessiveIpPortChanges}      | When '1', excessive remote IP/Port changes were detected in the last few seconds. Received packets will be dropped.                                                                                                                                         |
| @{Error:FromNetwork:ExcessiveSsrcChanges}        | When '1', excessive remote SSRC changes (SSRC field in RTP packets header) were detected in the last few seconds. Received packets will be dropped.                                                                                                         |
| @{Error:FromNetwork:ExcessivePackets}            | When '1', excessive packets/bytes rate was received from the network. All packets will be dropped.                                                                                                                                                          |
| @{Error:ToNetwork}                               | Summary of the leg errors 'tonetwork': (NoPackets)                                                                                                                                                                                                          |
| @{Error:ToNetwork:NoPackets}                     | When '1', no packets were sent to network in the last few seconds, while we were supposed to send packets (remote IP not reachable?)                                                                                                                        |
