diff options
author | George Joseph <george.joseph@fairview5.com> | 2016-03-27 11:53:16 -0600 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2016-03-28 11:23:08 -0600 |
commit | 1bce690ccb36a4744a327c07af23a9a3a0fa20cd (patch) | |
tree | 5a3081d5d815baf4c47644abf96e8b2b454a7b0f /include/asterisk | |
parent | c88c09a9204544c8d903ef333ba9bbeb3c8cd692 (diff) |
res_rtp_asterisk: Fix packet stats on bridged connection
rxcount, txcount, rxoctetcount and txoctetcount weren't being calculated
for bridged streams because the calulations were being done after the
bridged short-circuit. Actually, rxoctetcount wasn't ever being calculated.
Moved the calculations so they occur for all valid received packets and
all transmitted packets. Also added rxoctetcount and txoctetcount to
ast_rtp_instance_stat.
Change-Id: I08fb06011a82d38c3b4068867a615068fbe59cbb
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/rtp_engine.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index c79554bf0..f9a568520 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -228,6 +228,10 @@ enum ast_rtp_instance_stat { AST_RTP_INSTANCE_STAT_REMOTE_SSRC, /*! Retrieve channel unique ID */ AST_RTP_INSTANCE_STAT_CHANNEL_UNIQUEID, + /*! Retrieve number of octets transmitted */ + AST_RTP_INSTANCE_STAT_TXOCTETCOUNT, + /*! Retrieve number of octets received */ + AST_RTP_INSTANCE_STAT_RXOCTETCOUNT, }; /* Codes for RTP-specific data - not defined by our AST_FORMAT codes */ @@ -355,6 +359,10 @@ struct ast_rtp_instance_stats { unsigned int remote_ssrc; /*! The Asterisk channel's unique ID that owns this instance */ char channel_uniqueid[MAX_CHANNEL_ID]; + /*! Number of octets transmitted */ + unsigned int txoctetcount; + /*! Number of octets received */ + unsigned int rxoctetcount; }; #define AST_RTP_STAT_SET(current_stat, combined, placement, value) \ |