mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 04:57:05 +00:00
dtmf overhaul testers wanted
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6952 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
601f7b6e4a
commit
2931fc9109
33 files changed
+475
-313
No files matched your search
+12
-9
@@ -116,17 +116,20 @@ static void *audio_bridge_thread(switch_thread_t * thread, void *obj)
|
||||
}
|
||||
|
||||
/* if 1 channel has DTMF pass it to the other */
|
||||
if (switch_channel_has_dtmf(chan_a)) {
|
||||
char dtmf[128];
|
||||
switch_channel_dequeue_dtmf(chan_a, dtmf, sizeof(dtmf));
|
||||
if (input_callback) {
|
||||
if (input_callback(session_a, dtmf, SWITCH_INPUT_TYPE_DTMF, user_data, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s ended call via DTMF\n", switch_channel_get_name(chan_a));
|
||||
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
|
||||
break;
|
||||
while (switch_channel_has_dtmf(chan_a)) {
|
||||
switch_dtmf_t dtmf = { 0, 0 };
|
||||
if (switch_channel_dequeue_dtmf(chan_a, &dtmf) == SWITCH_STATUS_SUCCESS) {
|
||||
if (input_callback) {
|
||||
if (input_callback(session_a, (void *)&dtmf, SWITCH_INPUT_TYPE_DTMF, user_data, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s ended call via DTMF\n", switch_channel_get_name(chan_a));
|
||||
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch_core_session_send_dtmf(session_b, &dtmf);
|
||||
}
|
||||
switch_core_session_send_dtmf(session_b, dtmf);
|
||||
}
|
||||
|
||||
if (switch_core_session_dequeue_event(session_a, &event) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
Reference in new issue
Block a user