mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
FS-4122
This commit is contained in:
parent
b453c2fdfc
commit
845639025c
@ -2957,7 +2957,7 @@ 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")) {
|
||||
} else if (!strcasecmp(var, "rtp-digit-delay")) {
|
||||
int delay = val ? atoi(val) : 0;
|
||||
|
||||
if (delay < 0) delay = 0;
|
||||
@ -3747,6 +3747,7 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
switch_thread_rwlock_create(&profile->rwlock, profile->pool);
|
||||
switch_mutex_init(&profile->flag_mutex, SWITCH_MUTEX_NESTED, profile->pool);
|
||||
profile->dtmf_duration = 100;
|
||||
profile->rtp_digit_delay = 40;
|
||||
profile->sip_force_expires = 0;
|
||||
profile->sip_expires_max_deviation = 0;
|
||||
profile->tls_version = 0;
|
||||
@ -3845,13 +3846,12 @@ 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;
|
||||
|
||||
} else if (!strcasecmp(var, "rtp-digit-delay")) {
|
||||
int delay = atoi(val);
|
||||
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")) {
|
||||
|
@ -2310,11 +2310,6 @@ static void do_2833(switch_rtp_t *rtp_session, switch_core_session_t *session)
|
||||
switch_frame_flag_t flags = 0;
|
||||
uint32_t samples = rtp_session->samples_per_interval;
|
||||
|
||||
if (rtp_session->sending_dtmf > 1) {
|
||||
rtp_session->sending_dtmf--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!rtp_session->last_write_ts) {
|
||||
return;
|
||||
}
|
||||
@ -2409,8 +2404,7 @@ static void do_2833(switch_rtp_t *rtp_session, switch_core_session_t *session)
|
||||
|
||||
|
||||
if (!rtp_session->sending_dtmf) {
|
||||
rtp_session->sending_dtmf = 2;
|
||||
return;
|
||||
rtp_session->sending_dtmf = 1;
|
||||
}
|
||||
|
||||
if (switch_queue_trypop(rtp_session->dtmf_data.dtmf_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
@ -2983,7 +2977,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
|
||||
do_2833(rtp_session, session);
|
||||
|
||||
if (rtp_session->dtmf_data.out_digit_dur > 0 || rtp_session->dtmf_data.in_digit_sanity || rtp_session->sending_dtmf > 0 ||
|
||||
if (rtp_session->dtmf_data.out_digit_dur > 0 || rtp_session->dtmf_data.in_digit_sanity || rtp_session->sending_dtmf ||
|
||||
switch_queue_size(rtp_session->dtmf_data.dtmf_queue) || switch_queue_size(rtp_session->dtmf_data.dtmf_inqueue)) {
|
||||
pt = 20000;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user