fixes for manual dial leave 3-way conferences issues
git-svn-id: svn://192.168.202.10@976 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -286,7 +286,7 @@ foreach(@PTextensions)
|
||||
if ($PTextensions[$i] =~ /Xtimeout1$/i) {$NEWexten[$i] = ''; $leave_3waySQL='0';}
|
||||
if ( ($PTextensions[$i] !~ /Xtimeout\d$/i) and (length($PTextensions[$i])> 0) ) {$NEWexten[$i] .= 'Xtimeout3';}
|
||||
|
||||
if (length($NEWexten[$i]) < 1)
|
||||
if ($NEWexten[$i] =~ /Xtimeout1$/i)
|
||||
{
|
||||
### Kick all participants if there are any left in the conference so it can be reused
|
||||
$local_DEF = 'Local/5555';
|
||||
@@ -296,6 +296,7 @@ foreach(@PTextensions)
|
||||
|
||||
$stmtA="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$server_ip','','Originate','$queryCID','Channel: $kick_local_channel','Context: $ext_context','Exten: 8300','Priority: 1','Callerid: $queryCID','','','','','');";
|
||||
$affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n";
|
||||
if($DB){print STDERR "\n|$affected_rows|$stmtA|\n";}
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_conferences set extension='$NEWexten[$i]',leave_3way='$leave_3waySQL' where server_ip='$server_ip' and conf_exten='$PT_conf_extens[$i]';";
|
||||
|
||||
+31
-27
@@ -670,48 +670,52 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
{
|
||||
if (ereg("NEXTAVAILABLE",$exten))
|
||||
{
|
||||
$stmt="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtA="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtA -->";}
|
||||
$rslt=mysql_query($stmtA, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 1)
|
||||
{
|
||||
$stmt="UPDATE vicidial_conferences set extension='$protocol/$extension$NOWnum', leave_3way='0' where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtB="UPDATE vicidial_conferences set extension='$protocol/$extension$NOWnum', leave_3way='0' where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtB -->";}
|
||||
$rslt=mysql_query($stmtB, $link);
|
||||
|
||||
$stmt="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and extension='$protocol/$extension$NOWnum' and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtC="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and extension='$protocol/$extension$NOWnum' and conf_exten != '$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtC -->";}
|
||||
$rslt=mysql_query($stmtC, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$exten = $row[0];
|
||||
|
||||
$stmt="UPDATE vicidial_conferences set extension='$protocol/$extension' where server_ip='$server_ip' and conf_exten='$exten' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtD="UPDATE vicidial_conferences set extension='$protocol/$extension' where server_ip='$server_ip' and conf_exten='$exten' limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtD -->";}
|
||||
$rslt=mysql_query($stmtD, $link);
|
||||
|
||||
$stmt="UPDATE vicidial_conferences set leave_3way='1', leave_3way_datetime='$NOW_TIME', extension='3WAY_$user' where server_ip='$server_ip' and conf_exten='$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtE="UPDATE vicidial_conferences set leave_3way='1', leave_3way_datetime='$NOW_TIME', extension='3WAY_$user' where server_ip='$server_ip' and conf_exten='$session_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtE -->";}
|
||||
$rslt=mysql_query($stmtE, $link);
|
||||
|
||||
$queryCID = "CXAR24$NOWnum";
|
||||
$stmtB="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmtB, $link);
|
||||
$stmtF="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtF -->";}
|
||||
$rslt=mysql_query($stmtF, $link);
|
||||
|
||||
$stmt="UPDATE vicidial_live_agents set conf_exten='$exten' where server_ip='$server_ip' and user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtG="UPDATE vicidial_live_agents set conf_exten='$exten' where server_ip='$server_ip' and user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtG -->";}
|
||||
$rslt=mysql_query($stmtG, $link);
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id' and callerid LIKE \"M%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$stmtH = "DELETE from vicidial_auto_calls where lead_id='$lead_id' and callerid LIKE \"M%\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtH -->";}
|
||||
$rslt=mysql_query($stmtH, $link);
|
||||
}
|
||||
|
||||
// $fp = fopen ("./vicidial_debug_3way.txt", "a");
|
||||
// fwrite ($fp, "$NOW_TIME|$filename|\n|$stmtA|\n|$stmtB|\n|$stmtC|\n|$stmtD|\n|$stmtE|\n|$stmtF|\n|$stmtG|\n|$stmtH|\n\n");
|
||||
// fclose($fp);
|
||||
|
||||
echo "NeWSessioN|$exten|\n";
|
||||
echo "|$stmtB|\n";
|
||||
echo "|$stmtG|\n";
|
||||
|
||||
exit;
|
||||
}
|
||||
@@ -1027,7 +1031,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
if ($ACTION=="RedirectXtraCX")
|
||||
{
|
||||
$DBout='';
|
||||
@@ -1315,7 +1319,7 @@ if ($ACTION=="RedirectXtra")
|
||||
}
|
||||
}
|
||||
###### END OLD LEAVE-3-WAY FOR EXTERNAL CALLS - DEPRICATED AND WILL BE DELETED SOON #####
|
||||
|
||||
*/
|
||||
|
||||
if ($ACTION=="Redirect")
|
||||
{
|
||||
|
||||
@@ -195,10 +195,11 @@
|
||||
# 81010-1047 - Fixed conf calling prefix to use settings, other 3way improvements
|
||||
# 81011-1403 - Fixed bugs in leave3way when transferring a manual dial call
|
||||
# 81012-1729 - Added INBOUND_MAN dial method to allow manual list dialing and inbound calls
|
||||
# 81013-1644 - Fixed bug in leave 3way for manual dial fronters
|
||||
#
|
||||
|
||||
$version = '2.0.5-173';
|
||||
$build = '81012-1729';
|
||||
$version = '2.0.5-174';
|
||||
$build = '81013-1644';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
@@ -2219,6 +2220,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
conf_dialed=1;
|
||||
if (taskFromConf == 'YES')
|
||||
{
|
||||
document.getElementById("DialWithCustomer").innerHTML ="<IMG SRC=\"./images/vdc_XB_dialwithcustomer_OFF.gif\" border=0 alt=\"Dial With Customer\"></a>";
|
||||
|
||||
document.getElementById("ParkCustomerDial").innerHTML ="<IMG SRC=\"./images/vdc_XB_parkcustomerdial_OFF.gif\" border=0 alt=\"Park Customer Dial\"></a>";
|
||||
|
||||
var manual_number = document.vicidial_form.xfernumber.value;
|
||||
var manual_string = manual_number.toString();
|
||||
var dial_conf_exten = session_id;
|
||||
@@ -3020,8 +3025,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
delete xmlhttpXF;
|
||||
}
|
||||
|
||||
// used to send second Redirect for manual dial calls
|
||||
if (auto_dial_level == 0)
|
||||
// used to send second Redirect for manual dial calls
|
||||
if ( (auto_dial_level == 0) && (taskvar != '3WAY') )
|
||||
{
|
||||
RedirecTxFEr = 1;
|
||||
var xmlhttpXF2=false;
|
||||
|
||||
Reference in New Issue
Block a user