summaryrefslogtreecommitdiff
path: root/main
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 /main
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 'main')
-rw-r--r--main/rtp_engine.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 2d61c89b6..8562558b8 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -190,6 +190,8 @@ struct ast_rtp_instance {
struct ast_srtp *srtp;
/*! Channel unique ID */
char channel_uniqueid[AST_MAX_UNIQUEID];
+ /*! Time of last packet sent */
+ time_t last_tx;
};
/*! List of RTP engines that are currently registered */
@@ -2191,3 +2193,14 @@ 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;
+}
+
+void ast_rtp_instance_set_last_tx(struct ast_rtp_instance *rtp, time_t time)
+{
+ rtp->last_tx = time;
+}