提交 3a24486f authored 作者: Anthony Minessale's avatar Anthony Minessale

add rtp-autofix-timing (defauts to true even when not present) set to false to disable it

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12903 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 5103ce79
...@@ -716,7 +716,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f ...@@ -716,7 +716,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
} }
if (tech_pvt->check_frames++ < MAX_CODEC_CHECK_FRAMES) { if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFIX_TIMING) && tech_pvt->check_frames++ < MAX_CODEC_CHECK_FRAMES) {
if (!tech_pvt->read_impl.encoded_bytes_per_packet) { if (!tech_pvt->read_impl.encoded_bytes_per_packet) {
tech_pvt->check_frames = MAX_CODEC_CHECK_FRAMES; tech_pvt->check_frames = MAX_CODEC_CHECK_FRAMES;
goto skip; goto skip;
......
...@@ -183,6 +183,7 @@ typedef enum { ...@@ -183,6 +183,7 @@ typedef enum {
PFLAG_DISABLE_NAPTR, PFLAG_DISABLE_NAPTR,
PFLAG_AUTOFLUSH, PFLAG_AUTOFLUSH,
PFLAG_NAT_OPTIONS_PING, PFLAG_NAT_OPTIONS_PING,
PFLAG_AUTOFIX_TIMING,
/* No new flags below this line */ /* No new flags below this line */
PFLAG_MAX PFLAG_MAX
} PFLAGS; } PFLAGS;
......
...@@ -1680,6 +1680,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile) ...@@ -1680,6 +1680,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
} else { } else {
sofia_clear_pflag(profile, PFLAG_AUTOFLUSH); sofia_clear_pflag(profile, PFLAG_AUTOFLUSH);
} }
} else if (!strcasecmp(var, "rtp-autofix-timing")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_AUTOFIX_TIMING);
} else {
sofia_clear_pflag(profile, PFLAG_AUTOFIX_TIMING);
}
} else if (!strcasecmp(var, "nat-options-ping")) { } else if (!strcasecmp(var, "nat-options-ping")) {
if (switch_true(val)) { if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_NAT_OPTIONS_PING); sofia_set_pflag(profile, PFLAG_NAT_OPTIONS_PING);
...@@ -1947,6 +1953,7 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -1947,6 +1953,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
sofia_set_pflag(profile, PFLAG_STUN_ENABLED); sofia_set_pflag(profile, PFLAG_STUN_ENABLED);
sofia_set_pflag(profile, PFLAG_DISABLE_100REL); sofia_set_pflag(profile, PFLAG_DISABLE_100REL);
profile->auto_restart = 1; profile->auto_restart = 1;
sofia_set_pflag(profile, PFLAG_AUTOFIX_TIMING);
for (param = switch_xml_child(settings, "param"); param; param = param->next) { for (param = switch_xml_child(settings, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name"); char *var = (char *) switch_xml_attr_soft(param, "name");
...@@ -2218,6 +2225,12 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -2218,6 +2225,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
} else { } else {
sofia_clear_pflag(profile, PFLAG_AUTOFLUSH); sofia_clear_pflag(profile, PFLAG_AUTOFLUSH);
} }
} else if (!strcasecmp(var, "rtp-autofix-timing")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_AUTOFIX_TIMING);
} else {
sofia_clear_pflag(profile, PFLAG_AUTOFIX_TIMING);
}
} else if (!strcasecmp(var, "nat-options-ping")) { } else if (!strcasecmp(var, "nat-options-ping")) {
if (switch_true(val)) { if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_NAT_OPTIONS_PING); sofia_set_pflag(profile, PFLAG_NAT_OPTIONS_PING);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论