diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 247f5b3cea..8aefc29725 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -682,7 +682,12 @@ static switch_status_t parse_command(listener_t * listener, switch_event_t *even strip_cr(cmd); ename = cmd + 9; - if (*ename == '\r' || *ename == '\n') { + + while (ename && *ename == '\t' || *ename == ' ') { + ++ename; + } + + if (ename && (*ename == '\r' || *ename == '\n')) { ename = NULL; }