mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
FS-5978 [mod_rayo] attempt to fix direct media join
This commit is contained in:
parent
4a6f26b7fa
commit
b23f4bbafe
@ -2153,7 +2153,7 @@ static iks *join_call(struct rayo_call *call, switch_core_session_t *session, st
|
|||||||
iks *node = msg->payload;
|
iks *node = msg->payload;
|
||||||
iks *response = NULL;
|
iks *response = NULL;
|
||||||
/* take call out of media path if media = "direct" */
|
/* take call out of media path if media = "direct" */
|
||||||
const char *bypass = !strcmp("direct", media) ? "true" : "false";
|
int do_direct = !strcmp("direct", media);
|
||||||
|
|
||||||
/* check if joining to rayo call */
|
/* check if joining to rayo call */
|
||||||
struct rayo_call *b_call = RAYO_CALL_LOCATE(call_uri);
|
struct rayo_call *b_call = RAYO_CALL_LOCATE(call_uri);
|
||||||
@ -2172,8 +2172,10 @@ static iks *join_call(struct rayo_call *call, switch_core_session_t *session, st
|
|||||||
response = iks_new_error_detailed(node, STANZA_ERROR_CONFLICT, "multiple joined calls not supported");
|
response = iks_new_error_detailed(node, STANZA_ERROR_CONFLICT, "multiple joined calls not supported");
|
||||||
} else {
|
} else {
|
||||||
/* bridge this call to call-uri */
|
/* bridge this call to call-uri */
|
||||||
switch_channel_set_variable(switch_core_session_get_channel(session), "bypass_media", bypass);
|
if (do_direct) {
|
||||||
if (switch_false(bypass)) {
|
switch_channel_set_flag(switch_core_session_get_channel(session), CF_BYPASS_MEDIA_AFTER_BRIDGE);
|
||||||
|
} else {
|
||||||
|
switch_channel_clear_flag(switch_core_session_get_channel(session), CF_BYPASS_MEDIA_AFTER_BRIDGE);
|
||||||
switch_channel_pre_answer(switch_core_session_get_channel(session));
|
switch_channel_pre_answer(switch_core_session_get_channel(session));
|
||||||
}
|
}
|
||||||
call->pending_join_request = iks_copy(node);
|
call->pending_join_request = iks_copy(node);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user