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.
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
} 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")) {
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);
}
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);