int pass = sofia_test_pflag(tech_pvt->profile, PFLAG_T38_PASSTHRU);
if (var) {
- pass = switch_true(var);
+ if (!(pass = switch_true(var))) {
+ if (!strcasecmp(var, "once")) {
+ pass = 2;
+ }
+ }
}
- /* can't remember if this is necessary but its causing a bug so i'll leave this comment here to remind me
- if (sofia_test_flag(tech_pvt, TFLAG_T38_PASSTHRU)) {
+
+ if (pass == 2 && sofia_test_flag(tech_pvt, TFLAG_T38_PASSTHRU)) {
pass = 0;
}
- */
+
if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) ||
switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA) || !switch_rtp_ready(tech_pvt->rtp_session)) {