diff options
author | Terry Wilson <twilson@digium.com> | 2011-06-14 17:03:37 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2011-06-14 17:03:37 +0000 |
commit | abd7ef817eb96193486f61848313d2e267c2b503 (patch) | |
tree | 9656c5e9abe9c471c0e64801869675d13c4a603e /include/asterisk/rtp_engine.h | |
parent | 00181729b4c4a62e6baccf3b91b452d61af116b2 (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: https://origsvn.digium.com/svn/asterisk/trunk@323374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/rtp_engine.h')
-rw-r--r-- | include/asterisk/rtp_engine.h | 50 |
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); |