summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2017-03-24 16:22:55 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-03-24 16:22:55 -0500
commit90634cc184e3be301e27cb6ff8d081133de73d2d (patch)
tree6fe88002e011cb37a664ee25f92342967a4b5ca6 /main/asterisk.c
parentcd9ca7cf870385f6725efd076f105e826910a0ba (diff)
parent9b103e7bea40c300f89de67cc23c1015fc03db76 (diff)
Merge "rtp_engine: allocate RTP dynamic payloads per session"
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 69183c1f3..68859ab2f 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -339,6 +339,7 @@ unsigned int option_dtmfminduration; /*!< Minimum duration of DTMF. */
#if defined(HAVE_SYSINFO)
long option_minmemfree; /*!< Minimum amount of free system memory - stop accepting calls if free memory falls below this watermark */
#endif
+int ast_option_rtpusedynamic;
unsigned int ast_option_rtpptdynamic;
/*! @} */
@@ -602,6 +603,7 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c
ast_cli(a->fd, " Transmit silence during rec: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) ? "Enabled" : "Disabled");
ast_cli(a->fd, " Generic PLC: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC) ? "Enabled" : "Disabled");
ast_cli(a->fd, " Min DTMF duration:: %u\n", option_dtmfminduration);
+ ast_cli(a->fd, " RTP use dynamic payloads: %u\n", ast_option_rtpusedynamic);
if (ast_option_rtpptdynamic == AST_RTP_PT_LAST_REASSIGN) {
ast_cli(a->fd, " RTP dynamic payload types: %u,%u-%u\n",
@@ -3499,6 +3501,7 @@ static void ast_readconfig(void)
/* Set default value */
option_dtmfminduration = AST_MIN_DTMF_DURATION;
+ ast_option_rtpusedynamic = 1;
ast_option_rtpptdynamic = 35;
/* init with buildtime config */
@@ -3655,6 +3658,8 @@ static void ast_readconfig(void)
if (sscanf(v->value, "%30u", &option_dtmfminduration) != 1) {
option_dtmfminduration = AST_MIN_DTMF_DURATION;
}
+ } else if (!strcasecmp(v->name, "rtp_use_dynamic")) {
+ ast_option_rtpusedynamic = ast_true(v->value);
/* http://www.iana.org/assignments/rtp-parameters
* RTP dynamic payload types start at 96 normally; extend down to 0 */
} else if (!strcasecmp(v->name, "rtp_pt_dynamic")) {