mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Merged revisions 323370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323370 | twilson | 2011-06-14 09:33:55 -0700 (Tue, 14 Jun 2011) | 10 lines 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/trunk@323374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -66,6 +66,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 */
|
||||
@@ -1781,6 +1783,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;
|
||||
@@ -1791,6 +1798,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;
|
||||
@@ -1850,6 +1862,15 @@ 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;
|
||||
}
|
||||
|
||||
static void set_next_mime_type(const struct ast_format *format, int rtp_code, char *type, char *subtype, unsigned int sample_rate)
|
||||
{
|
||||
int x = mime_types_len;
|
||||
|
Reference in New Issue
Block a user