mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +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_IMMEDIATE = (1 << 6),
|
||||
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;
|
||||
typedef uint32_t switch_media_flag_t;
|
||||
|
||||
|
@ -1451,6 +1451,7 @@ 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);
|
||||
|
||||
if (!msg->numeric_arg) {
|
||||
if (send_invite) {
|
||||
if (!switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
|
||||
switch_channel_set_flag(channel, CF_REQ_MEDIA);
|
||||
@ -1460,6 +1461,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SWITCH_MESSAGE_INDICATE_PHONE_EVENT:
|
||||
|
@ -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(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)) {
|
||||
switch_core_media_clear_rtp_flag(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, SWITCH_RTP_FLAG_AUTOADJ);
|
||||
|
@ -1576,12 +1576,22 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_media(const char *uuid, switch_media_
|
||||
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) {
|
||||
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_core_session_rwunlock(session);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
if ((flags & SMF_REPLYONLY_B)) {
|
||||
msg.numeric_arg = 1;
|
||||
} else {
|
||||
msg.numeric_arg = 0;
|
||||
}
|
||||
|
||||
if ((flags & SMF_IMMEDIATE)) {
|
||||
switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 250, NULL);
|
||||
switch_yield(250000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user