Add accountcode, domain_name and domain_uuid for fax forward.

This commit is contained in:
markjcrane 2015-07-30 19:07:16 -06:00
parent 22b8649fa3
commit b2595d4713
1 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -124,7 +124,7 @@ if (defined('STDIN')) {
echo "fax_extension $fax_extension\n";
echo "fax_name $fax_file_only\n";
//get the fax details from the database
//get the domain_uuid from the database
$sql = "select * from v_domains ";
$sql .= "where domain_name = '".$domain_name."' ";
$prep_statement = $db->prepare($sql);
@ -145,11 +145,11 @@ if (defined('STDIN')) {
foreach ($result as &$row) {
//set database fields as variables
//$fax_email = $row["fax_email"];
$fax_accountcode = $row["fax_accountcode"];
$fax_pin_number = $row["fax_pin_number"];
$fax_caller_id_name = $row["fax_caller_id_name"];
$fax_caller_id_number = $row["fax_caller_id_number"];
$fax_forward_number = $row["fax_forward_number"];
//$fax_user_list = $row["fax_user_list"];
$fax_description = $row["fax_description"];
$fax_email_inbound_subject_tag = $row['fax_email_inbound_subject_tag'];
}
@ -260,7 +260,7 @@ if (defined('STDIN')) {
$fax_uri = $route_array[0];
$t38 = "fax_enable_t38=true,fax_enable_t38_request=true";
}
$cmd = "api originate {mailto_address='".$mailto_address."',mailfrom_address='".$mailfrom_address."',origination_caller_id_name='".$fax_caller_id_name."',origination_caller_id_number=".$fax_caller_id_number.",fax_uri=".$fax_uri.",fax_file='".$fax_file."',fax_retry_attempts=1,fax_retry_limit=20,fax_retry_sleep=180,fax_verbose=true,fax_use_ecm=off,".$t38.",api_hangup_hook='lua fax_retry.lua'}".$fax_uri." &txfax('".$fax_file."')";
$cmd = "api originate {absolute_codec_string='PCMU,PCMA',accountcode='".$fax_accountcode."',sip_h_X-accountcode='".$fax_accountcode."',domain_uuid=".$_SESSION["domain_uuid"].",domain_name=".$_SESSION["domain_name"].",mailto_address='".$mailto_address."',mailfrom_address='".$mailfrom_address."',origination_caller_id_name='".$fax_caller_id_name."',origination_caller_id_number=".$fax_caller_id_number.",fax_uri=".$fax_uri.",fax_file='".$fax_file."',fax_retry_attempts=1,fax_retry_limit=20,fax_retry_sleep=180,fax_verbose=true,fax_use_ecm=off,".$t38.",api_hangup_hook='lua fax_retry.lua'}".$fax_uri." &txfax('".$fax_file."')";
//send info to the log
echo "fax forward\n";
echo $cmd."\n";