]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10900 [mod_commands] uuid_recv_dtmf is showing -ERR no reply
authorjoshebosh <bitbucket@joshebosh.email>
Wed, 13 Mar 2019 05:07:04 +0000 (01:07 -0400)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Jul 2019 16:03:20 +0000 (20:03 +0400)
src/mod/applications/mod_commands/mod_commands.c

index 83a74477331a26eec89afef0b2fd24b03056b95c..2cb7d413ad1c266ccd94ef0481611c634a5fce73 100644 (file)
@@ -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: