Added BARGESWAP option to blind_monitor function

for Non-Agent API, and added a related options.php setting

git-svn-id: svn://192.168.202.10@3466 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-06-25 18:39:43 +00:00
parent cd84efca3c
commit 3ba9f02ba5
4 changed files with 35 additions and 10 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-06-11
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-06-25
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -188,6 +188,8 @@ Changes:
210406-1047 - Added 'dialable_count' option to list_info function
210517-1850 - Added phone_code as modifiable field in update_lead function
210611-1610 - Added more variables for add_did/update_did functions
210618-1000 - Added CORS support
210625-1421 - Added BARGESWAP option to blind_monitor function
API Functions use the 'function' variable
@@ -296,7 +298,7 @@ phone_login - alpha-numeric, no spaces or special characters allowed
session_id - must be all numbers, 7 digits
server_ip - must be all numbers and dots, max 15 characters
source - description of what originated the API call (maximum 20 characters)
stage - MONITOR, BARGE or HIJACK, default is MONITOR
stage - MONITOR, BARGE(or BARGESWAP) or HIJACK, default is MONITOR
(HIJACK option is not currently functional)
+16 -4
View File
@@ -124,10 +124,11 @@
# 210314-2040 - Added optional DID Description display for inbound calls
# 210615-2241 - Fix for issue #1314
# 210618-1011 - Added CORS support
# 210625-1432 - Added options.php RS_BargeSwap variable
#
$version = '2.14-109';
$build = '210618-1011';
$version = '2.14-110';
$build = '210625-1432';
$php_script='AST_timeonVDADall.php';
require("dbconnect_mysqli.php");
@@ -251,6 +252,9 @@ if (isset($_GET["parkSTATS"])) {$parkSTATS=$_GET["parkSTATS"];}
if (isset($_GET["SLAinSTATS"])) {$SLAinSTATS=$_GET["SLAinSTATS"];}
elseif (isset($_POST["SLAinSTATS"])) {$SLAinSTATS=$_POST["SLAinSTATS"];}
# defaults
$RS_BargeSwap=0;
if (file_exists('options.php'))
{
require('options.php');
@@ -3828,7 +3832,11 @@ if ($talking_to_print > 0)
if ( (strlen($monitor_phone)>1) and (preg_match("/MONITOR|BARGE|WHISPER/",$monitor_active) ) and (preg_match("/MONITOR/",$RS_ListenBarge) ) )
{$L=" | <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','MONITOR');\">"._QXZ("LISTEN",6)."</a>"; $R='';}
if ( (strlen($monitor_phone)>1) and (preg_match("/BARGE|WHISPER/",$monitor_active) ) and (preg_match("/BARGE/",$RS_ListenBarge) ) )
{$R=" | <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','BARGE');\">"._QXZ("BARGE",5)."</a>";}
{
$BARGEstage = 'BARGE';
if ($RS_BargeSwap > 0) {$BARGEstage = 'BARGESWAP';}
$R=" | <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','$BARGEstage');\">"._QXZ("BARGE",5)."</a>";
}
if ($SIPmonitorLINK>1) {$R=" | <a href=\"sip:47378218$Lsessionid@$server_ip\">WHISPER</a>";}
if ($IAXmonitorLINK>1) {$R=" | <a href=\"iax:47378218$Lsessionid@$server_ip\">WHISPER</a>";}
if ( (strlen($monitor_phone)>1) and (preg_match("/WHISPER/",$monitor_active) ) and (preg_match("/WHISPER/",$RS_ListenBarge) ) )
@@ -3991,7 +3999,11 @@ if ($talking_to_print > 0)
if ( (strlen($monitor_phone)>1) and (preg_match("/MONITOR|BARGE|WHISPER/",$monitor_active) ) and (preg_match("/MONITOR/",$RS_ListenBarge) ) )
{$L="<td NOWRAP align=center> <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','MONITOR');\">"._QXZ("LISTEN")."</a></td>"; $R='';}
if ( (strlen($monitor_phone)>1) and (preg_match("/BARGE|WHISPER/",$monitor_active) ) and (preg_match("/BARGE/",$RS_ListenBarge) ) )
{$R=" <td NOWRAP align=center> <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','BARGE');\">"._QXZ("BARGE")."</a></td>";}
{
$BARGEstage = 'BARGE';
if ($RS_BargeSwap > 0) {$BARGEstage = 'BARGESWAP';}
$R=" <td NOWRAP align=center> <a href=\"javascript:send_monitor('$Lsessionid','$Lserver_ip','$BARGEstage');\">"._QXZ("BARGE")."</a></td>";
}
if ($SIPmonitorLINK>1) {$R=" </td><td NOWRAP align=center> <a href=\"sip:47378218$Lsessionid@$server_ip\">WHISPER</a></td>";}
if ($IAXmonitorLINK>1) {$R=" </td><td NOWRAP align=center> <a href=\"iax:47378218$Lsessionid@$server_ip\">WHISPER</a></td>";}
if ( (strlen($monitor_phone)>1) and (preg_match("/WHISPER/",$monitor_active) ) and (preg_match("/WHISPER/",$RS_ListenBarge) ) )
+13 -4
View File
@@ -179,10 +179,11 @@
# 210517-1850 - Added phone_code as modifiable field in update_lead function
# 210611-1610 - Added more variables for add_did/update_did functions
# 210618-1000 - Added CORS support
# 210625-1421 - Added BARGESWAP option to blind_monitor function
#
$version = '2.14-156';
$build = '210618-1000';
$version = '2.14-157';
$build = '210625-1421';
$php_script='non_agent_api.php';
$api_url_log = 0;
@@ -2713,9 +2714,13 @@ if ($function == 'blind_monitor')
if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
$monitor_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S";
$monitor_type='LISTEN'; $cid_prefix='BM';
$monitor_type='LISTEN'; $cid_prefix='BM'; $swap_chan=0;
if ( (preg_match('/MONITOR/',$stage)) or (strlen($stage)<1) ) {$stage = '0';}
if (preg_match('/BARGE/',$stage)) {$stage = $barge_prefix; $monitor_type='BARGE'; $cid_prefix='BB';}
if (preg_match('/BARGE/',$stage))
{
if (preg_match('/SWAP/',$stage)) {$swap_chan=1;}
$stage = $barge_prefix; $monitor_type='BARGE'; $cid_prefix='BB';
}
if (preg_match('/HIJACK/',$stage)) {$stage = ''; $monitor_type='HIJACK'; $cid_prefix='BB';}
if (preg_match('/WHISPER/',$stage))
{
@@ -2746,6 +2751,10 @@ if ($function == 'blind_monitor')
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$monitor_server_ip','','Originate','$BMquery','Channel: Local/$monitor_dialstring$stage$session_id@default','Context: default','Exten: $dialplan_number','Priority: 1','Callerid: \"$BMquery\" <$outbound_cid>','','','','','');";
if ($swap_chan > 0)
{
$stmt = "INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$monitor_server_ip','','Originate','$BMquery','Channel: Local/$dialplan_number@default','Context: default','Exten: $monitor_dialstring$stage$session_id','Priority: 1','Callerid: \"$BMquery\" <$outbound_cid>','','','','','');";
}
if ($DB>0) {echo "DEBUG: blind_monitor query - $stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$affected_rows = mysqli_affected_rows($link);
+2
View File
@@ -31,6 +31,7 @@
# 201107-2257 - Added RS_parkSTATS option
# 210314-2101 - Added RS_DIDdesc option
# 210618-0937 - Added CORS support
# 210625-1425 - Added RS_BargeSwap option for blind monitoring
#
# used by the realtime_report.php script
@@ -77,6 +78,7 @@ $RS_logoutLINK = 0; # 0=no, 1=yes
$RS_parkSTATS = 0; # 0=no, 1=yes, 2=limited
$RS_SLAinSTATS = 0; # 0=no, 1=yes, 2=TMA
$RS_ListenBarge = 'MONITOR|BARGE|WHISPER'; # list of listen-related features separated by pipes: "MONITOR|BARGE|WHISPER"
$RS_BargeSwap = 0; # 0=no, 1=yes reverse the order of who is called first on barge calls
$RS_agentWAIT = 3; # 3 or 4
$RS_INcolumnsHIDE = 0; # 0=no, 1=yes # whether to hide the 'HOLD' & 'IN-GROUP' columns in the agent detail section
$RS_DIDdesc = 0; # 0=no, 1=yes # whether to show a 'DID DESCRIPTION' column in the agent detail section