[Freeswitch-svn] [commit] r9469 - freeswitch/trunk/src/mod/applications/mod_fax

Freeswitch SVN ctrix at freeswitch.org
Fri Sep 5 16:49:23 EDT 2008


Author: ctrix
Date: Fri Sep  5 16:49:23 2008
New Revision: 9469

Modified:
   freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c

Log:
fax_force_caller variable rework



Modified: freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_fax/mod_fax.c	Fri Sep  5 16:49:23 2008
@@ -439,36 +439,42 @@
 	/* Retrieving our settings from the channel variables */
 
 	if ((tmp = switch_channel_get_variable(channel, "fax_use_ecm"))) {
-        pvt->use_ecm = switch_true(tmp);
+		pvt->use_ecm = switch_true(tmp);
 	} else {
 		pvt->use_ecm = globals.use_ecm;
-    }
+	}
 
 	if ((tmp = switch_channel_get_variable(channel, "fax_disable_v17"))) {
-        pvt->disable_v17 = switch_true(tmp);
+		pvt->disable_v17 = switch_true(tmp);
 	} else {
 		pvt->disable_v17 = globals.disable_v17;
-    }
+	}
 
 	if ((tmp = switch_channel_get_variable(channel, "fax_verbose"))) {
-        pvt->verbose = switch_true(tmp);
+		pvt->verbose = switch_true(tmp);
 	} else {
 		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"))) {
 		pvt->ident = switch_core_session_strdup(session, tmp);
 	} else {
 		pvt->ident = switch_core_session_strdup(session, globals.ident);
-    }
+	}
 
 	if ((tmp = switch_channel_get_variable(channel, "fax_header"))) {
 		pvt->header = switch_core_session_strdup(session, tmp);
 	} else {
 		pvt->header = switch_core_session_strdup(session, globals.header);
-    }
+	}
 
 	if (pvt->app_mode == FUNCTION_TX) {
 
@@ -482,15 +488,15 @@
 
 		if (pvt->tx_page_end < -1) {
 			pvt->tx_page_end = -1;
-        }
+		}
 
 		if (pvt->tx_page_start < -1) {
 			pvt->tx_page_start = -1;
-        }
+		}
 
 		if ((pvt->tx_page_end < pvt->tx_page_start) && (pvt->tx_page_end != -1)) {
 			pvt->tx_page_end = pvt->tx_page_start;
-        }
+		}
 	}
 
 	if (!switch_strlen_zero(data)) {



More information about the Freeswitch-svn mailing list