} else {
sofia_clear_pflag(profile, PFLAG_PASS_CALLEE_ID);
}
+ } else if (!strcasecmp(var, "disable-hold")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_DISABLE_HOLD);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_DISABLE_HOLD);
+ }
} else if (!strcasecmp(var, "sip-trace")) {
if (switch_true(val)) {
sofia_set_flag(profile, TFLAG_TPORT_LOG);
} else {
sofia_clear_pflag(profile, PFLAG_LOG_AUTH_FAIL);
}
+ } else if (!strcasecmp(var, "disable-hold")) {
+ if (switch_true(val)) {
+ sofia_set_pflag(profile, PFLAG_DISABLE_HOLD);
+ } else {
+ sofia_clear_pflag(profile, PFLAG_DISABLE_HOLD);
+ }
} else if (!strcasecmp(var, "dtmf-type")) {
if (!strcasecmp(val, "rfc2833")) {
profile->dtmf_type = DTMF_2833;
}
}
+ if (sofia_test_flag(tech_pvt->profile, PFLAG_DISABLE_HOLD) ||
+ ((val = switch_channel_get_variable(tech_pvt->channel, "sip_disable_hold")) && switch_true(val))) {
+ sendonly = 0;
+ }
+
if (!tech_pvt->hold_laps) {
tech_pvt->hold_laps++;
sofia_glue_toggle_hold(tech_pvt, sendonly);