mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -504,6 +504,10 @@ struct ast_sip_media_rtp_configuration {
|
||||
unsigned int encryption_optimistic;
|
||||
/*! Number of seconds between RTP keepalive packets */
|
||||
unsigned int keepalive;
|
||||
/*! Number of seconds before terminating channel due to lack of RTP (when not on hold) */
|
||||
unsigned int timeout;
|
||||
/*! Number of seconds before terminating channel due to lack of RTP (when on hold) */
|
||||
unsigned int timeout_hold;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@@ -79,6 +79,8 @@ struct ast_sip_session_media {
|
||||
pj_str_t transport;
|
||||
/*! \brief Scheduler ID for RTP keepalive */
|
||||
int keepalive_sched_id;
|
||||
/*! \brief Scheduler ID for RTP timeout */
|
||||
int timeout_sched_id;
|
||||
/*! \brief Stream is on hold by remote side */
|
||||
unsigned int remotely_held:1;
|
||||
/*! \brief Stream is on hold by local side */
|
||||
|
@@ -2304,6 +2304,22 @@ time_t ast_rtp_instance_get_last_tx(const struct ast_rtp_instance *rtp);
|
||||
*/
|
||||
void ast_rtp_instance_set_last_tx(struct ast_rtp_instance *rtp, time_t time);
|
||||
|
||||
/*
|
||||
* \brief Get the last RTP reception time
|
||||
*
|
||||
* \param rtp The instance from which to get the last reception time
|
||||
* \return The last RTP reception time
|
||||
*/
|
||||
time_t ast_rtp_instance_get_last_rx(const struct ast_rtp_instance *rtp);
|
||||
|
||||
/*!
|
||||
* \brief Set the last RTP reception time
|
||||
*
|
||||
* \param rtp The instance on which to set the last reception time
|
||||
* \param time The last reception time
|
||||
*/
|
||||
void ast_rtp_instance_set_last_rx(struct ast_rtp_instance *rtp, time_t time);
|
||||
|
||||
/*! \addtogroup StasisTopicsAndMessages
|
||||
* @{
|
||||
*/
|
||||
|
Reference in New Issue
Block a user