提交 f2099bf9 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-3529 please try this revision I suspect its related to some uninitilized…

FS-3529 please try this revision I suspect its related to some uninitilized memory causing flags to be set that are not in the dtmf structure in certian cases
上级 09a61f50
...@@ -1329,7 +1329,7 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da ...@@ -1329,7 +1329,7 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
if (digit_str[0]) { if (digit_str[0]) {
char *p = digit_str; char *p = digit_str;
while (p && *p) { while (p && *p) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
dtmf.digit = *p; dtmf.digit = *p;
dtmf.duration = switch_core_default_dtmf_duration(0); dtmf.duration = switch_core_default_dtmf_duration(0);
switch_channel_queue_dtmf(channel, &dtmf); switch_channel_queue_dtmf(channel, &dtmf);
......
...@@ -52,7 +52,7 @@ static void spandsp_dtmf_rx_realtime_callback(void *user_data, int code, int lev ...@@ -52,7 +52,7 @@ static void spandsp_dtmf_rx_realtime_callback(void *user_data, int code, int lev
if (digit) { if (digit) {
/* prevent duplicate DTMF */ /* prevent duplicate DTMF */
if (digit != pvt->last_digit || (pvt->samples - pvt->last_digit_end) > pvt->min_dup_digit_spacing) { if (digit != pvt->last_digit || (pvt->samples - pvt->last_digit_end) > pvt->min_dup_digit_spacing) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pvt->session), SWITCH_LOG_DEBUG, "DTMF BEGIN DETECTED: [%c]\n", digit); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(pvt->session), SWITCH_LOG_DEBUG, "DTMF BEGIN DETECTED: [%c]\n", digit);
pvt->last_digit = digit; pvt->last_digit = digit;
dtmf.digit = digit; dtmf.digit = digit;
......
...@@ -928,7 +928,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch ...@@ -928,7 +928,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_t *channel = switch_core_session_get_channel(session);
while (p && *p) { while (p && *p) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
dtmf.digit = *p; dtmf.digit = *p;
dtmf.duration = SWITCH_DEFAULT_DTMF_DURATION; dtmf.duration = SWITCH_DEFAULT_DTMF_DURATION;
switch_channel_queue_dtmf(channel, &dtmf); switch_channel_queue_dtmf(channel, &dtmf);
......
...@@ -943,7 +943,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch ...@@ -943,7 +943,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
if(channel){ if(channel){
while (p && *p) { while (p && *p) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
dtmf.digit = *p; dtmf.digit = *p;
dtmf.duration = SWITCH_DEFAULT_DTMF_DURATION; dtmf.duration = SWITCH_DEFAULT_DTMF_DURATION;
switch_channel_queue_dtmf(channel, &dtmf); switch_channel_queue_dtmf(channel, &dtmf);
......
...@@ -241,7 +241,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session, ...@@ -241,7 +241,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
if (args) { if (args) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
/* /*
dtmf handler function you can hook up to be executed when a digit is dialed during playback dtmf handler function you can hook up to be executed when a digit is dialed during playback
......
...@@ -566,7 +566,7 @@ SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session, swi ...@@ -566,7 +566,7 @@ SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session, swi
switch_ivr_parse_all_events(session); switch_ivr_parse_all_events(session);
if (args && (args->input_callback || args->buf || args->buflen)) { if (args && (args->input_callback || args->buf || args->buflen)) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
/* /*
dtmf handler function you can hook up to be executed when a digit is dialed during playback dtmf handler function you can hook up to be executed when a digit is dialed during playback
...@@ -2154,7 +2154,7 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da ...@@ -2154,7 +2154,7 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
if (digit_str[0]) { if (digit_str[0]) {
char *p = digit_str; char *p = digit_str;
while (p && *p) { while (p && *p) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
dtmf.digit = *p; dtmf.digit = *p;
dtmf.duration = switch_core_default_dtmf_duration(0); dtmf.duration = switch_core_default_dtmf_duration(0);
dtmf.source = SWITCH_DTMF_INBAND_AUDIO; dtmf.source = SWITCH_DTMF_INBAND_AUDIO;
...@@ -3188,7 +3188,7 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj ...@@ -3188,7 +3188,7 @@ static void *SWITCH_THREAD_FUNC speech_thread(switch_thread_t *thread, void *obj
} }
if (is_dtmf(c)) { if (is_dtmf(c)) {
switch_dtmf_t dtmf; switch_dtmf_t dtmf = {0};
dtmf.digit = c; dtmf.digit = c;
dtmf.duration = switch_core_default_dtmf_duration(0); dtmf.duration = switch_core_default_dtmf_duration(0);
dtmf.source = SWITCH_DTMF_INBAND_AUDIO; dtmf.source = SWITCH_DTMF_INBAND_AUDIO;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论