summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-07-09 14:17:53 -0500
committerMark Michelson <mmichelson@digium.com>2015-07-20 09:52:10 -0500
commitd9094ddd73410fc4da65795511dc6912e007d503 (patch)
tree2eef3e6618dcdb2016c8ba909b03add5aaed7eab /include
parent34207887e6e6adbd7c9ff9e9ea1954d612e125a4 (diff)
res_pjsip: Add rtp_keepalive endpoint option.
This adds an "rtp_keepalive" option for PJSIP endpoints. Similar to the chan_sip option, this specifies an interval, in seconds, at which we will send RTP comfort noise frames. This can be useful for keeping RTP sessions alive as well as keeping NAT associations alive during lulls. ASTERISK-25242 #close Reported by Mark Michelson Change-Id: I06660ba672c0a343814af4cec838e6025cafd54b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_pjsip.h2
-rw-r--r--include/asterisk/res_pjsip_session.h2
-rw-r--r--include/asterisk/rtp_engine.h16
3 files changed, 20 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 1f9276b41..cbd09e0e0 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -500,6 +500,8 @@ struct ast_sip_media_rtp_configuration {
enum ast_sip_session_media_encryption encryption;
/*! Do we want to optimistically support encryption if possible? */
unsigned int encryption_optimistic;
+ /*! Number of seconds between RTP keepalive packets */
+ unsigned int keepalive;
};
/*!
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index 05548d5fc..5489979ed 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -77,6 +77,8 @@ struct ast_sip_session_media {
enum ast_sip_session_media_encryption encryption;
/*! \brief The media transport in use for this stream */
pj_str_t transport;
+ /*! \brief Scheduler ID for RTP keepalive */
+ int keepalive_sched_id;
/*! \brief Stream is on hold */
unsigned int held:1;
/*! \brief Stream type this session media handles */
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index a1a17da43..f57f4ea35 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -2288,6 +2288,22 @@ void ast_rtp_publish_rtcp_message(struct ast_rtp_instance *rtp,
struct ast_rtp_rtcp_report *report,
struct ast_json *blob);
+/*!
+ * \brief Get the last RTP transmission time
+ *
+ * \param rtp The instance from which to get the last transmission time
+ * \return The last RTP transmission time
+ */
+time_t ast_rtp_instance_get_last_tx(const struct ast_rtp_instance *rtp);
+
+/*!
+ * \brief Set the last RTP transmission time
+ *
+ * \param rtp The instance on which to set the last transmission time
+ * \param time The last transmission time
+ */
+void ast_rtp_instance_set_last_tx(struct ast_rtp_instance *rtp, time_t time);
+
/*! \addtogroup StasisTopicsAndMessages
* @{
*/