summaryrefslogtreecommitdiff
path: root/main/rtp_engine.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-07-18 13:16:10 -0300
committerJoshua Colp <jcolp@digium.com>2015-07-24 12:43:43 -0300
commit309dd2a4090ccdd1ea31d8d5415a645daddd3883 (patch)
tree625855c3191c70217c6087593767baf3e0a0cb6d /main/rtp_engine.c
parenta105461f9eadbacb684fe3751cddae2a7f400dea (diff)
pjsip: Add rtp_timeout and rtp_timeout_hold endpoint options.
This change adds support for the 'rtp_timeout' and 'rtp_timeout_hold' endpoint options. These allow the channel to be hung up if RTP is not received from the remote endpoint for a specified number of seconds. ASTERISK-25259 #close Change-Id: I3f39daaa7da2596b5022737b77799d16204175b9
Diffstat (limited to 'main/rtp_engine.c')
-rw-r--r--main/rtp_engine.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 94bd8136f..742f2de88 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -192,6 +192,8 @@ struct ast_rtp_instance {
char channel_uniqueid[AST_MAX_UNIQUEID];
/*! Time of last packet sent */
time_t last_tx;
+ /*! Time of last packet received */
+ time_t last_rx;
};
/*! List of RTP engines that are currently registered */
@@ -2209,7 +2211,6 @@ int ast_rtp_engine_init()
return 0;
}
-
time_t ast_rtp_instance_get_last_tx(const struct ast_rtp_instance *rtp)
{
return rtp->last_tx;
@@ -2219,3 +2220,13 @@ void ast_rtp_instance_set_last_tx(struct ast_rtp_instance *rtp, time_t time)
{
rtp->last_tx = time;
}
+
+time_t ast_rtp_instance_get_last_rx(const struct ast_rtp_instance *rtp)
+{
+ return rtp->last_rx;
+}
+
+void ast_rtp_instance_set_last_rx(struct ast_rtp_instance *rtp, time_t time)
+{
+ rtp->last_rx = time;
+}