Add. Send reply message after fax task done.
This commit is contained in:
@@ -236,7 +236,7 @@ if(!function_exists('tiff2pdf')) {
|
||||
}
|
||||
|
||||
if(!function_exists('fax_enqueue')) {
|
||||
function fax_enqueue($fax_uuid, $fax_file, $wav_file, $fax_uri, $fax_dtmf, $dial_string){
|
||||
function fax_enqueue($fax_uuid, $fax_file, $wav_file, $reply_address, $fax_uri, $fax_dtmf, $dial_string){
|
||||
global $db, $db_type;
|
||||
|
||||
$fax_task_uuid = uuid();
|
||||
@@ -256,12 +256,12 @@ INSERT INTO v_fax_tasks( fax_task_uuid, fax_uuid,
|
||||
task_next_time, task_lock_time,
|
||||
task_fax_file, task_wav_file, task_uri, task_dial_string, task_dtmf,
|
||||
task_interrupted, task_status, task_no_answer_counter, task_no_answer_retry_counter, task_retry_counter,
|
||||
task_description)
|
||||
task_reply_address, task_description)
|
||||
VALUES (?, ?,
|
||||
$date_utc_now_sql, NULL,
|
||||
?, ?, ?, ?, ?,
|
||||
'false', 0, 0, 0, 0,
|
||||
?);
|
||||
?, ?);
|
||||
HERE;
|
||||
$stmt = $db->prepare($sql);
|
||||
$i = 0;
|
||||
@@ -272,6 +272,7 @@ HERE;
|
||||
$stmt->bindValue(++$i, $fax_uri);
|
||||
$stmt->bindValue(++$i, $dial_string);
|
||||
$stmt->bindValue(++$i, $fax_dtmf);
|
||||
$stmt->bindValue(++$i, $reply_address);
|
||||
$stmt->bindValue(++$i, $description);
|
||||
if ($stmt->execute()) {
|
||||
$response = 'Enqueued';
|
||||
@@ -479,8 +480,6 @@ if(!function_exists('fax_split_dtmf')) {
|
||||
$common_dial_string .= "sip_h_X-accountcode='" . $fax_accountcode . "',";
|
||||
$common_dial_string .= "domain_uuid=" . $_SESSION["domain_uuid"] . ",";
|
||||
$common_dial_string .= "domain_name=" . $_SESSION["domain_name"] . ",";
|
||||
$common_dial_string .= "mailto_address='" . $mailto_address . "',";
|
||||
$common_dial_string .= "mailfrom_address='" . $mailfrom_address . "',";
|
||||
$common_dial_string .= "origination_caller_id_name='" . $fax_caller_id_name . "',";
|
||||
$common_dial_string .= "origination_caller_id_number='" . $fax_caller_id_number . "',";
|
||||
$common_dial_string .= "fax_ident='" . $fax_caller_id_number . "',";
|
||||
@@ -489,6 +488,8 @@ if(!function_exists('fax_split_dtmf')) {
|
||||
|
||||
if ($fax_send_mode != 'queue') {
|
||||
$dial_string .= $t38;
|
||||
$dial_string .= "mailto_address='" . $mailto_address . "',";
|
||||
$dial_string .= "mailfrom_address='" . $mailfrom_address . "',";
|
||||
$dial_string .= "fax_uri=" . $fax_uri . ",";
|
||||
$dial_string .= "fax_retry_attempts=1" . ",";
|
||||
$dial_string .= "fax_retry_limit=20" . ",";
|
||||
@@ -533,7 +534,7 @@ if(!function_exists('fax_split_dtmf')) {
|
||||
}
|
||||
else{
|
||||
$wav_file = '';
|
||||
$response = fax_enqueue($fax_uuid, $fax_file, $wav_file, $fax_uri, $fax_dtmf, $dial_string);
|
||||
$response = fax_enqueue($fax_uuid, $fax_file, $wav_file, $mailto_address, $fax_uri, $fax_dtmf, $dial_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user