FS-4122 --resolve this fixes the issue and eliminates the delay unless you configure it to have some

This commit is contained in:
Anthony Minessale
2012-04-18 09:55:58 -05:00
parent 6ea05d25f7
commit 677b223579
6 changed files with 58 additions and 8 deletions
+1
View File
@@ -668,6 +668,7 @@ struct sofia_profile {
uint32_t sip_expires_max_deviation;
int ireg_seconds;
sofia_paid_type_t paid_type;
uint32_t rtp_digit_delay;
};
struct private_object {
+13
View File
@@ -2957,6 +2957,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
} else {
sofia_clear_pflag(profile, PFLAG_PASS_CALLEE_ID);
}
} else if (!strcasecmp(var, "rtp-digit-timeout")) {
int delay = val ? atoi(val) : 0;
if (delay < 0) delay = 0;
profile->rtp_digit_delay = (uint32_t) delay;
} else if (!strcasecmp(var, "watchdog-enabled")) {
profile->watchdog_enabled = switch_true(val);
} else if (!strcasecmp(var, "watchdog-step-timeout")) {
@@ -3839,6 +3845,13 @@ switch_status_t config_sofia(int reload, char *profile_name)
} else {
sofia_clear_pflag(profile, PFLAG_LIBERAL_DTMF);
}
} else if (!strcasecmp(var, "rtp-digit-timeout")) {
int delay = val ? atoi(val) : 0;
if (delay < 0) delay = 0;
profile->rtp_digit_delay = (uint32_t) delay;
} else if (!strcasecmp(var, "watchdog-enabled")) {
profile->watchdog_enabled = switch_true(val);
} else if (!strcasecmp(var, "watchdog-step-timeout")) {
+15
View File
@@ -3532,6 +3532,21 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
tech_pvt->cng_pt = 0;
}
if (tech_pvt->profile->rtp_digit_delay || ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_digit_delay")))) {
uint32_t delay = tech_pvt->profile->rtp_digit_delay;
if (!delay) {
int delayi = atoi(val);
if (delayi < 0) delayi = 0;
delay = (uint32_t) delay;
}
switch_rtp_set_interdigit_delay(tech_pvt->rtp_session, delay);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
"%s Set rtp dtmf delay to %u\n", switch_channel_get_name(tech_pvt->channel), delay);
}
if (tech_pvt->cng_pt && !sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Set comfort noise payload to %u\n", tech_pvt->cng_pt);
switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);