return SWITCH_STATUS_FALSE;
}
- swift_port_speak_text(cepstral->port, "<break time=\"600ms\"/>", 0, NULL, &cepstral->tts_stream, NULL);
+ swift_port_speak_text(cepstral->port, "<break time=\"400ms\"/>", 0, NULL, &cepstral->tts_stream, NULL);
swift_port_speak_text(cepstral->port, text, 0, NULL, &cepstral->tts_stream, NULL);
}
switch_channel_hangup(channel, cause);
}
+ switch_mutex_lock(tech_pvt->flag_mutex);
+ switch_set_flag(tech_pvt, TFLAG_TERM);
+ switch_set_flag(tech_pvt, TFLAG_BYE);
+ switch_clear_flag(tech_pvt, TFLAG_IO);
+ switch_mutex_unlock(tech_pvt->flag_mutex);
+
*session = NULL;
}
return SWITCH_STATUS_FALSE;
}
+ if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
+ //terminate_session(&session, __LINE__, SWITCH_CAUSE_NORMAL_CLEARING);
+ return SWITCH_STATUS_FALSE;
+ }
+
+
tech_pvt->read_frame.datalen = 0;
switch_set_flag_locked(tech_pvt, TFLAG_READING);
switch_clear_flag_locked(tech_pvt, TFLAG_READING);
- if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
- terminate_session(&session, __LINE__, SWITCH_CAUSE_NORMAL_CLEARING);
- return SWITCH_STATUS_FALSE;
- }
*frame = &tech_pvt->read_frame;
return SWITCH_STATUS_SUCCESS;
if (switch_test_flag(tech_pvt, TFLAG_BYE)) {
- terminate_session(&session, __LINE__, SWITCH_CAUSE_NORMAL_CLEARING);
+ //terminate_session(&session, __LINE__, SWITCH_CAUSE_NORMAL_CLEARING);
return SWITCH_STATUS_FALSE;
}
if (channel) {
switch_channel_state_t state = switch_channel_get_state(channel);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "hungup %s %u %d\n", switch_channel_get_name(channel), state, CS_INIT);
- switch_mutex_lock(tech_pvt->flag_mutex);
- switch_set_flag(tech_pvt, TFLAG_TERM);
- switch_set_flag(tech_pvt, TFLAG_BYE);
- switch_clear_flag(tech_pvt, TFLAG_IO);
- switch_mutex_unlock(tech_pvt->flag_mutex);
terminate_session(&session, __LINE__, SWITCH_CAUSE_NORMAL_CLEARING);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "End Call\n");
goto done;