1 && Day < 7) {\n"; $ivrconditionjs .= " return true;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= " else {\n"; $ivrconditionjs .= " return false;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "function isweekend( Day ) {\n"; $ivrconditionjs .= " if (Day > 1 && Day < 7) {\n"; $ivrconditionjs .= " return false;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= " else {\n"; $ivrconditionjs .= " return true;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "function isofficehours( Hours ) {\n"; $ivrconditionjs .= " if (Hours >= 9 && Hours < 17) {\n"; $ivrconditionjs .= " return true;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= " else {\n"; $ivrconditionjs .= " return false;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "function isafterhours( Hours ) {\n"; $ivrconditionjs .= " if (Hours >= 9 && Hours < 17) {\n"; $ivrconditionjs .= " return false;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= " else {\n"; $ivrconditionjs .= " return true;\n"; $ivrconditionjs .= " }\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "//set default\n"; $ivrconditionjs .= "condition = true;\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "//Holiday?\n"; $ivrconditionjs .= "if (isholiday( Month, Date )) {\n"; $ivrconditionjs .= " console_log( \"info\", \"holiday\\n\" );\n"; $ivrconditionjs .= " condition = false;\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "//Weekend?\n"; $ivrconditionjs .= "if (isweekend( Day )) {\n"; $ivrconditionjs .= " console_log( \"info\", \"weekend\\n\" );\n"; $ivrconditionjs .= " condition = false;\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; $ivrconditionjs .= "// After Hours?\n"; $ivrconditionjs .= "if (isafterhours( Hours )) {\n"; $ivrconditionjs .= " console_log( \"info\", \"after hours\\n\" );\n"; $ivrconditionjs .= " condition = false;\n"; $ivrconditionjs .= "}\n"; $ivrconditionjs .= "\n"; if (isset($id) && $a_ivr[$id]) { $pconfig['ivrid'] = $a_ivr[$id]['ivrid']; $ivrid = $a_ivr[$id]['ivrid']; $pconfig['ivrextension'] = $a_ivr[$id]['ivrextension']; $pconfig['ivrname'] = $a_ivr[$id]['ivrname']; $pconfig['recordingidaction'] = $a_ivr[$id]['recordingidaction']; $pconfig['recordingidantiaction'] = $a_ivr[$id]['recordingidantiaction']; $pconfig['ivrtimeout'] = $a_ivr[$id]['ivrtimeout']; $pconfig['ivrcalltimeout'] = $a_ivr[$id]['ivrcalltimeout']; $pconfig['ivrcontext'] = $a_ivr[$id]['ivrcontext']; $pconfig['ivrdirectdial'] = $a_ivr[$id]['ivrdirectdial']; $pconfig['ivrringback'] = $a_ivr[$id]['ivrringback']; $pconfig['ivrcidnameprefix'] = $a_ivr[$id]['ivrcidnameprefix']; $pconfig['ivrconditionjs'] = ($a_ivr[$id]['ivrconditionjs']); $pconfig['ivrdescr'] = $a_ivr[$id]['ivrdescr']; } if ($_POST) { unset($input_errors); $pconfig = $_POST; if ($_GET['act'] == "del") { if ($_GET['type'] == 'options') { if ($a_ivroptions[$_GET['optionid']]) { unset($a_ivr_options[$_GET['optionid']]); write_config(); sync_package_v_ivr(); header("Location: v_auto_attendant_edit.php?id=".$_GET['id']); exit; } } } if (!$input_errors) { $ivrent = array(); if (strlen($_POST['ivrid']) > 0) { $ivrent['ivrid'] = $_POST['ivrid']; } else { $ivrent['ivrid'] = guid(); } $ivrent['ivrextension'] = $_POST['ivrextension']; $ivrent['ivrname'] = $_POST['ivrname']; $ivrent['recordingidaction'] = $_POST['recordingidaction']; $ivrent['recordingidantiaction'] = $_POST['recordingidantiaction']; $ivrent['ivrtimeout'] = $_POST['ivrtimeout']; $ivrent['ivrcalltimeout'] = $_POST['ivrcalltimeout']; $ivrent['ivrcontext'] = $_POST['ivrcontext']; $ivrent['ivrdirectdial'] = $_POST['ivrdirectdial']; $ivrent['ivrringback'] = $_POST['ivrringback']; $ivrent['ivrcidnameprefix'] = $_POST['ivrcidnameprefix']; $ivrent['ivrconditionjs'] = base64_encode($_POST['ivrconditionjs']); $ivrent['ivrdescr'] = $_POST['ivrdescr']; if (isset($id) && $a_ivr[$id]) { //update $a_ivr[$id] = $ivrent; } else { //add $a_ivr[] = $ivrent; } //touch($d_hostsdirty_path); write_config(); sync_package_v_ivr(); header("Location: v_auto_attendant.php"); exit; } } include("head.inc"); ?> $v_label: Auto Attendant: Edit

\n"; } if ($input_errors) print_input_errors($input_errors); ?>

Settings:
Auto Attendant general settings.


Extension
e.g. 5002
IVR Name
Recording Action \n"; echo " \n"; if (count($a_recordings) > 0) { foreach ($a_recordings as $ent) { if (htmlspecialchars($pconfig['recordingidaction']) == $ent['recordingid']) { echo " \n"; } else { echo " \n"; } } } echo " \n"; ?>
Recording Anti-Action \n"; echo " \n"; if (count($a_recordings) > 0) { foreach ($a_recordings as $ent) { if (htmlspecialchars($pconfig['recordingidantiaction']) == $ent['recordingid']) { echo " \n"; } else { echo " \n"; } } } echo " \n"; ?>
IVR Timeout
After the recording concludes the timeout sets the time in seconds to continue to wait for DTMF. If the DTMF is
not detected during that time the 't' timeout option is executed.
Call Timeout
Call timeout is the time in seconds to ring the destination. After this time is exceeded calls to extensions will be sent to voicemail. default: 30 seconds
Context
e.g. default
Direct Dial \n"; echo " \n"; if (strlen($pconfig['ivrdirectdial']) == 0) { //set default echo " \n"; echo " \n"; } else { if (htmlspecialchars($pconfig['ivrdirectdial']) == "true") { echo " \n"; } else { echo " \n"; } if (htmlspecialchars($pconfig['ivrdirectdial']) == "false") { echo " \n"; } else { echo " \n"; } } echo " \n"; ?>
Allows callers to dial directly to extensions and feature codes that are up to 5 digits in length.
Ring Back \n"; echo " \n"; if (htmlspecialchars($pconfig['ivrringback']) == "ring") { echo " \n"; } else { echo " \n"; } if (htmlspecialchars($pconfig['ivrringback']) == "music") { echo " \n"; } else { echo " \n"; } echo " \n"; ?>
Defines what the caller will hear while destination is being called. The choices are music (music on hold) ring (ring tone.) default: music
CID Prefix
Set a prefix on the caller ID name. (optional)
Description
You may enter a description here for your reference (not parsed).
Javascript Condition ".$ivrconditionjs."\n"; } else { echo "\n"; } ?>
A simple valid condition is: condition=true; To re-populate the default simply empty the textarea and click on save. The following javascript variables have been defined: Hours, Mins, Seconds, Month, Date, Year, and Day.
 


"; //print_r ($a_ivr); //echo ""; //if ($savemsg) print_info_box($savemsg); //if (file_exists($d_hostsdirty_path)): echo"

"; //print_info_box_np("The FreeSWITCH recordings have been changed.
You must apply the changes in order for them to take effect."); //echo"
"; //endif; ?>


Options are the choices that are available to the caller when they are calling the auto attendant. If the caller presses 2 then the call is directed to the corresponding destination.

Action
The options that are executed when the condition matches.


0) { foreach ($a_ivr_options as $ent) { if ($ent['optionaction'] == "action" && $ivrid == $ent['ivrid']) { ?>
Option Type Profile Destination Description
1) { ?>
       
1) { ?>

"; //print_r ($a_ivr); //echo ""; //if ($savemsg) print_info_box($savemsg); //if (file_exists($d_hostsdirty_path)): echo"

"; //print_info_box_np("The FreeSWITCH recordings have been changed.
You must apply the changes in order for them to take effect."); //echo"
"; //endif; ?>

Anti-Action
The options that are executed when the condition does NOT match.


0) { foreach ($a_ivr_options as $ent) { if ($ent['optionaction'] == "anti-action" && $ivrid == $ent['ivrid']) { ?>
Option Type Profile Destination Description
1) { ?>
       
1) { ?>