FS-6186 --resolve
This commit is contained in:
parent
6dca277ed1
commit
3ecb504fda
|
@ -37,6 +37,10 @@
|
|||
when you press the hold button.
|
||||
-->
|
||||
<!--<param name="media-option" value="resume-media-on-hold"/> -->
|
||||
|
||||
<!-- bypass again when hold is complete -->
|
||||
<!-- <param ame="media-option" value="bypass-media-after-hold"/> -->
|
||||
|
||||
<!--
|
||||
This will allow a call after an attended transfer go back to
|
||||
bypass media after an attended transfer.
|
||||
|
|
|
@ -1399,6 +1399,7 @@ typedef enum {
|
|||
CF_SLA_INTERCEPT,
|
||||
CF_VIDEO_BREAK,
|
||||
CF_MEDIA_PAUSE,
|
||||
CF_BYPASS_MEDIA_AFTER_HOLD,
|
||||
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
|
||||
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
|
||||
CF_FLAG_MAX
|
||||
|
|
|
@ -319,6 +319,7 @@ typedef enum {
|
|||
TFLAG_CAPTURE,
|
||||
TFLAG_REINVITED,
|
||||
TFLAG_PASS_ACK,
|
||||
TFLAG_BYPASS_MEDIA_AFTER_HOLD,
|
||||
/* No new flags below this line */
|
||||
TFLAG_MAX
|
||||
} TFLAGS;
|
||||
|
|
|
@ -4306,6 +4306,13 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
|
|||
} else if (!strcasecmp(val, "bypass-media-after-att-xfer")) {
|
||||
profile->media_options |= MEDIA_OPT_BYPASS_AFTER_ATT_XFER;
|
||||
}
|
||||
} else if (!strcasecmp(var, "bypass-media-after-hold") && switch_true(val)) {
|
||||
if(profile->media_options & MEDIA_OPT_MEDIA_ON_HOLD) {
|
||||
sofia_set_flag(profile, TFLAG_BYPASS_MEDIA_AFTER_HOLD);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
|
||||
"bypass-media-after-hold can be set only with resume-media-on-hold media-option\n");
|
||||
}
|
||||
} else if (!strcasecmp(var, "pnp-provision-url")) {
|
||||
profile->pnp_prov_url = switch_core_strdup(profile->pool, val);
|
||||
} else if (!strcasecmp(var, "manage-presence")) {
|
||||
|
@ -8541,6 +8548,10 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
|||
switch_channel_set_flag(channel, CF_PROXY_MODE);
|
||||
}
|
||||
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_BYPASS_MEDIA_AFTER_HOLD)) {
|
||||
switch_channel_set_flag(channel, CF_BYPASS_MEDIA_AFTER_HOLD);
|
||||
}
|
||||
|
||||
if (sofia_test_flag(tech_pvt, TFLAG_PROXY_MEDIA)) {
|
||||
switch_channel_set_flag(channel, CF_PROXY_MEDIA);
|
||||
}
|
||||
|
|
|
@ -3755,6 +3755,12 @@ SWITCH_DECLARE(int) switch_core_media_toggle_hold(switch_core_session_t *session
|
|||
|
||||
switch_yield(250000);
|
||||
|
||||
if (b_channel && (switch_channel_test_flag(session->channel, CF_BYPASS_MEDIA_AFTER_HOLD) ||
|
||||
switch_channel_test_flag(b_channel, CF_BYPASS_MEDIA_AFTER_HOLD))) {
|
||||
/* try to stay out from media stream */
|
||||
switch_ivr_nomedia(switch_core_session_get_uuid(session), SMF_REBRIDGE);
|
||||
}
|
||||
|
||||
if (a_engine->max_missed_packets && a_engine->rtp_session) {
|
||||
switch_rtp_reset_media_timer(a_engine->rtp_session);
|
||||
switch_rtp_set_max_missed_packets(a_engine->rtp_session, a_engine->max_missed_packets);
|
||||
|
|
Loading…
Reference in New Issue