diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.c b/src/mod/event_handlers/mod_rayo/mod_rayo.c index 7baaf5f46f..6370d88048 100644 --- a/src/mod/event_handlers/mod_rayo/mod_rayo.c +++ b/src/mod/event_handlers/mod_rayo/mod_rayo.c @@ -3688,7 +3688,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_rayo_load) "" "0123456789*#]]>" ""); - + rayo_add_cmd_alias("output_bad", + ""); return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/event_handlers/mod_rayo/rayo_output_component.c b/src/mod/event_handlers/mod_rayo/rayo_output_component.c index 82fd0aa8b2..f92d994a64 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_output_component.c +++ b/src/mod/event_handlers/mod_rayo/rayo_output_component.c @@ -126,12 +126,19 @@ static iks *start_call_output_component(struct rayo_actor *call, struct rayo_mes switch_core_session_t *session = (switch_core_session_t *)session_data; struct rayo_component *output_component = NULL; iks *output = iks_find(iq, "output"); + iks *document = NULL; /* validate output attributes */ if (!VALIDATE_RAYO_OUTPUT(output)) { return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST); } + /* check if exists */ + document = iks_find(output, "document"); + if (!document) { + return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST); + } + output_component = create_output_component(call, RAT_CALL_COMPONENT, output, iks_find_attrib(iq, "from")); return start_call_output(output_component, session, output, iq); } @@ -144,6 +151,7 @@ static iks *start_mixer_output_component(struct rayo_actor *mixer, struct rayo_m iks *iq = msg->payload; struct rayo_component *component = NULL; iks *output = iks_find(iq, "output"); + iks *document = NULL; switch_stream_handle_t stream = { 0 }; /* validate output attributes */ @@ -151,6 +159,12 @@ static iks *start_mixer_output_component(struct rayo_actor *mixer, struct rayo_m return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST); } + /* check if exists */ + document = iks_find(output, "document"); + if (!document) { + return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST); + } + component = create_output_component(mixer, RAT_MIXER_COMPONENT, output, iks_find_attrib(iq, "from")); /* build conference command */