mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
finish up merge
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5380 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -519,7 +519,8 @@ static switch_bool_t tone_detect_callback(switch_media_bug_t *bug, void *user_da
|
||||
if (cont->list[i].up && teletone_multi_tone_detect(&cont->list[i].mt, frame->data, frame->samples)) {
|
||||
switch_event_t *event;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "TONE %s DETECTED\n", cont->list[i].key);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "TONE %s DETECTED\n", cont->list[i].key);
|
||||
cont->list[i].up = 0;
|
||||
|
||||
if (cont->list[i].app) {
|
||||
if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
|
||||
@@ -531,8 +532,6 @@ static switch_bool_t tone_detect_callback(switch_media_bug_t *bug, void *user_da
|
||||
}
|
||||
}
|
||||
|
||||
cont->list[cont->index].up = 0;
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_DETECTED_TONE) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_event_t *dup;
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Detected-Tone", "%s", cont->list[i].key);
|
||||
@@ -641,6 +640,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_tone_detect_session(switch_core_sessi
|
||||
p = next + 1;
|
||||
}
|
||||
} while (next);
|
||||
cont->list[cont->index].map.freqs[i++] = 0;
|
||||
|
||||
if (!ok) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid tone spec!\n");
|
||||
@@ -675,6 +675,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_tone_detect_session(switch_core_sessi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((status = switch_core_media_bug_add(session, tone_detect_callback, cont, timeout, bflags, &cont->bug)) != SWITCH_STATUS_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user