提交 cff54e4f authored 作者: Massimo Cetra's avatar Massimo Cetra

fax_force_caller variable rework



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9469 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 07198a84
...@@ -439,36 +439,42 @@ void process_fax(switch_core_session_t *session, const char *data, application_m ...@@ -439,36 +439,42 @@ void process_fax(switch_core_session_t *session, const char *data, application_m
/* Retrieving our settings from the channel variables */ /* Retrieving our settings from the channel variables */
if ((tmp = switch_channel_get_variable(channel, "fax_use_ecm"))) { if ((tmp = switch_channel_get_variable(channel, "fax_use_ecm"))) {
pvt->use_ecm = switch_true(tmp); pvt->use_ecm = switch_true(tmp);
} else { } else {
pvt->use_ecm = globals.use_ecm; pvt->use_ecm = globals.use_ecm;
} }
if ((tmp = switch_channel_get_variable(channel, "fax_disable_v17"))) { if ((tmp = switch_channel_get_variable(channel, "fax_disable_v17"))) {
pvt->disable_v17 = switch_true(tmp); pvt->disable_v17 = switch_true(tmp);
} else { } else {
pvt->disable_v17 = globals.disable_v17; pvt->disable_v17 = globals.disable_v17;
} }
if ((tmp = switch_channel_get_variable(channel, "fax_verbose"))) { if ((tmp = switch_channel_get_variable(channel, "fax_verbose"))) {
pvt->verbose = switch_true(tmp); pvt->verbose = switch_true(tmp);
} else { } else {
pvt->verbose = globals.verbose; pvt->verbose = globals.verbose;
} }
pvt->caller = switch_true(switch_channel_get_variable(channel, "fax_force_caller")); if ( (tmp=switch_channel_get_variable(channel, "fax_force_caller")) ) {
if ( switch_true(tmp) ) {
pvt->caller = 1;
} else {
pvt->caller = 0;
}
}
if ((tmp = switch_channel_get_variable(channel, "fax_ident"))) { if ((tmp = switch_channel_get_variable(channel, "fax_ident"))) {
pvt->ident = switch_core_session_strdup(session, tmp); pvt->ident = switch_core_session_strdup(session, tmp);
} else { } else {
pvt->ident = switch_core_session_strdup(session, globals.ident); pvt->ident = switch_core_session_strdup(session, globals.ident);
} }
if ((tmp = switch_channel_get_variable(channel, "fax_header"))) { if ((tmp = switch_channel_get_variable(channel, "fax_header"))) {
pvt->header = switch_core_session_strdup(session, tmp); pvt->header = switch_core_session_strdup(session, tmp);
} else { } else {
pvt->header = switch_core_session_strdup(session, globals.header); pvt->header = switch_core_session_strdup(session, globals.header);
} }
if (pvt->app_mode == FUNCTION_TX) { if (pvt->app_mode == FUNCTION_TX) {
...@@ -482,15 +488,15 @@ void process_fax(switch_core_session_t *session, const char *data, application_m ...@@ -482,15 +488,15 @@ void process_fax(switch_core_session_t *session, const char *data, application_m
if (pvt->tx_page_end < -1) { if (pvt->tx_page_end < -1) {
pvt->tx_page_end = -1; pvt->tx_page_end = -1;
} }
if (pvt->tx_page_start < -1) { if (pvt->tx_page_start < -1) {
pvt->tx_page_start = -1; pvt->tx_page_start = -1;
} }
if ((pvt->tx_page_end < pvt->tx_page_start) && (pvt->tx_page_end != -1)) { if ((pvt->tx_page_end < pvt->tx_page_start) && (pvt->tx_page_end != -1)) {
pvt->tx_page_end = pvt->tx_page_start; pvt->tx_page_end = pvt->tx_page_start;
} }
} }
if (!switch_strlen_zero(data)) { if (!switch_strlen_zero(data)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论