Merge pull request #9 in FS/freeswitch from ~PFOURNIER/freeswitch:feature/fax_enable_tep to master
* commit '0fb179acf2246b896f1a66cfb96da68e9d2675f7': Add new option to request TEP to be used for an outbound fax call
This commit is contained in:
commit
68a8bb7fff
|
@ -508,6 +508,7 @@ switch_status_t load_configuration(switch_bool_t reload)
|
|||
|
||||
|
||||
spandsp_globals.enable_t38 = 1;
|
||||
spandsp_globals.enable_tep = 0;
|
||||
spandsp_globals.total_sessions = 0;
|
||||
spandsp_globals.verbose = 0;
|
||||
spandsp_globals.use_ecm = 1;
|
||||
|
@ -608,6 +609,12 @@ switch_status_t load_configuration(switch_bool_t reload)
|
|||
spandsp_globals.enable_grayscale_to_bilevel = 1;
|
||||
else
|
||||
spandsp_globals.enable_grayscale_to_bilevel = 0;
|
||||
} else if (!strcmp(name, "enable-tep")) {
|
||||
if (switch_true(value)) {
|
||||
spandsp_globals.enable_tep= 1;
|
||||
} else {
|
||||
spandsp_globals.enable_tep = 0;
|
||||
}
|
||||
} else if (!strcmp(name, "enable-t38")) {
|
||||
if (switch_true(value)) {
|
||||
spandsp_globals.enable_t38= 1;
|
||||
|
|
|
@ -60,6 +60,7 @@ struct spandsp_globals {
|
|||
short int use_ecm;
|
||||
short int verbose;
|
||||
short int disable_v17;
|
||||
short int enable_tep;
|
||||
short int enable_colour_fax;
|
||||
short int enable_image_resizing;
|
||||
short int enable_colour_to_bilevel;
|
||||
|
|
|
@ -90,6 +90,7 @@ struct pvt_s {
|
|||
|
||||
int use_ecm;
|
||||
int disable_v17;
|
||||
int enable_tep;
|
||||
int enable_colour_fax;
|
||||
int enable_image_resizing;
|
||||
int enable_colour_to_bilevel;
|
||||
|
@ -835,6 +836,8 @@ static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)
|
|||
t38_gateway_set_supported_modems(pvt->t38_gateway_state, T30_SUPPORT_V17 | T30_SUPPORT_V29 | T30_SUPPORT_V27TER);
|
||||
}
|
||||
|
||||
t38_gateway_set_tep_mode(pvt->t38_gateway_state, pvt->enable_tep);
|
||||
|
||||
t38_gateway_set_ecm_capability(pvt->t38_gateway_state, pvt->use_ecm);
|
||||
switch_channel_set_variable(channel, "fax_ecm_requested", pvt->use_ecm ? "true" : "false");
|
||||
|
||||
|
@ -1233,6 +1236,12 @@ static pvt_t *pvt_init(switch_core_session_t *session, mod_spandsp_fax_applicati
|
|||
pvt->use_ecm = spandsp_globals.use_ecm;
|
||||
}
|
||||
|
||||
if ((tmp = switch_channel_get_variable(channel, "fax_enable_tep"))) {
|
||||
pvt->enable_tep = switch_true(tmp);
|
||||
} else {
|
||||
pvt->enable_tep = spandsp_globals.enable_tep;
|
||||
}
|
||||
|
||||
if ((tmp = switch_channel_get_variable(channel, "fax_disable_v17"))) {
|
||||
pvt->disable_v17 = switch_true(tmp);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue