switch_core_session_t *u_session = NULL;
char *mycmd = NULL;
int fail = 0;
+ int nochannel = 0;
int argc = 0;
char *argv[5] = { 0 };
int level;
}
if (!(u_session = switch_core_session_locate(argv[0]))) {
- stream->write_function(stream, "-ERR No such channel!\n");
+ nochannel++;
goto done;
}
switch_safe_free(mycmd);
- if (fail) {
+ if (nochannel) {
+ stream->write_function(stream, "-ERR No such channel!\n");
+ } else if (fail) {
stream->write_function(stream, "-USAGE: %s\n", AUDIO_SYNTAX);
} else {
stream->write_function(stream, "+OK\n");