aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/rtp_engine.h
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-14 17:03:37 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-14 17:03:37 +0000
commitbdb71463e76f5a849c8805acb3037402219dbbb3 (patch)
tree9656c5e9abe9c471c0e64801869675d13c4a603e /include/asterisk/rtp_engine.h
parente2271ffc337b97e49cbdf0b8f8737563eafeb0f6 (diff)
Merged revisions 323370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323370 | twilson | 2011-06-14 09:33:55 -0700 (Tue, 14 Jun 2011) | 10 lines Add rtpkeepalives back to 1.8 The RTP-engine conversion left out support for handling rtpkeepalives. This patch adds them back. (closes issue ASTERISK-17304) Reported by: lmadsen Review: https://reviewboard.asterisk.org/r/1226/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@323374 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/rtp_engine.h')
-rw-r--r--include/asterisk/rtp_engine.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index f8bf74931..e04303ca6 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -377,6 +377,8 @@ struct ast_rtp_engine {
void (*stun_request)(struct ast_rtp_instance *instance, struct ast_sockaddr *suggestion, const char *username);
/*! Callback to get the transcodeable formats supported. result returned in ast_format_cap *result */
void (*available_formats)(struct ast_rtp_instance *instance, struct ast_format_cap *to_endpoint, struct ast_format_cap *to_asterisk, struct ast_format_cap *result);
+ /*! Callback to send CNG */
+ int (*sendcng)(struct ast_rtp_instance *instance, int level);
/*! Linked list information */
AST_RWLIST_ENTRY(ast_rtp_engine) entry;
};
@@ -1713,6 +1715,24 @@ void ast_rtp_instance_set_timeout(struct ast_rtp_instance *instance, int timeout
void ast_rtp_instance_set_hold_timeout(struct ast_rtp_instance *instance, int timeout);
/*!
+ * \brief Set the RTP keepalive interval
+ *
+ * \param instance The RTP instance
+ * \param period Value to set the keepalive interval to
+ *
+ * Example usage:
+ *
+ * \code
+ * ast_rtp_instance_set_keepalive(instance, 5000);
+ * \endcode
+ *
+ * This sets the RTP keepalive interval on 'instance' to be 5000.
+ *
+ * \since 1.8
+ */
+void ast_rtp_instance_set_keepalive(struct ast_rtp_instance *instance, int timeout);
+
+/*!
* \brief Get the RTP timeout value
*
* \param instance The RTP instance
@@ -1751,6 +1771,25 @@ int ast_rtp_instance_get_timeout(struct ast_rtp_instance *instance);
int ast_rtp_instance_get_hold_timeout(struct ast_rtp_instance *instance);
/*!
+ * \brief Get the RTP keepalive interval
+ *
+ * \param instance The RTP instance
+ *
+ * \retval period Keepalive interval value
+ *
+ * Example usage:
+ *
+ * \code
+ * int interval = ast_rtp_instance_get_keepalive(instance);
+ * \endcode
+ *
+ * This gets the RTP keepalive interval value for the RTP instance pointed to by 'instance'.
+ *
+ * \since 1.8
+ */
+int ast_rtp_instance_get_keepalive(struct ast_rtp_instance *instance);
+
+/*!
* \brief Get the RTP engine in use on an RTP instance
*
* \param instance The RTP instance
@@ -1809,6 +1848,17 @@ struct ast_rtp_glue *ast_rtp_instance_get_active_glue(struct ast_rtp_instance *i
*/
struct ast_channel *ast_rtp_instance_get_chan(struct ast_rtp_instance *instance);
+/*!
+ * \brief Send a comfort noise packet to the RTP instance
+ *
+ * \param instance The RTP instance
+ * \param level Magnitude of the noise level
+ *
+ * \retval 0 Success
+ * \retval non-zero Failure
+ */
+int ast_rtp_instance_sendcng(struct ast_rtp_instance *instance, int level);
+
int ast_rtp_instance_add_srtp_policy(struct ast_rtp_instance *instance, struct ast_srtp_policy *policy);
struct ast_srtp *ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance);