mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
FS-4122 --resolve this fixes the issue and eliminates the delay unless you configure it to have some
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user