From 8a87e41e09295b86b426aa9f6092351e89e491dc Mon Sep 17 00:00:00 2001 From: joshebosh Date: Wed, 13 Mar 2019 01:07:04 -0400 Subject: [PATCH] FS-10900 [mod_commands] uuid_recv_dtmf is showing -ERR no reply --- src/mod/applications/mod_commands/mod_commands.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 83a7447733..2cb7d413ad 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -6295,7 +6295,12 @@ SWITCH_STANDARD_API(uuid_send_dtmf_function) return SWITCH_STATUS_SUCCESS; } - switch_core_session_send_dtmf_string(psession, (const char *) dtmf_data); + if (switch_core_session_send_dtmf_string(psession, (const char *) dtmf_data) == SWITCH_STATUS_SUCCESS) { + stream->write_function(stream, "+OK %s sent DTMF %s.\n", uuid, dtmf_data); + } else { + stream->write_function(stream, "-ERR Operation failed\n"); + } + goto done; usage: @@ -6343,7 +6348,12 @@ SWITCH_STANDARD_API(uuid_recv_dtmf_function) return SWITCH_STATUS_SUCCESS; } - switch_channel_queue_dtmf_string(switch_core_session_get_channel(psession), dtmf_data); + if (switch_channel_queue_dtmf_string(switch_core_session_get_channel(psession), dtmf_data) == SWITCH_STATUS_SUCCESS) { + stream->write_function(stream, "+OK %s received DTMF %s.\n", uuid, dtmf_data); + } else { + stream->write_function(stream, "-ERR Operation failed\n"); + } + goto done; usage: