</domains>
<settings>
+
+
+ <!-- inject delay between dtmf digits on send to help some slow interpreters (also per channel with rtp_digit_delay var -->
+ <!-- <param name="rtp-digit-delay" value="40"/>-->
+
<!--
When calls are in no media this will bring them back to media
when you press the hold button.
SWITCH_DECLARE(switch_rtp_stats_t *) switch_rtp_get_stats(switch_rtp_t *rtp_session, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_byte_t) switch_rtp_check_auto_adj(switch_rtp_t *rtp_session);
+SWITCH_DECLARE(void) switch_rtp_set_interdigit_delay(switch_rtp_t *rtp_session, uint32_t delay);
/*!
\}
uint32_t sip_expires_max_deviation;
int ireg_seconds;
sofia_paid_type_t paid_type;
+ uint32_t rtp_digit_delay;
};
struct private_object {
} 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")) {
} 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")) {
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);
uint32_t last_cng_ts;
uint32_t last_write_samplecount;
uint32_t delay_samples;
+ uint32_t next_write_samplecount;
uint32_t max_next_write_samplecount;
uint32_t queue_delay;
switch_time_t last_write_timestamp;
uint32_t sync_packets;
int rtcp_interval;
switch_bool_t rtcp_fresh_frame;
+
+ switch_time_t send_time;
+ switch_byte_t auto_adj_used;
+ uint8_t pause_jb;
+ uint16_t last_seq;
+ switch_time_t last_read_time;
+ switch_size_t last_flush_packet_count;
+ uint32_t interdigit_delay;
+
#ifdef ENABLE_ZRTP
zrtp_session_t *zrtp_session;
zrtp_profile_t *zrtp_profile;
int zinit;
#endif
- switch_time_t send_time;
- switch_byte_t auto_adj_used;
- uint8_t pause_jb;
- uint16_t last_seq;
- switch_time_t last_read_time;
- switch_size_t last_flush_packet_count;
+
};
struct switch_rtcp_senderinfo {
return;
}
+SWITCH_DECLARE(void) switch_rtp_set_interdigit_delay(switch_rtp_t *rtp_session, uint32_t delay)
+{
+ rtp_session->interdigit_delay = delay;
+}
+
SWITCH_DECLARE(switch_socket_t *) switch_rtp_get_rtp_socket(switch_rtp_t *rtp_session)
{
return rtp_session->sock_input;
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)) {
rtp_session->max_next_write_samplecount = rtp_session->timer.samplecount + max_upsamp;
+ rtp_session->next_write_samplecount = rtp_session->timer.samplecount + upsamp;
}
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Queue digit delay of %dms\n", ms);
}
rtp_session->dtmf_data.out_digit_dur = 0;
- set_dtmf_delay(rtp_session, 40, 500);
+
+ if (rtp_session->interdigit_delay) {
+ set_dtmf_delay(rtp_session, rtp_session->interdigit_delay, rtp_session->interdigit_delay * 10);
+ }
+
return;
}
}
void *pop;
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER)) {
- if (rtp_session->timer.samplecount < rtp_session->max_next_write_samplecount) {
+ if (rtp_session->timer.samplecount < rtp_session->next_write_samplecount) {
return;
}