From 7ccc368017533ea47ba728ad7a84215b149944ed Mon Sep 17 00:00:00 2001 From: mcrane Date: Tue, 28 Jul 2009 07:07:15 -0600 Subject: FreeSWITCH package finish package file rename. --- config/freeswitch_dev/v_fax.tmp | 305 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 config/freeswitch_dev/v_fax.tmp (limited to 'config/freeswitch_dev/v_fax.tmp') diff --git a/config/freeswitch_dev/v_fax.tmp b/config/freeswitch_dev/v_fax.tmp new file mode 100644 index 00000000..dac3f209 --- /dev/null +++ b/config/freeswitch_dev/v_fax.tmp @@ -0,0 +1,305 @@ + 0) { + $i=0; + foreach($a_dialplan_includes as $row) { + if ($row["dialplanincludeid"] == $faxid) { + $order = $row['order']; + unset($a_dialplan_includes[$i]); + } + $i++; + } + } + + //delete the dialplan include details. aka. child data + if (count($a_dialplan_includes_details) > 0) { + $i=0; + foreach($a_dialplan_includes_details as $row) { + if ($row["dialplanincludeid"] == $faxid) { + unset($a_dialplan_includes_details[$i]); + } + $i++; + } + } + + if (file_exists("/usr/local/freeswitch/conf/dialplan/default/".$order."_".$faxname.".xml")){ + unlink("/usr/local/freeswitch/conf/dialplan/default/".$order."_".$faxname.".xml"); + } + + //remove fax entries + unset($a_fax[$_GET['id']]); + + write_config(); + header("Location: v_fax.php"); + exit; + } + } +} + +if ($_GET['a'] == "download") { + + session_cache_limiter('public'); + + if ($_GET['type'] = "fax_file") { + if (file_exists($dir_fax.$_GET['filename'])) { + $fd = fopen($dir_fax.$_GET['filename'], "rb"); + if ($_GET['t'] == "bin") { + header("Content-Type: application/force-download"); + header("Content-Type: application/octet-stream"); + header("Content-Type: application/download"); + header("Content-Description: File Transfer"); + header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"'); + } + else { + $file_ext = substr($_GET['filename'], -3); + if ($file_ext == "png") { + header("Content-Type: image/png"); + } + } + header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 + header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past + header("Content-Length: " . filesize($dir_fax.$_GET['filename'])); + fpassthru($fd); + } + } + + exit; +} +else { + //echo $dir_fax.$_GET['filename']; +} + + +if ($_GET['act'] == "del") { + if ($_GET['type'] == 'fax_file') { + //if ($a_fax[$_GET['id']]) { + $tmp_file_array = split("\.",$_GET['filename']); + $file_name = $tmp_file_array[0]; + $file_ext = $tmp_file_array[1]; + unlink_if_exists($dir_fax.$file_name.".pdf"); + unlink_if_exists($dir_fax.$file_name.".png"); + unlink_if_exists($dir_fax.$file_name.".tif"); + //unset($a_fax[$_GET['id']]); + write_config(); + header("Location: v_fax.php"); + exit; + //} + } + +} + +include("head.inc"); + +?> + + + + +$v_project_label: FAX

\n"; +?> + +
+ + +
+ +
+ + + + + +
+ +
+"; +//print_info_box_np("The FreeSWITCH fax have been changed.
You must apply the changes in order for them to take effect."); +//echo"
"; +//endif; + +?> + + + + +

FAX
+
+ To receive a FAX setup a fax extension and then direct the incoming FAX with a dedicated number or you can detect the FAX tone by using tone detection on the Public tab. +

+
+ + + + + + + + + + + + + 0) { + foreach ($a_fax as $ent) { + $a_fax[$i]['id'] = $i; + $i++; + } + } + + //order the array + function cmp_number($a, $b) { + if ($a["faxextension"] > $b["faxextension"]) { + return 1; + } + else { + return 0; + } + } + if (count($a_fax) > 0) { usort($a_fax, "cmp_number"); } + + $i = 0; + if (count($a_fax) > 0) { + + foreach ($a_fax as $ent) { + if (strlen($ent['faxextension']) > 0) { + ?> + + + + + + + + + + + + + + + + + + + + +
ExtensionNameEmailDomainDescription + + + + + + +
+ +
+   + +   + +   + +   + +   + + + + + + +
+
+ + + + + +
+
+ +
+ + +
+
+
+
+ + +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3