From 0292a04c7c39c7c90c8824df3c4ffcd28ccd312a Mon Sep 17 00:00:00 2001 From: Seven Du Date: Sun, 15 Dec 2013 11:44:30 +0800 Subject: [PATCH] debug all media type --- src/mod/applications/mod_commands/mod_commands.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 7956903c38..8640524149 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -3666,7 +3666,7 @@ SWITCH_STANDARD_API(uuid_video_refresh_function) } -#define DEBUG_MEDIA_SYNTAX " " +#define DEBUG_MEDIA_SYNTAX " " SWITCH_STANDARD_API(uuid_debug_media_function) { char *mycmd = NULL, *argv[3] = { 0 }; @@ -3690,7 +3690,18 @@ SWITCH_STANDARD_API(uuid_debug_media_function) msg.from = __FILE__; if ((lsession = switch_core_session_locate(argv[0]))) { + if (!strcasecmp(argv[1], "all")) { + msg.string_array_arg[0] = "both"; + } + + again: status = switch_core_session_receive_message(lsession, &msg); + + if (status == SWITCH_STATUS_SUCCESS && !strcasecmp(argv[1], "all") && !strcmp(msg.string_array_arg[0], "both")) { + msg.string_array_arg[0] = "vboth"; + goto again; + } + switch_core_session_rwunlock(lsession); } }