diff --git a/agc_2-X/trunk/docs/NON-AGENT_API.txt b/agc_2-X/trunk/docs/NON-AGENT_API.txt index 0ebf7454..c2001e70 100644 --- a/agc_2-X/trunk/docs/NON-AGENT_API.txt +++ b/agc_2-X/trunk/docs/NON-AGENT_API.txt @@ -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) diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index 87bef98b..e564e3f6 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -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=" | "._QXZ("LISTEN",6).""; $R='';} if ( (strlen($monitor_phone)>1) and (preg_match("/BARGE|WHISPER/",$monitor_active) ) and (preg_match("/BARGE/",$RS_ListenBarge) ) ) - {$R=" | "._QXZ("BARGE",5)."";} + { + $BARGEstage = 'BARGE'; + if ($RS_BargeSwap > 0) {$BARGEstage = 'BARGESWAP';} + $R=" | "._QXZ("BARGE",5).""; + } if ($SIPmonitorLINK>1) {$R=" | WHISPER";} if ($IAXmonitorLINK>1) {$R=" | WHISPER";} 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=" "._QXZ("LISTEN").""; $R='';} if ( (strlen($monitor_phone)>1) and (preg_match("/BARGE|WHISPER/",$monitor_active) ) and (preg_match("/BARGE/",$RS_ListenBarge) ) ) - {$R=" "._QXZ("BARGE")."";} + { + $BARGEstage = 'BARGE'; + if ($RS_BargeSwap > 0) {$BARGEstage = 'BARGESWAP';} + $R=" "._QXZ("BARGE").""; + } if ($SIPmonitorLINK>1) {$R=" WHISPER";} if ($IAXmonitorLINK>1) {$R=" WHISPER";} if ( (strlen($monitor_phone)>1) and (preg_match("/WHISPER/",$monitor_active) ) and (preg_match("/WHISPER/",$RS_ListenBarge) ) ) diff --git a/agc_2-X/trunk/www/vicidial/non_agent_api.php b/agc_2-X/trunk/www/vicidial/non_agent_api.php index baa2accd..e88dfc6a 100644 --- a/agc_2-X/trunk/www/vicidial/non_agent_api.php +++ b/agc_2-X/trunk/www/vicidial/non_agent_api.php @@ -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); diff --git a/agc_2-X/trunk/www/vicidial/options-example.php b/agc_2-X/trunk/www/vicidial/options-example.php index 10f877b6..bcba811d 100644 --- a/agc_2-X/trunk/www/vicidial/options-example.php +++ b/agc_2-X/trunk/www/vicidial/options-example.php @@ -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