FS-3757 --resolve

This commit is contained in:
Anthony Minessale 2011-12-13 08:43:49 -06:00
parent 0596f2a621
commit d4232e548f
3 changed files with 17 additions and 0 deletions

View File

@ -334,6 +334,7 @@ switch_status_t load_configuration(switch_bool_t reload)
spandsp_globals.spool = switch_core_strdup(spandsp_globals.config_pool, "/tmp"); spandsp_globals.spool = switch_core_strdup(spandsp_globals.config_pool, "/tmp");
spandsp_globals.ident = "SpanDSP Fax Ident"; spandsp_globals.ident = "SpanDSP Fax Ident";
spandsp_globals.header = "SpanDSP Fax Header"; spandsp_globals.header = "SpanDSP Fax Header";
spandsp_globals.timezone = "";
/* TODO make configuration param */ /* TODO make configuration param */
spandsp_globals.tonedebug = 1; spandsp_globals.tonedebug = 1;

View File

@ -62,6 +62,7 @@ struct spandsp_globals {
short int enable_t38_insist; short int enable_t38_insist;
char *ident; char *ident;
char *header; char *header;
char *timezone;
char *prepend_string; char *prepend_string;
char *spool; char *spool;
switch_thread_cond_t *cond; switch_thread_cond_t *cond;

View File

@ -83,6 +83,7 @@ struct pvt_s {
char *filename; char *filename;
char *ident; char *ident;
char *header; char *header;
char *timezone;
int use_ecm; int use_ecm;
int disable_v17; int disable_v17;
@ -830,6 +831,8 @@ static switch_status_t spanfax_init(pvt_t *pvt, transport_mode_t trans_mode)
/* All the things which are common to audio and T.38 FAX setup */ /* All the things which are common to audio and T.38 FAX setup */
t30_set_tx_ident(t30, pvt->ident); t30_set_tx_ident(t30, pvt->ident);
t30_set_tx_page_header_info(t30, pvt->header); t30_set_tx_page_header_info(t30, pvt->header);
if (pvt->timezone && pvt->timezone[0])
t30_set_tx_page_header_tz(t30, pvt->timezone);
t30_set_phase_e_handler(t30, phase_e_handler, pvt); t30_set_phase_e_handler(t30, phase_e_handler, pvt);
t30_set_phase_d_handler(t30, phase_d_handler, pvt); t30_set_phase_d_handler(t30, phase_d_handler, pvt);
@ -1206,6 +1209,18 @@ static pvt_t *pvt_init(switch_core_session_t *session, mod_spandsp_fax_applicati
pvt->header = switch_core_session_strdup(session, spandsp_globals.header); pvt->header = switch_core_session_strdup(session, spandsp_globals.header);
} }
if ((tmp = switch_channel_get_variable(channel, "fax_timezone"))) {
char *data = NULL;
data = strdup(tmp);
switch_url_decode(data);
pvt->timezone = switch_core_session_strdup(session, data);
switch_safe_free(data);
} else {
pvt->timezone = switch_core_session_strdup(session, spandsp_globals.timezone);
}
if (pvt->app_mode == FUNCTION_TX) { if (pvt->app_mode == FUNCTION_TX) {
if ((tmp = switch_channel_get_variable(channel, "fax_start_page"))) { if ((tmp = switch_channel_get_variable(channel, "fax_start_page"))) {
pvt->tx_page_start = atoi(tmp); pvt->tx_page_start = atoi(tmp);