summaryrefslogtreecommitdiff
path: root/res/ari/resource_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/ari/resource_events.c')
-rw-r--r--res/ari/resource_events.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/ari/resource_events.c b/res/ari/resource_events.c
index 71d54b494..535ce70ee 100644
--- a/res/ari/resource_events.c
+++ b/res/ari/resource_events.c
@@ -139,6 +139,15 @@ static void app_handler(void *data, const char *app_name,
ao2_lock(session);
if (session->ws_session) {
+ if (stasis_app_get_debug_by_name(app_name)) {
+ char *str = ast_json_dump_string_format(message, ast_ari_json_format());
+
+ ast_verbose("<--- Sending ARI event to %s --->\n%s\n",
+ ast_sockaddr_stringify(ast_ari_websocket_session_get_remote_addr(session->ws_session)),
+ str);
+ ast_json_free(str);
+ }
+
ast_ari_websocket_session_write(session->ws_session, message);
}
ao2_unlock(session);