mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 18:13:27 +00:00
Merge branch 'master' into v1.4
This commit is contained in:
commit
f79f6fafbe
@ -460,7 +460,9 @@ typedef enum {
|
|||||||
SMF_HOLD_BLEG = (1 << 5),
|
SMF_HOLD_BLEG = (1 << 5),
|
||||||
SMF_IMMEDIATE = (1 << 6),
|
SMF_IMMEDIATE = (1 << 6),
|
||||||
SMF_EXEC_INLINE = (1 << 7),
|
SMF_EXEC_INLINE = (1 << 7),
|
||||||
SMF_PRIORITY = (1 << 8)
|
SMF_PRIORITY = (1 << 8),
|
||||||
|
SMF_REPLYONLY_A = (1 << 9),
|
||||||
|
SMF_REPLYONLY_B = (1 << 10)
|
||||||
} switch_media_flag_enum_t;
|
} switch_media_flag_enum_t;
|
||||||
typedef uint32_t switch_media_flag_t;
|
typedef uint32_t switch_media_flag_t;
|
||||||
|
|
||||||
|
@ -1451,13 +1451,15 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||||||
|
|
||||||
switch_core_media_gen_local_sdp(session, SDP_TYPE_REQUEST, NULL, 0, NULL, 1);
|
switch_core_media_gen_local_sdp(session, SDP_TYPE_REQUEST, NULL, 0, NULL, 1);
|
||||||
|
|
||||||
if (send_invite) {
|
if (!msg->numeric_arg) {
|
||||||
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
if (send_invite) {
|
||||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||||
|
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||||
|
}
|
||||||
|
sofia_glue_do_invite(session);
|
||||||
|
} else {
|
||||||
|
status = SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
sofia_glue_do_invite(session);
|
|
||||||
} else {
|
|
||||||
status = SWITCH_STATUS_FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -6367,7 +6367,7 @@ void *SWITCH_THREAD_FUNC media_on_hold_thread_run(switch_thread_t *thread, void
|
|||||||
switch_channel_wait_for_flag(channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
|
switch_channel_wait_for_flag(channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
|
||||||
switch_channel_wait_for_flag(other_channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
|
switch_channel_wait_for_flag(other_channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
|
||||||
|
|
||||||
switch_ivr_media(switch_core_session_get_uuid(other_session), SMF_REBRIDGE);
|
switch_ivr_media(switch_core_session_get_uuid(other_session), SMF_REBRIDGE|SMF_REPLYONLY_B);
|
||||||
|
|
||||||
if (switch_core_media_ready(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO)) {
|
if (switch_core_media_ready(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO)) {
|
||||||
switch_core_media_clear_rtp_flag(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_RTP_FLAG_AUTOADJ);
|
switch_core_media_clear_rtp_flag(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_RTP_FLAG_AUTOADJ);
|
||||||
|
@ -1568,13 +1568,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(const char *uuid, switch_media_
|
|||||||
status = SWITCH_STATUS_SUCCESS;
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
||||||
/* If we had early media in bypass mode before, it is no longer relevant */
|
/* If we had early media in bypass mode before, it is no longer relevant */
|
||||||
if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
|
if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) {
|
||||||
switch_core_session_message_t msg2 = { 0 };
|
switch_core_session_message_t msg2 = { 0 };
|
||||||
|
|
||||||
msg2.message_id = SWITCH_MESSAGE_INDICATE_CLEAR_PROGRESS;
|
msg2.message_id = SWITCH_MESSAGE_INDICATE_CLEAR_PROGRESS;
|
||||||
msg2.from = __FILE__;
|
msg2.from = __FILE__;
|
||||||
switch_core_session_receive_message(session, &msg2);
|
switch_core_session_receive_message(session, &msg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((flags & SMF_REPLYONLY_A)) {
|
||||||
|
msg.numeric_arg = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (switch_core_session_receive_message(session, &msg) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_session_receive_message(session, &msg) != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't re-establsh media on %s\n", switch_channel_get_name(channel));
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Can't re-establsh media on %s\n", switch_channel_get_name(channel));
|
||||||
@ -1582,6 +1586,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(const char *uuid, switch_media_
|
|||||||
return SWITCH_STATUS_GENERR;
|
return SWITCH_STATUS_GENERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((flags & SMF_REPLYONLY_B)) {
|
||||||
|
msg.numeric_arg = 1;
|
||||||
|
} else {
|
||||||
|
msg.numeric_arg = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ((flags & SMF_IMMEDIATE)) {
|
if ((flags & SMF_IMMEDIATE)) {
|
||||||
switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 250, NULL);
|
switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 250, NULL);
|
||||||
switch_yield(250000);
|
switch_yield(250000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user