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'][] = "fax";
|
||||
$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]['groups'][] = "superadmin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
|
|
@ -748,6 +753,10 @@
|
|||
$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.";
|
||||
$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]['type'] = "text";
|
||||
$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']['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-gb'] = "Destination";
|
||||
$text['label-fax_destination']['ar-eg'] = "الوجهة";
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@
|
|||
//get the list
|
||||
$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_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), '".$time_format."') as fax_time_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_number', $text['label-fax_caller_id_number'], $order_by, $order, "&id=".$fax_uuid."&box=".$_GET['box']."&page=".$page);
|
||||
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);
|
||||
}
|
||||
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(format_phone($row['fax_caller_id_number']))." </td>\n";
|
||||
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";
|
||||
}
|
||||
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]['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_recipient'] = $fax_recipient;
|
||||
$array['fax_queue'][0]['fax_number'] = $fax_number;
|
||||
$array['fax_queue'][0]['fax_prefix'] = $fax_prefix;
|
||||
$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]['description']['en-us'] = 'Enter the Caller ID number.';
|
||||
$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]['type'] = 'text';
|
||||
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@
|
|||
$fax_date = $row["fax_date"];
|
||||
$fax_caller_id_name = $row["fax_caller_id_name"];
|
||||
$fax_caller_id_number = $row["fax_caller_id_number"];
|
||||
$fax_recipient = $row["fax_recipient"];
|
||||
$fax_prefix = $row["fax_prefix"];
|
||||
$fax_number = $row["fax_number"];
|
||||
$fax_email_address = $row["fax_email_address"];
|
||||
|
|
@ -262,9 +263,9 @@
|
|||
$common_variables .= "domain_name=" . $domain_name . ",";
|
||||
$common_variables .= "origination_caller_id_name='" . escape_quote($fax_caller_id_name) . "',";
|
||||
$common_variables .= "origination_caller_id_number=" . $fax_caller_id_number . ",";
|
||||
$common_variables .= "fax_ident='" . escape_quote($fax_caller_id_number) . "',";
|
||||
$common_variables .= "fax_header='" . escape_quote($fax_caller_id_name) . "',";
|
||||
$common_variables .= "fax_file='" . escape_quote($fax_file) . "',";
|
||||
$common_variables .= "fax_ident='" . escape_quote($fax_caller_id_number) . "',";
|
||||
$common_variables .= "fax_header='" . escape_quote($fax_caller_id_name) . "',";
|
||||
$common_variables .= "fax_file='" . escape_quote($fax_file) . "',";
|
||||
|
||||
//extract fax_dtmf from the fax number
|
||||
fax_split_dtmf($fax_number, $fax_dtmf);
|
||||
|
|
@ -299,13 +300,14 @@
|
|||
//build a list of fax variables
|
||||
$dial_string = $common_variables;
|
||||
$dial_string .= $fax_options.",";
|
||||
$dial_string .= "origination_uuid=" . $origination_uuid. ",";
|
||||
$dial_string .= "fax_uuid=" . $fax_uuid. ",";
|
||||
$dial_string .= "fax_queue_uuid=" . $fax_queue_uuid. ",";
|
||||
$dial_string .= "mailto_address='" . $fax_email_address . "',";
|
||||
$dial_string .= "origination_uuid=" . $origination_uuid . ",";
|
||||
$dial_string .= "fax_uuid=" . $fax_uuid . ",";
|
||||
$dial_string .= "fax_queue_uuid=" . $fax_queue_uuid . ",";
|
||||
$dial_string .= "mailto_address='" . $fax_email_address . "',";
|
||||
$dial_string .= "mailfrom_address='" . $email_from_address . "',";
|
||||
$dial_string .= "fax_retry_attempts=" . $fax_retry_count . ",";
|
||||
$dial_string .= "fax_retry_limit=" . $retry_limit . ",";
|
||||
$dial_string .= "fax_retry_attempts=" . $fax_retry_count . ",";
|
||||
$dial_string .= "fax_retry_limit=" . $retry_limit . ",";
|
||||
$dial_string .= "fax_recipient='" . escape_quote($fax_recipient) . "',";
|
||||
//$dial_string .= "fax_retry_sleep=180,";
|
||||
$dial_string .= "fax_verbose=true,";
|
||||
//$dial_string .= "fax_use_ecm=off,";
|
||||
|
|
@ -618,4 +620,4 @@
|
|||
//echo "Transcript: ".$array['message']."\n";
|
||||
//echo "Body: ".$email_body."\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -139,6 +139,7 @@
|
|||
fax_document_total_pages = env:getHeader("fax_document_total_pages");
|
||||
hangup_cause_q850 = tonumber(env:getHeader("hangup_cause_q850"));
|
||||
fax_file = env:getHeader("fax_file");
|
||||
fax_recipient = env:getHeader("fax_recipient");
|
||||
fax_duration = env:getHeader("billsec");
|
||||
|
||||
--prevent nil errors
|
||||
|
|
@ -160,6 +161,9 @@
|
|||
if (document_root == nil) then
|
||||
document_root = '';
|
||||
end
|
||||
if (fax_recipient == nil) then
|
||||
fax_recipient = 'not set in hangup_tx.lua';
|
||||
end
|
||||
|
||||
--set default values
|
||||
if (not fax_success) then
|
||||
|
|
@ -369,6 +373,7 @@
|
|||
if (caller_id_number ~= nil) then
|
||||
table.insert(sql, "fax_caller_id_number, ");
|
||||
end
|
||||
table.insert(sql, "fax_recipient, ");
|
||||
table.insert(sql, "fax_destination, ");
|
||||
table.insert(sql, "fax_date, ");
|
||||
table.insert(sql, "fax_epoch, ");
|
||||
|
|
@ -390,6 +395,7 @@
|
|||
if (caller_id_number ~= nil) then
|
||||
table.insert(sql, ":caller_id_number, ");
|
||||
end
|
||||
table.insert(sql, ":fax_recipient, ");
|
||||
table.insert(sql, ":fax_destination, ");
|
||||
if (database["type"] == "sqlite") then
|
||||
table.insert(sql, ":fax_date, ");
|
||||
|
|
@ -410,6 +416,7 @@
|
|||
fax_file = fax_file;
|
||||
caller_id_name = fax_caller_id_name;
|
||||
caller_id_number = fax_caller_id_number;
|
||||
fax_recipient = fax_recipient;
|
||||
fax_destination = sip_to_user;
|
||||
fax_base64 = fax_base64;
|
||||
fax_date = os.date("%Y-%m-%d %X");
|
||||
|
|
@ -445,6 +452,7 @@
|
|||
if (caller_id_number ~= nil) then
|
||||
freeswitch.consoleLog("INFO","caller_id_number: " .. fax_caller_id_number .. "\n");
|
||||
end
|
||||
freeswitch.consoleLog("INFO","fax_recipient: " .. fax_recipient .. "\n");
|
||||
freeswitch.consoleLog("INFO","fax_destination: " .. sip_to_user .. "\n");
|
||||
freeswitch.consoleLog("INFO","fax_result_code: ".. fax_result_code .."\n");
|
||||
--freeswitch.consoleLog("INFO","mailfrom_address: ".. from_address .."\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue