Files
agc_2-X/extras/ConfBridge/non_agent_api.php.diff
mattf 45148ee557 Updated PHP patches for ConfBridge
git-svn-id: svn://192.168.202.10@3721 3d104415-ff17-0410-8863-d5cf3c621b8a
2023-05-02 14:25:48 +00:00

39 lines
1.4 KiB
Diff

--- non_agent_api.php.old 2022-08-31 17:16:56.143133710 -0400
+++ non_agent_api.php 2023-05-02 10:15:45.230846754 -0400
@@ -2882,7 +2883,25 @@
}
else
{
- $stmt="SELECT count(*) from vicidial_conferences where conf_exten='$session_id' and server_ip='$server_ip';";
+ $stmt ="SELECT conf_engine from servers where server_ip='$server_ip';";
+ $rslt=mysql_to_mysqli($stmt, $link);
+ $row=mysqli_fetch_row($rslt);
+ $conf_engine=$row[0];
+
+ if($conf_engine == "CONFBRIDGE")
+ {
+ $conf_table = "vicidial_confbridges";
+ $monitor_prefix = '4';
+ $barge_prefix = '6';
+ }
+ else
+ {
+ $conf_table = "vicidial_conferences";
+ $monitor_prefix = '0';
+ $barge_prefix = '';
+ }
+
+ $stmt="SELECT count(*) from $conf_table where conf_exten='$session_id' and server_ip='$server_ip';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$session_exists=$row[0];
@@ -2948,7 +2967,7 @@
$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'; $swap_chan=0;
- if ( (preg_match('/MONITOR/',$stage)) or (strlen($stage)<1) ) {$stage = '0';}
+ if ( (preg_match('/MONITOR/',$stage)) or (strlen($stage)<1) ) {$stage = $monitor_prefix;}
if (preg_match('/BARGE/',$stage))
{
if (preg_match('/SWAP/',$stage)) {$swap_chan=1;}