summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorBrett Bryant <bbryant@digium.com>2008-06-05 16:24:19 +0000
committerBrett Bryant <bbryant@digium.com>2008-06-05 16:24:19 +0000
commitc1451b553785c40c1c7bdcb4a054d3079766506d (patch)
treed1e5ce5e2319e18edd672e98cdfaae3e096a1e2e /include/asterisk
parent90d75af3463bfd5e549f3301d7b793119fded316 (diff)
This patch adds more detailed statistics for RTP channels, and provides an API call to access it, including maximums, minimums, standard deviatinos,
and normal deviations. Currently this is implemented for chan_sip, but could be added to the func_channel_read callbacks for the CHANNEL function for any channel that uses RTP. (closes issue #10590) Reported by: gasparz Patches: chan_sip_c.diff uploaded by gasparz (license 219) rtp_c.diff uploaded by gasparz (license 219) rtp_h.diff uploaded by gasparz (license 219) audioqos-trunk.diff uploaded by snuffy (license 35) rtpqos-trunk-r119891.diff uploaded by sergee (license 138) Tested by: jsmith, gasparz, snuffy, marsosa, chappell, sergee git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/rtp.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h
index bb8358feb..38fe8639c 100644
--- a/include/asterisk/rtp.h
+++ b/include/asterisk/rtp.h
@@ -89,6 +89,13 @@ struct ast_rtp_protocol {
AST_LIST_ENTRY(ast_rtp_protocol) list;
};
+enum ast_rtp_quality_type {
+ RTPQOS_SUMMARY = 0,
+ RTPQOS_JITTER,
+ RTPQOS_LOSS,
+ RTPQOS_RTT
+};
+
/*! \brief RTCP quality report storage */
struct ast_rtp_quality {
unsigned int local_ssrc; /*!< Our SSRC */
@@ -259,9 +266,32 @@ int ast_rtp_make_compatible(struct ast_channel *dest, struct ast_channel *src, i
having to send a re-invite later */
int ast_rtp_early_bridge(struct ast_channel *c0, struct ast_channel *c1);
-/*! \brief Return RTCP quality string */
-char *ast_rtp_get_quality(struct ast_rtp *rtp, struct ast_rtp_quality *qual);
+/*! \brief Get QOS stats on a RTP channel */
+int ast_rtp_get_qos(struct ast_rtp *rtp, const char *qos, char *buf, unsigned int buflen);
+/*! \brief Set RTPAUDIOQOS(...) variables on a channel when it is being hung up */
+void ast_rtp_set_vars(struct ast_channel *chan, struct ast_rtp *rtp);
+/*! \brief Return RTCP quality string
+ *
+ * \param rtp An rtp structure to get qos information about.
+ *
+ * \param qual An (optional) rtp quality structure that will be
+ * filled with the quality information described in
+ * the ast_rtp_quality structure. This structure is
+ * not dependent on any qtype, so a call for any
+ * type of information would yield the same results
+ * because ast_rtp_quality is not a data type
+ * specific to any qos type.
+ *
+ * \param qtype The quality type you'd like, default should be
+ * RTPQOS_SUMMARY which returns basic information
+ * about the call. The return from RTPQOS_SUMMARY
+ * is basically ast_rtp_quality in a string. The
+ * other types are RTPQOS_JITTER, RTPQOS_LOSS and
+ * RTPQOS_RTT which will return more specific
+ * statistics.
+ */
+char *ast_rtp_get_quality(struct ast_rtp *rtp, struct ast_rtp_quality *qual, enum ast_rtp_quality_type qtype);
/*! \brief Send an H.261 fast update request. Some devices need this rather than the XML message in SIP */
int ast_rtcp_send_h261fur(void *data);