Merge branch 'master' into fax_queue
This commit is contained in:
commit
b07e88c1df
|
|
@ -129,48 +129,47 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
|
||||
//get and then set the complete agent_contact with the call_timeout and when necessary confirm
|
||||
//if you change this variable, also change resources/switch.php
|
||||
$tmp_confirm = "group_confirm_file=custom/press_1_to_accept_this_call.wav,group_confirm_key=1,group_confirm_read_timeout=2000,leg_timeout=".$agent_call_timeout;
|
||||
$confirm = "group_confirm_file=custom/press_1_to_accept_this_call.wav,group_confirm_key=1,group_confirm_read_timeout=2000,leg_timeout=".$agent_call_timeout;
|
||||
if(strstr($agent_contact, '}') === FALSE) {
|
||||
//not found
|
||||
if(stristr($agent_contact, 'sofia/gateway') === FALSE) {
|
||||
//add the call_timeout
|
||||
$tmp_agent_contact = "{call_timeout=".$agent_call_timeout."}".$agent_contact;
|
||||
$agent_contact = "{call_timeout=".$agent_call_timeout.",sip_invite_domain=".$_SESSION['domain_name']."}".$agent_contact;
|
||||
}
|
||||
else {
|
||||
//add the call_timeout and confirm
|
||||
$tmp_agent_contact = $tmp_first.',call_timeout='.$agent_call_timeout.$tmp_last;
|
||||
$tmp_agent_contact = "{".$tmp_confirm.",call_timeout=".$agent_call_timeout."}".$agent_contact;
|
||||
echo "\n\n".$tmp_agent_contact."\n\n";
|
||||
$agent_contact = $first.',call_timeout='.$agent_call_timeout.$last;
|
||||
$agent_contact = "{".$confirm.",call_timeout=".$agent_call_timeout.",sip_invite_domain=".$_SESSION['domain_name']."}".$agent_contact;
|
||||
echo "\n\n".$agent_contact."\n\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
//found
|
||||
if(stristr($agent_contact, 'sofia/gateway') === FALSE) {
|
||||
//not found
|
||||
$position = strrpos($agent_contact, "}");
|
||||
$first = substr($agent_contact, 0, $position);
|
||||
$last = substr($agent_contact, $position);
|
||||
if(stristr($agent_contact, 'call_timeout') === FALSE) {
|
||||
//add the call_timeout
|
||||
$tmp_pos = strrpos($agent_contact, "}");
|
||||
$tmp_first = substr($agent_contact, 0, $tmp_pos);
|
||||
$tmp_last = substr($agent_contact, $tmp_pos);
|
||||
$tmp_agent_contact = $tmp_first.',call_timeout='.$agent_call_timeout.$tmp_last;
|
||||
$call_timeout = ',call_timeout='.$agent_call_timeout;
|
||||
}
|
||||
else {
|
||||
//the string has the call timeout
|
||||
$tmp_agent_contact = $agent_contact;
|
||||
$call_timeout = '';
|
||||
}
|
||||
$agent_contact = $first.',sip_invite_domain='.$_SESSION['domain_name'].$call_timeout.$last;
|
||||
}
|
||||
else {
|
||||
//found
|
||||
$tmp_pos = strrpos($agent_contact, "}");
|
||||
$tmp_first = substr($agent_contact, 0, $tmp_pos);
|
||||
$tmp_last = substr($agent_contact, $tmp_pos);
|
||||
$position = strrpos($agent_contact, "}");
|
||||
$first = substr($agent_contact, 0, $position);
|
||||
$last = substr($agent_contact, $position);
|
||||
if(stristr($agent_contact, 'call_timeout') === FALSE) {
|
||||
//add the call_timeout and confirm
|
||||
$tmp_agent_contact = $tmp_first.','.$tmp_confirm.',call_timeout='.$agent_call_timeout.$tmp_last;
|
||||
$agent_contact = $first.','.$confirm.',sip_invite_domain='.$_SESSION['domain_name'].'call_timeout='.$agent_call_timeout.$last;
|
||||
}
|
||||
else {
|
||||
//add confirm
|
||||
$tmp_agent_contact = $tmp_first.','.$tmp_confirm.$tmp_last;
|
||||
$agent_contact = $first.',sip_invite_domain='.$_SESSION['domain_name'].','.$confirm.$last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -193,7 +192,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$response = event_socket_request($fp, $cmd);
|
||||
usleep(200);
|
||||
//agent set contact
|
||||
$cmd = "api callcenter_config agent set contact ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$tmp_agent_contact;
|
||||
$cmd = "api callcenter_config agent set contact ".$agent_name."@".$_SESSION['domains'][$domain_uuid]['domain_name']." ".$agent_contact;
|
||||
$response = event_socket_request($fp, $cmd);
|
||||
usleep(200);
|
||||
//agent set status
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<context name="{v_context}">
|
||||
<extension name="local_extension" number="[ext]" continue="false" app_uuid="71cf1310-b6e3-415b-8745-3cbdc8e15212">
|
||||
<condition field="destination_number" expression="(^\d{2,7}$)">
|
||||
<condition field="user_exists" expression="true"/>
|
||||
<condition field="destination_number" expression="(^.*$|^\d{2,7}$)">
|
||||
<!--<action application="pre_answer"/>-->
|
||||
<action application="export" data="dialed_extension=$1" inline="true"/>
|
||||
<action application="limit" data="hash ${domain_name} $1 ${limit_max} ${limit_destination}" inline="false" />
|
||||
|
|
|
|||
|
|
@ -80,6 +80,16 @@ $text['label-os']['sv-se'] = "Operativsystem";
|
|||
$text['label-os']['uk'] = "Операційна система ";
|
||||
$text['label-os']['de-at'] = "Betriebssystem";
|
||||
|
||||
$text['label-version']['en-us'] = "Version";
|
||||
$text['label-version']['es-cl'] = "";
|
||||
$text['label-version']['pt-pt'] = "";
|
||||
$text['label-version']['fr-fr'] = "";
|
||||
$text['label-version']['pt-br'] = "";
|
||||
$text['label-version']['pl'] = "";
|
||||
$text['label-version']['sv-se'] = "";
|
||||
$text['label-version']['uk'] = "";
|
||||
$text['label-version']['de-at'] = "";
|
||||
|
||||
$text['label-git_info']['en-us'] = "Git Information";
|
||||
$text['label-git_info']['es-cl'] = "";
|
||||
$text['label-git_info']['pt-pt'] = "";
|
||||
|
|
@ -90,6 +100,16 @@ $text['label-git_info']['sv-se'] = "";
|
|||
$text['label-git_info']['uk'] = "";
|
||||
$text['label-git_info']['de-at'] = "";
|
||||
|
||||
$text['label-switch_version']['en-us'] = "Switch Version";
|
||||
$text['label-switch_version']['es-cl'] = "";
|
||||
$text['label-switch_version']['pt-pt'] = "";
|
||||
$text['label-switch_version']['fr-fr'] = "";
|
||||
$text['label-switch_version']['pt-br'] = "";
|
||||
$text['label-switch_version']['pl'] = "";
|
||||
$text['label-switch_version']['sv-se'] = "";
|
||||
$text['label-switch_version']['uk'] = "";
|
||||
$text['label-switch_version']['de-at'] = "";
|
||||
|
||||
$text['label-git_branch']['en-us'] = "Branch:";
|
||||
$text['label-git_branch']['es-cl'] = "";
|
||||
$text['label-git_branch']['pt-pt'] = "";
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ $document['title'] = $text['title-sys-status'];
|
|||
if (permission_exists('system_view_info')) {
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " Version\n";
|
||||
echo " ".$text['label-version']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".software_version()."\n";
|
||||
|
|
@ -86,22 +86,38 @@ $document['title'] = $text['title-sys-status'];
|
|||
echo "</tr>\n";
|
||||
|
||||
$git_path = normalize_path_to_os($_SERVER["DOCUMENT_ROOT"]."/.git");
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
rtrim($git_commit);
|
||||
$git_origin = shell_exec('git --git-dir='.$git_path.' config --get remote.origin.url');
|
||||
rtrim($git_commit);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-git_info']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".$text['label-git_branch']." ".$git_branch."<br>\n";
|
||||
echo " ".$text['label-git_commit']." ".$git_commit."<br>\n";
|
||||
echo " ".$text['label-git_origin']." ".$git_origin."<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if(file_exists($git_path)){
|
||||
$git_branch = shell_exec('git --git-dir='.$git_path.' name-rev --name-only HEAD');
|
||||
rtrim($git_branch);
|
||||
$git_commit = shell_exec('git --git-dir='.$git_path.' rev-parse HEAD');
|
||||
rtrim($git_commit);
|
||||
$git_origin = shell_exec('git --git-dir='.$git_path.' config --get remote.origin.url');
|
||||
rtrim($git_commit);
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-git_info']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">\n";
|
||||
echo " ".$text['label-git_branch']." ".$git_branch."<br>\n";
|
||||
echo " ".$text['label-git_commit']." ".$git_commit."<br>\n";
|
||||
echo " ".$text['label-git_origin']." ".$git_origin."<br>\n";
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$switch_version = event_socket_request($fp, 'api version');
|
||||
preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(\s*(\d+\w+)\s*\)/", $switch_version, $matches);
|
||||
$switch_version = $matches[1];
|
||||
$switch_bits = $matches[2];
|
||||
echo "<tr>\n";
|
||||
echo " <td width='20%' class=\"vncell\" style='text-align: left;'>\n";
|
||||
echo " ".$text['label-switch_version']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class=\"row_style1\">$switch_version ($switch_bits)</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<!--\n";
|
||||
$tmp_result = shell_exec('uname -a');
|
||||
|
|
|
|||
|
|
@ -142,17 +142,21 @@ require_once "root.php";
|
|||
throw new Exception("No detect_switch was passed to me but \$_SESSION['switch'] is empty!");
|
||||
}
|
||||
foreach ($this->_switch_dirs as $dir){
|
||||
$category = 'switch';
|
||||
$session_var;
|
||||
preg_match( '/^switch_(.*)_dir$/', $dir, $session_var);
|
||||
$dir = "_$dir";
|
||||
if($session_var[1] == 'script'){ $session_var[1] = 'scripts'; }
|
||||
$this->$dir = $_SESSION['switch'][$session_var[1]]['dir'];
|
||||
if($session_var[1] == 'temp'){ $category = 'server'; }
|
||||
$this->$dir = $_SESSION[$category][$session_var[1]]['dir'];
|
||||
}
|
||||
foreach ($this->_switch_vdirs as $vdir){
|
||||
$category = 'switch';
|
||||
$session_var;
|
||||
preg_match( '/^switch_(.*)_vdir$/', $vdir, $session_var);
|
||||
$vdir = "_$vdir";
|
||||
$this->$vdir = $_SESSION['switch'][$session_var[1]]['dir'];
|
||||
if($session_var[1] == 'backup'){ $category = 'server'; }
|
||||
$this->$vdir = $_SESSION[$category][$session_var[1]]['dir'];
|
||||
}
|
||||
$this->_switch_event_host = $_SESSION['event_socket_ip_address'];
|
||||
$this->_switch_event_port = $_SESSION['event_socket_port'];
|
||||
|
|
|
|||
|
|
@ -150,9 +150,6 @@
|
|||
--recording = session:getVariable("recording");
|
||||
domain_name = session:getVariable("domain_name");
|
||||
|
||||
--add the domain name to the recordings directory
|
||||
recordings_dir = recordings_dir .. "/"..domain_name;
|
||||
|
||||
--set the end epoch
|
||||
end_epoch = os.time();
|
||||
|
||||
|
|
@ -710,7 +707,7 @@
|
|||
--there is one other member in this conference
|
||||
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/conference/conf-one_other_member_conference.wav");
|
||||
elseif (member_count == "0") then
|
||||
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/conference/conf-alone.wav");
|
||||
--conference profile defines the alone sound file
|
||||
else
|
||||
--say the count
|
||||
session:execute("say", default_language.." number pronounced "..member_count);
|
||||
|
|
|
|||
Loading…
Reference in New Issue