FS-6667 #comment block sending audio when dmachine is reading

This commit is contained in:
Anthony Minessale 2014-08-06 01:21:34 +05:00
parent 52ed525b97
commit b2162142f3
4 changed files with 16 additions and 0 deletions

View File

@ -958,6 +958,7 @@ SWITCH_DECLARE(switch_bool_t) switch_ivr_uuid_force_exists(const char *uuid);
SWITCH_DECLARE(switch_bool_t) switch_ivr_dmachine_is_parsing(switch_ivr_dmachine_t *dmachine);
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_last_ping(switch_ivr_dmachine_t *dmachine);
SWITCH_DECLARE(const char *) switch_ivr_dmachine_get_name(switch_ivr_dmachine_t *dmachine);
SWITCH_DECLARE(void) switch_ivr_dmachine_set_match_callback(switch_ivr_dmachine_t *dmachine, switch_ivr_dmachine_callback_t match_callback);

View File

@ -2929,6 +2929,7 @@ SWITCH_DECLARE(void) switch_core_session_set_ice(switch_core_session_t *session)
switch_channel_set_flag(session->channel, CF_ICE);
smh->mparams->rtcp_audio_interval_msec = "10000";
smh->mparams->rtcp_video_interval_msec = "10000";
}
#define MAX_MATCHES 30
@ -5092,6 +5093,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
if ((val = switch_channel_get_variable(session->channel, "rtp_manual_rtp_bugs"))) {
switch_core_media_parse_rtp_bugs(&a_engine->rtp_bugs, val);
}
if (switch_channel_test_flag(session->channel, CF_WEBRTC)) {
smh->mparams->manual_rtp_bugs = RTP_BUG_SEND_LINEAR_TIMESTAMPS;
}
switch_rtp_intentional_bugs(a_engine->rtp_session, a_engine->rtp_bugs | smh->mparams->manual_rtp_bugs);

View File

@ -615,6 +615,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_feed(switch_ivr_dmachine_t *
return status;
}
SWITCH_DECLARE(switch_bool_t) switch_ivr_dmachine_is_parsing(switch_ivr_dmachine_t *dmachine)
{
return !!dmachine->cur_digit_len;
}
SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_clear(switch_ivr_dmachine_t *dmachine)
{

View File

@ -1680,6 +1680,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_change_sln_volume(write_frame.data, write_frame.datalen / 2, fh->vol);
}
/* write silence while dmachine is in reading state */
if (args && args->dmachine && switch_ivr_dmachine_is_parsing(args->dmachine)) {
memset(write_frame.data, 0, write_frame.datalen);
}
status = switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
if (timeout_samples) {