Fixed rare bug with manual dial calls and using PRIs where live calls could be hung up
git-svn-id: svn://192.168.202.10@1065 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
$version = '2.0.5-35';
|
||||
$build = '81104-0203';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=82;
|
||||
$mysql_log_count=83;
|
||||
$one_mysql_log=0;
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -484,6 +484,29 @@ $rslt=mysql_query($stmt, $link);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ($auto_dial_level < 1) and (strlen($stage)>2) and (strlen($channel)>2) and (strlen($exten)>2) )
|
||||
{
|
||||
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel' and extension NOT LIKE \"%$exten%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02083',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$channel_live=0;
|
||||
echo "Channel $channel in use by another agent on $call_server_ip, Hangup command not inserted $rowx[0]\n$stmt\n";
|
||||
if ($WeBRooTWritablE > 0)
|
||||
{
|
||||
$fp = fopen ("./vicidial_debug.txt", "a");
|
||||
fwrite ($fp, "$NOW_TIME|MDCHU|$user|$channel|$call_server_ip|$exten|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "$stmt\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($channel_live==1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user