mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update the api_hangup_hook for the fax dialplan.
This commit is contained in:
@@ -387,55 +387,53 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$dialplan_detail_group = '';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="system" data="$switch_scripts_dir/emailfax.sh USER DOMAIN {$_SESSION['switch']['scripts']['dir']}/fax/inbox/9872/${last_fax}.tif"/>
|
||||
//<action application="set" data="fax_uuid="/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = "api_hangup_hook=system '".PHP_BINDIR."/".$php_bin."' '".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/fax_to_email.php' ";
|
||||
$dialplan_detail_data .= "email=".$fax_email." ";
|
||||
$dialplan_detail_data .= "extension=".$fax_extension." ";
|
||||
$dialplan_detail_data .= "name=".$fax_prefix."\\\\\\\${last_fax} ";
|
||||
$dialplan_detail_data .= "messages='result: \\\\\\\${fax_result_text} sender:\\\\\\\${fax_remote_station_id} pages:\\\\\\\${fax_document_total_pages}' ";
|
||||
$dialplan_detail_data .= "domain=".$_SESSION['domain_name']." ";
|
||||
$dialplan_detail_data .= "caller_id_name='\\\\\\\${caller_id_name}' ";
|
||||
$dialplan_detail_data .= "caller_id_number=\\\\\\\${caller_id_number} ";
|
||||
$dialplan_detail_data .= "fax_relay=true ";
|
||||
|
||||
$dialplan_detail_data = 'fax_uuid='.$fax_uuid;
|
||||
$dialplan_detail_order = '010';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="system" data="$switch_scripts_dir/emailfax.sh USER DOMAIN {$_SESSION['switch']['scripts']['dir']}/fax/inbox/9872/${last_fax}.tif"/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, anti-action
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = "api_hangup_hook=lua app/fax/resources/scripts/hangup_rx.lua";
|
||||
$dialplan_detail_order = '020';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="answer" />
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'answer';
|
||||
$dialplan_detail_data = '';
|
||||
$dialplan_detail_order = '010';
|
||||
$dialplan_detail_order = '030';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="set" data="fax_enable_t38=true"/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fax_enable_t38=true';
|
||||
$dialplan_detail_order = '015';
|
||||
$dialplan_detail_order = '040';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="set" data="fax_enable_t38_request=true"/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'fax_enable_t38_request=true';
|
||||
$dialplan_detail_order = '020';
|
||||
$dialplan_detail_order = '050';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="set" data="last_fax=${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)}"/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = 'last_fax=${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)}';
|
||||
$dialplan_detail_order = '025';
|
||||
$dialplan_detail_order = '060';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="playback" data="silence_stream://2000"/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'playback';
|
||||
$dialplan_detail_data = 'silence_stream://2000';
|
||||
$dialplan_detail_order = '030';
|
||||
$dialplan_detail_order = '070';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="rxfax" data="$switch_storage_dir/fax/inbox/${last_fax}.tif"/>
|
||||
@@ -447,14 +445,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
else {
|
||||
$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$fax_extension.'/inbox/'.$fax_prefix.'${last_fax}.tif';
|
||||
}
|
||||
$dialplan_detail_order = '035';
|
||||
$dialplan_detail_order = '080';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
|
||||
//<action application="hangup"/>
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'hangup';
|
||||
$dialplan_detail_data = '';
|
||||
$dialplan_detail_order = '040';
|
||||
$dialplan_detail_order = '090';
|
||||
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
|
||||
}
|
||||
if ($dialplan_type == "update") {
|
||||
@@ -500,15 +498,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//update dialplan detail action
|
||||
$dialplan_detail_tag = 'action'; //condition, action, antiaction
|
||||
$dialplan_detail_type = 'set';
|
||||
$dialplan_detail_data = "api_hangup_hook=system '".PHP_BINDIR."/".$php_bin."' '".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/secure/fax_to_email.php' ";
|
||||
$dialplan_detail_data .= "email=".$fax_email." ";
|
||||
$dialplan_detail_data .= "extension=".$fax_extension." ";
|
||||
$dialplan_detail_data .= "name=".$fax_prefix."\\\\\\\${last_fax} ";
|
||||
$dialplan_detail_data .= "messages='result: \\\\\\\${fax_result_text} sender:\\\\\\\${fax_remote_station_id} pages:\\\\\\\${fax_document_total_pages}' ";
|
||||
$dialplan_detail_data .= "domain=".$_SESSION['domain_name']." ";
|
||||
$dialplan_detail_data .= "caller_id_name='\\\\\\\${caller_id_name}' ";
|
||||
$dialplan_detail_data .= "caller_id_number=\\\\\\\${caller_id_number} ";
|
||||
$dialplan_detail_data .= "fax_relay=true ";
|
||||
$dialplan_detail_data = "api_hangup_hook=lua app/fax/resources/scripts/hangup_rx.lua";
|
||||
$sql = "update v_dialplan_details set ";
|
||||
$sql .= "dialplan_detail_data = '".check_str($dialplan_detail_data)."' ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
|
||||
Reference in New Issue
Block a user