Fax - Sent: Added Recipient column, if allowed.
This commit is contained in:
parent
7cd6aec9df
commit
e4aa30bcd6
|
|
@ -93,6 +93,11 @@
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "fax";
|
$apps[$x]['permissions'][$y]['groups'][] = "fax";
|
||||||
$y++;
|
$y++;
|
||||||
|
$apps[$x]['permissions'][$y]['name'] = "fax_sent_recipient";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
$apps[$x]['permissions'][$y]['groups'][] = "fax";
|
||||||
|
$y++;
|
||||||
$apps[$x]['permissions'][$y]['name'] = "fax_sent_delete";
|
$apps[$x]['permissions'][$y]['name'] = "fax_sent_delete";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||||
|
|
@ -748,6 +753,10 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "rx / tx - Rx means receive and Tx means transmit.";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "rx / tx - Rx means receive and Tx means transmit.";
|
||||||
$z++;
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_recipient";
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||||
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_destination";
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_destination";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "tx - fax transmission";
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "tx - fax transmission";
|
||||||
|
|
|
||||||
|
|
@ -1512,6 +1512,33 @@ $text['label-fax_document_total_pages']['zh-cn'] = "文档总页数";
|
||||||
$text['label-fax_document_total_pages']['ja-jp'] = "ドキュメントの総ページ数";
|
$text['label-fax_document_total_pages']['ja-jp'] = "ドキュメントの総ページ数";
|
||||||
$text['label-fax_document_total_pages']['ko-kr'] = "문서 총 페이지";
|
$text['label-fax_document_total_pages']['ko-kr'] = "문서 총 페이지";
|
||||||
|
|
||||||
|
$text['label-fax_recipient']['en-us'] = "Recipient";
|
||||||
|
$text['label-fax_recipient']['en-gb'] = "Recipient";
|
||||||
|
$text['label-fax_recipient']['ar-eg'] = "متلقي";
|
||||||
|
$text['label-fax_recipient']['de-at'] = "Empfänger";
|
||||||
|
$text['label-fax_recipient']['de-ch'] = "Empfänger";
|
||||||
|
$text['label-fax_recipient']['de-de'] = "Empfänger";
|
||||||
|
$text['label-fax_recipient']['el-gr'] = "Παραλήπτης";
|
||||||
|
$text['label-fax_recipient']['es-cl'] = "Beneficiario";
|
||||||
|
$text['label-fax_recipient']['es-mx'] = "Beneficiario";
|
||||||
|
$text['label-fax_recipient']['fr-ca'] = "Destinataire";
|
||||||
|
$text['label-fax_recipient']['fr-fr'] = "Destinataire";
|
||||||
|
$text['label-fax_recipient']['he-il'] = "מְקַבֵּל";
|
||||||
|
$text['label-fax_recipient']['it-it'] = "Destinatario";
|
||||||
|
$text['label-fax_recipient']['ka-ge'] = "მიმღები";
|
||||||
|
$text['label-fax_recipient']['nl-nl'] = "Ontvanger";
|
||||||
|
$text['label-fax_recipient']['pl-pl'] = "Odbiorca";
|
||||||
|
$text['label-fax_recipient']['pt-br'] = "Recebedor";
|
||||||
|
$text['label-fax_recipient']['pt-pt'] = "Destinatário";
|
||||||
|
$text['label-fax_recipient']['ro-ro'] = "Destinatar";
|
||||||
|
$text['label-fax_recipient']['ru-ru'] = "Получатель";
|
||||||
|
$text['label-fax_recipient']['sv-se'] = "Mottagare";
|
||||||
|
$text['label-fax_recipient']['uk-ua'] = "одержувач";
|
||||||
|
$text['label-fax_recipient']['tr-tr'] = "Alıcı";
|
||||||
|
$text['label-fax_recipient']['zh-cn'] = "接受者";
|
||||||
|
$text['label-fax_recipient']['ja-jp'] = "受取人";
|
||||||
|
$text['label-fax_recipient']['ko-kr'] = "받는 사람";
|
||||||
|
|
||||||
$text['label-fax_destination']['en-us'] = "Destination";
|
$text['label-fax_destination']['en-us'] = "Destination";
|
||||||
$text['label-fax_destination']['en-gb'] = "Destination";
|
$text['label-fax_destination']['en-gb'] = "Destination";
|
||||||
$text['label-fax_destination']['ar-eg'] = "الوجهة";
|
$text['label-fax_destination']['ar-eg'] = "الوجهة";
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@
|
||||||
//get the list
|
//get the list
|
||||||
$sql = "select domain_uuid, fax_file_uuid, fax_uuid, fax_mode, \n";
|
$sql = "select domain_uuid, fax_file_uuid, fax_uuid, fax_mode, \n";
|
||||||
$sql .= "fax_destination, fax_file_type, fax_file_path, fax_caller_id_name, \n";
|
$sql .= "fax_destination, fax_file_type, fax_file_path, fax_caller_id_name, \n";
|
||||||
$sql .= "fax_caller_id_number, fax_epoch, fax_base64, fax_date, \n";
|
$sql .= "fax_caller_id_number, fax_recipient, fax_epoch, fax_base64, fax_date, \n";
|
||||||
$sql .= "to_char(timezone(:time_zone, fax_date), 'DD Mon YYYY') as fax_date_formatted, \n";
|
$sql .= "to_char(timezone(:time_zone, fax_date), 'DD Mon YYYY') as fax_date_formatted, \n";
|
||||||
$sql .= "to_char(timezone(:time_zone, fax_date), '".$time_format."') as fax_time_formatted, \n";
|
$sql .= "to_char(timezone(:time_zone, fax_date), '".$time_format."') as fax_time_formatted, \n";
|
||||||
$sql .= "to_char(timezone(:time_zone, read_date), 'YYYY-MM-DD') as read_date_formatted \n";
|
$sql .= "to_char(timezone(:time_zone, read_date), 'YYYY-MM-DD') as read_date_formatted \n";
|
||||||
|
|
@ -405,6 +405,9 @@
|
||||||
echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
||||||
echo th_order_by('fax_caller_id_number', $text['label-fax_caller_id_number'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
echo th_order_by('fax_caller_id_number', $text['label-fax_caller_id_number'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
|
if (permission_exists('fax_sent_recipient')) {
|
||||||
|
echo th_order_by('fax_recipient', $text['label-fax_recipient'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
||||||
|
}
|
||||||
echo th_order_by('fax_destination', $text['label-fax_destination'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
echo th_order_by('fax_destination', $text['label-fax_destination'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
||||||
}
|
}
|
||||||
if (permission_exists('fax_download_view')) {
|
if (permission_exists('fax_download_view')) {
|
||||||
|
|
@ -527,6 +530,9 @@
|
||||||
echo " <td style='".$bold."'>".escape($row['fax_caller_id_name'])." </td>\n";
|
echo " <td style='".$bold."'>".escape($row['fax_caller_id_name'])." </td>\n";
|
||||||
echo " <td style='".$bold."'>".escape(format_phone($row['fax_caller_id_number']))." </td>\n";
|
echo " <td style='".$bold."'>".escape(format_phone($row['fax_caller_id_number']))." </td>\n";
|
||||||
if ($_REQUEST['box'] == 'sent') {
|
if ($_REQUEST['box'] == 'sent') {
|
||||||
|
if (permission_exists('fax_sent_recipient')) {
|
||||||
|
echo " <td>".escape($row['fax_recipient'])." </td>\n";
|
||||||
|
}
|
||||||
echo " <td>".escape(format_phone($row['fax_destination']))." </td>\n";
|
echo " <td>".escape(format_phone($row['fax_destination']))." </td>\n";
|
||||||
}
|
}
|
||||||
if (permission_exists('fax_download_view')) {
|
if (permission_exists('fax_download_view')) {
|
||||||
|
|
|
||||||
|
|
@ -797,6 +797,7 @@ if (!function_exists('fax_split_dtmf')) {
|
||||||
$array['fax_queue'][0]['hostname'] = gethostname();
|
$array['fax_queue'][0]['hostname'] = gethostname();
|
||||||
$array['fax_queue'][0]['fax_caller_id_name'] = $fax_caller_id_name;
|
$array['fax_queue'][0]['fax_caller_id_name'] = $fax_caller_id_name;
|
||||||
$array['fax_queue'][0]['fax_caller_id_number'] = $fax_caller_id_number;
|
$array['fax_queue'][0]['fax_caller_id_number'] = $fax_caller_id_number;
|
||||||
|
$array['fax_queue'][0]['fax_recipient'] = $fax_recipient;
|
||||||
$array['fax_queue'][0]['fax_number'] = $fax_number;
|
$array['fax_queue'][0]['fax_number'] = $fax_number;
|
||||||
$array['fax_queue'][0]['fax_prefix'] = $fax_prefix;
|
$array['fax_queue'][0]['fax_prefix'] = $fax_prefix;
|
||||||
$array['fax_queue'][0]['fax_email_address'] = $mail_to_address;
|
$array['fax_queue'][0]['fax_email_address'] = $mail_to_address;
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,11 @@
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
|
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the Caller ID number.';
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the Caller ID number.';
|
||||||
$z++;
|
$z++;
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_recipient';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
|
||||||
|
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the fax recipipent.';
|
||||||
|
$z++;
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_number';
|
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'fax_number';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
|
||||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
|
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,7 @@
|
||||||
$fax_date = $row["fax_date"];
|
$fax_date = $row["fax_date"];
|
||||||
$fax_caller_id_name = $row["fax_caller_id_name"];
|
$fax_caller_id_name = $row["fax_caller_id_name"];
|
||||||
$fax_caller_id_number = $row["fax_caller_id_number"];
|
$fax_caller_id_number = $row["fax_caller_id_number"];
|
||||||
|
$fax_recipient = $row["fax_recipient"];
|
||||||
$fax_prefix = $row["fax_prefix"];
|
$fax_prefix = $row["fax_prefix"];
|
||||||
$fax_number = $row["fax_number"];
|
$fax_number = $row["fax_number"];
|
||||||
$fax_email_address = $row["fax_email_address"];
|
$fax_email_address = $row["fax_email_address"];
|
||||||
|
|
@ -306,6 +307,7 @@
|
||||||
$dial_string .= "mailfrom_address='" . $email_from_address . "',";
|
$dial_string .= "mailfrom_address='" . $email_from_address . "',";
|
||||||
$dial_string .= "fax_retry_attempts=" . $fax_retry_count . ",";
|
$dial_string .= "fax_retry_attempts=" . $fax_retry_count . ",";
|
||||||
$dial_string .= "fax_retry_limit=" . $retry_limit . ",";
|
$dial_string .= "fax_retry_limit=" . $retry_limit . ",";
|
||||||
|
$dial_string .= "fax_recipient='" . escape_quote($fax_recipient) . "',";
|
||||||
//$dial_string .= "fax_retry_sleep=180,";
|
//$dial_string .= "fax_retry_sleep=180,";
|
||||||
$dial_string .= "fax_verbose=true,";
|
$dial_string .= "fax_verbose=true,";
|
||||||
//$dial_string .= "fax_use_ecm=off,";
|
//$dial_string .= "fax_use_ecm=off,";
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@
|
||||||
fax_document_total_pages = env:getHeader("fax_document_total_pages");
|
fax_document_total_pages = env:getHeader("fax_document_total_pages");
|
||||||
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
||||||
fax_file = env:getHeader("fax_file");
|
fax_file = env:getHeader("fax_file");
|
||||||
|
fax_recipient = env:getHeader("fax_recipient");
|
||||||
fax_duration = env:getHeader("billsec");
|
fax_duration = env:getHeader("billsec");
|
||||||
|
|
||||||
--prevent nil errors
|
--prevent nil errors
|
||||||
|
|
@ -160,6 +161,9 @@
|
||||||
if (document_root == nil) then
|
if (document_root == nil) then
|
||||||
document_root = '';
|
document_root = '';
|
||||||
end
|
end
|
||||||
|
if (fax_recipient == nil) then
|
||||||
|
fax_recipient = 'not set in hangup_tx.lua';
|
||||||
|
end
|
||||||
|
|
||||||
--set default values
|
--set default values
|
||||||
if (not fax_success) then
|
if (not fax_success) then
|
||||||
|
|
@ -369,6 +373,7 @@
|
||||||
if (caller_id_number ~= nil) then
|
if (caller_id_number ~= nil) then
|
||||||
table.insert(sql, "fax_caller_id_number, ");
|
table.insert(sql, "fax_caller_id_number, ");
|
||||||
end
|
end
|
||||||
|
table.insert(sql, "fax_recipient, ");
|
||||||
table.insert(sql, "fax_destination, ");
|
table.insert(sql, "fax_destination, ");
|
||||||
table.insert(sql, "fax_date, ");
|
table.insert(sql, "fax_date, ");
|
||||||
table.insert(sql, "fax_epoch, ");
|
table.insert(sql, "fax_epoch, ");
|
||||||
|
|
@ -390,6 +395,7 @@
|
||||||
if (caller_id_number ~= nil) then
|
if (caller_id_number ~= nil) then
|
||||||
table.insert(sql, ":caller_id_number, ");
|
table.insert(sql, ":caller_id_number, ");
|
||||||
end
|
end
|
||||||
|
table.insert(sql, ":fax_recipient, ");
|
||||||
table.insert(sql, ":fax_destination, ");
|
table.insert(sql, ":fax_destination, ");
|
||||||
if (database["type"] == "sqlite") then
|
if (database["type"] == "sqlite") then
|
||||||
table.insert(sql, ":fax_date, ");
|
table.insert(sql, ":fax_date, ");
|
||||||
|
|
@ -410,6 +416,7 @@
|
||||||
fax_file = fax_file;
|
fax_file = fax_file;
|
||||||
caller_id_name = fax_caller_id_name;
|
caller_id_name = fax_caller_id_name;
|
||||||
caller_id_number = fax_caller_id_number;
|
caller_id_number = fax_caller_id_number;
|
||||||
|
fax_recipient = fax_recipient;
|
||||||
fax_destination = sip_to_user;
|
fax_destination = sip_to_user;
|
||||||
fax_base64 = fax_base64;
|
fax_base64 = fax_base64;
|
||||||
fax_date = os.date("%Y-%m-%d %X");
|
fax_date = os.date("%Y-%m-%d %X");
|
||||||
|
|
@ -445,6 +452,7 @@
|
||||||
if (caller_id_number ~= nil) then
|
if (caller_id_number ~= nil) then
|
||||||
freeswitch.consoleLog("INFO","caller_id_number: " .. fax_caller_id_number .. "\n");
|
freeswitch.consoleLog("INFO","caller_id_number: " .. fax_caller_id_number .. "\n");
|
||||||
end
|
end
|
||||||
|
freeswitch.consoleLog("INFO","fax_recipient: " .. fax_recipient .. "\n");
|
||||||
freeswitch.consoleLog("INFO","fax_destination: " .. sip_to_user .. "\n");
|
freeswitch.consoleLog("INFO","fax_destination: " .. sip_to_user .. "\n");
|
||||||
freeswitch.consoleLog("INFO","fax_result_code: ".. fax_result_code .."\n");
|
freeswitch.consoleLog("INFO","fax_result_code: ".. fax_result_code .."\n");
|
||||||
--freeswitch.consoleLog("INFO","mailfrom_address: ".. from_address .."\n");
|
--freeswitch.consoleLog("INFO","mailfrom_address: ".. from_address .."\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue