Remove the default settings fax prefix and move it to the FAX server table.

This commit is contained in:
Mark Crane
2015-05-21 03:48:37 +00:00
parent fce5968566
commit 4a67abb23a
4 changed files with 72 additions and 31 deletions
+3 -2
View File
@@ -508,11 +508,12 @@ if (!$included) {
//get some more info to send the fax
$mailfrom_address = (isset($_SESSION['fax']['smtp_from']['var'])) ? $_SESSION['fax']['smtp_from']['var'] : $_SESSION['email']['smtp_from']['var'];
$sql = "select fax_email from v_fax where fax_uuid = '".$fax_uuid."'; ";
$sql = "select * from v_fax where fax_uuid = '".$fax_uuid."'; ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetch(PDO::FETCH_NAMED);
$mailto_address_fax = $result["fax_email"];
$fax_prefix = $result["fax_prefix"];
if (!$included) {
$sql = "select contact_uuid from v_users where user_uuid = '".$_SESSION['user_uuid']."'; ";
@@ -542,7 +543,7 @@ if (!$included) {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
//prepare the fax command
$route_array = outbound_route_to_bridge($_SESSION['domain_uuid'], $_SESSION['fax']['prefix']['text'].$fax_number);
$route_array = outbound_route_to_bridge($_SESSION['domain_uuid'], $fax_prefix.$fax_number);
$fax_file = $dir_fax_temp."/".$fax_instance_uuid.".tif";
if (count($route_array) == 0) {
//send the internal call to the registered extension