mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-29 07:24:55 +00:00
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/branches/1.8@323370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -65,6 +65,8 @@ struct ast_rtp_instance {
|
||||
int timeout;
|
||||
/*! RTP timeout when on hold (negative or zero means disabled, negative value means temporarily disabled). */
|
||||
int holdtimeout;
|
||||
/*! RTP keepalive interval */
|
||||
int keepalive;
|
||||
/*! DTMF mode in use */
|
||||
enum ast_rtp_dtmf_mode dtmf_mode;
|
||||
/*! Glue currently in use */
|
||||
@@ -1710,6 +1712,11 @@ void ast_rtp_instance_set_hold_timeout(struct ast_rtp_instance *instance, int ti
|
||||
instance->holdtimeout = timeout;
|
||||
}
|
||||
|
||||
void ast_rtp_instance_set_keepalive(struct ast_rtp_instance *instance, int interval)
|
||||
{
|
||||
instance->keepalive = interval;
|
||||
}
|
||||
|
||||
int ast_rtp_instance_get_timeout(struct ast_rtp_instance *instance)
|
||||
{
|
||||
return instance->timeout;
|
||||
@@ -1720,6 +1727,11 @@ int ast_rtp_instance_get_hold_timeout(struct ast_rtp_instance *instance)
|
||||
return instance->holdtimeout;
|
||||
}
|
||||
|
||||
int ast_rtp_instance_get_keepalive(struct ast_rtp_instance *instance)
|
||||
{
|
||||
return instance->keepalive;
|
||||
}
|
||||
|
||||
struct ast_rtp_engine *ast_rtp_instance_get_engine(struct ast_rtp_instance *instance)
|
||||
{
|
||||
return instance->engine;
|
||||
@@ -1778,3 +1790,12 @@ struct ast_srtp *ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance)
|
||||
{
|
||||
return instance->srtp;
|
||||
}
|
||||
|
||||
int ast_rtp_instance_sendcng(struct ast_rtp_instance *instance, int level)
|
||||
{
|
||||
if (instance->engine->sendcng) {
|
||||
return instance->engine->sendcng(instance, level);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user