fixes for bugs 248, 274 all related to manual dialing and DEAD call logging and disconnect/busy logging for manual dial calls

git-svn-id: svn://192.168.202.10@1301 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-01-09 20:13:59 +00:00
parent a12f0f4c2e
commit 6839770854
163 changed files with 4913 additions and 3204 deletions
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";}
if ($format=='table') {echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+10 -10
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR DESLIGAR/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR DESLIGAR/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>CHAMADAS ATIVAS NESTE TELEFONE:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANAL DO CLIENTE</td><td><font class=\"log_title\">CANAL REMOTO</td><td><font class=\"log_title\">REGISTRO</td><td><font class=\"log_title\">DESLIGAR</td><td><font class=\"log_title\">TRANFERENCIA</td><td><font class=\"log_title\">ESPERA</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>CHAMADAS ATIVAS NESTE TELEFONE:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANAL DO CLIENTE</td><td><font class=\"log_title\">CANAL REMOTO</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">DESLIGAR</td><td><font class=\"log_title\">TRANFERENCIA</td><td><font class=\"log_title\">ESPERA</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/HORA DA CHAMADA</td><td><font class=\"log_title\">NUMERO</td><td align=right><font class=\"log_title\">COMPRIMENTO (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/HORA DA CHAMADA</td><td><font class=\"log_title\">NUMERO</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/HORA DA CHAMADA</td><td><font class=\"log_title\">NUMERO ENTRANTE</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">COMPRIMENTO</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/HORA DA CHAMADA</td><td><font class=\"log_title\">NUMERO ENTRANTE</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK DESLIGAR <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Desligar o Canal</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Capturar o Canal</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERIR CHAMADAS ATIVAS</b> <BR>Canal a ser transferido: <span id="MainXfeRChanneL">Canal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERIR CHAMADAS ATIVAS</b> <BR>Canal a ser transferido: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Extensões:<BR><span id="MainXfeRContent"> Extensões do Menu </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Discar a extensão local</b> <BR>Telefone ligando de: <span id="LocalDialChanneL">Canal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Discar a extensão local</b> <BR>Telefone ligando de: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Extensões:<BR><span id="LocalDialContent"> Extensões do Menu </span></td>
<td>
<BR>
@@ -2828,7 +2828,7 @@ echo "</head>\n";
<span style="position:absolute;left:5px;top:5px;z-index:34;" id="FavoriteSEdiT">
<table border=0 bgcolor="#DDDDFF" width=800 height=450 cellpadding=2 ALIGN=TOP><TR HEIGHT=95%><TD align=center HEIGHT=95%><span id="FavoriteSEditContent">FAVORITOS</span></TD></TR>
<TR><TD ALIGN=CENTER><BR> &nbsp; </TD></TR>
<TR VALIGN=BOTTOM><TD VALIGN=BOTTOM ALIGN=CENTER BGCOLOR="#FFFFCC"><a href="#" onclick="SubmiT_FavoritE_ChangEs();return false;">PARA ENVIAR MODIFICACOES FAVORITAS E NECESSARIO FAZER O SAIR</a></TD></TR>
<TR VALIGN=BOTTOM><TD VALIGN=BOTTOM ALIGN=CENTER BGCOLOR="#FFFFCC"><a href="#" onclick="SubmiT_FavoritE_ChangEs();return false;">PARA ENVIAR MODIFICACOES FAVORITAS E NECESSARIO FAZER O LOGOUT</a></TD></TR>
<TR VALIGN=BOTTOM><TD VALIGN=BOTTOM ALIGN=CENTER BGCOLOR="#FFFFCC"><a href="#" onclick="hideDiv('FavoriteSEdiT');return false;">VOLTAR A TELA PRINCIPAL - as alterações serão ignoradas</a></TD></TR>
</TABLE>
</span>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">BATENTE</a> | <a href="#" onclick="start();return false;">INICIAR</a> &nbsp; &nbsp; Atualizar a taxa: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Mais rápido</a> | <a href="#" onclick="slower();return false;">Mais devagar</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Atualizar a taxa: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Mais rápido</a> | <a href="#" onclick="slower();return false;">Mais devagar</a></p>
<div id="status"><em>Inicializando..</em></div>
</td></tr>
<tr><td>Extensões Ativas <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+47 -10
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent isligadois hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -465,7 +502,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
$Ashift_logout=0;
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|INICIAR",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|START",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if (strlen($LOGgroup_shiftsSQL) < 3)
@@ -531,7 +568,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($AexternalDEAD > 0)
{$Alogin='DEAD_EXTERNAL';}
if ($Ashift_logout > 0)
{$Alogin='SHIFT_SAIR';}
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$CanalA[$counter] ~";
# echo "$CanalA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+5 -5
View File
@@ -234,7 +234,7 @@ echo "<!-- VERSÃO: $version CONFIGURAÇÃO: $build UNIQUEID: $uniqueid
// ################################################################################
// timeout to deactivate the call action links after 30segundos
// timeout to deactivate the call action links after 30 segundos
function link_timeout()
{
window.focus();
@@ -282,7 +282,7 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Canal: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Canal=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOMIZADO</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Número Discado: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+27 -27
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "extenName $extenName Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "extenName $extenName Deve ser definido\n";
echo "exten $exten Deve ser definido\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Canal $channel não é válido or queryCID $queryCID não é válido, Hangup comando não inserido\n";
echo "Channel $channel não é válido or queryCID $queryCID não é válido, Hangup comando não inserido\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Canal $channel não está ativoligado$call_server_ip, Hangup comando não inserido $rowx[0]\n$stmt\n";
echo "Channel $channel não está ativoligado$call_server_ip, Hangup comando não inserido $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Canal $channel in use by another agentligado$call_server_ip, Hangup comando não inserido $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agentligado$call_server_ip, Hangup comando não inserido $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -571,7 +571,7 @@ if ($ACTION=="Hangup")
if ($rowx[0] > 0)
{
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "extenName $extenName Deve ser definido\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "extenName $extenName Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "extenName $extenName Deve ser definido\n";
echo "exten $exten Deve ser definido\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "ExtraCanal $extrachannel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "ExtraChannel $extrachannel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n";
echo "Channel $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
echo "Channel $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "ExtraCanal $extrachannel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "ExtraChannel $extrachannel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n";
echo "Channel $channel não está ativoligado$call_server_ip, Redirect comando não inserido\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
echo "Channel $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel não está ativoligado$server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra comando enviado para Canal $channel and \nExtraCanal $extrachannel\n to $extenligado$server_ip\n";
echo "RedirectXtra comando enviado para Canal $channel and \nExtraChannel $extrachannel\n to $extenligado$server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $extenligado$server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra comando enviado para Canal $channelligado$call_server_ip and \nExtraCanal $extrachannel\n to $extenligado$server_ip\n";
echo "RedirectXtra comando enviado para Canal $channelligado$call_server_ip and \nExtraChannel $extrachannel\n to $extenligado$server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Uma dessas variáveis não é válido:\n";
echo "Canal $channel Deve ser maior que 2 caracteres\n";
echo "Channel $channel Deve ser maior que 2 caracteres\n";
echo "queryCID $queryCID Deve ser maior que 14 caracateres\n";
echo "exten $exten Deve ser definido\n";
echo "ext_context $ext_context Deve ser definido\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canal $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
echo "Channel $channel não está ativoligado$server_ip, Redirect comando não inserido\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canal $channel não é válido or queryCID $queryCID não é válido or filename: $filename não é válido, $ACTION comando não inserido\n";
echo "Channel $channel não é válido or queryCID $queryCID não é válido or filename: $filename não é válido, $ACTION comando não inserido\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canal $channel não está ativoligado$server_ip, $ACTION comando não inserido\n";
echo "Channel $channel não está ativoligado$server_ip, $ACTION comando não inserido\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canal $channel não é válido or exten $exten não é válido or filename: $filename não é válido, $ACTION comando não inserido\n";
echo "Channel $channel não é válido or exten $exten não é válido or filename: $filename não é válido, $ACTION comando não inserido\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";}
if ($format=='debug') {echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+11 -11
View File
@@ -214,17 +214,17 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
### No vicidial_timeclock_status record found, insert one
$stmt="INSERT INTO vicidial_timeclock_status set status='INICIAR', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
$stmt="INSERT INTO vicidial_timeclock_status set status='START', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$status='INICIAR';
$status='START';
$totTIME_HMS='0:00:00';
$affected_rows = mysql_affected_rows($link);
print "<!-- NOVO vicidial_timeclock_status record inserted for $user: |$affected_rows| -->\n";
}
if ( ($last_action_sec < 30) and ($status != 'INICIAR') )
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30segundos of your last login/logout
### You cannot log in or out within 30 segundos of your last login/logout
$VDdisplayMESSAGE = "Você não pode efetuar login ou para fora dentro de 30 segundos do seu último login ou logout";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTOSAIR') or ($status=='INICIAR') or ($status=='SAIR') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -296,7 +296,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$LOGtimeMESSAGE = "Você saiu em$NOW_TIME<BR>Quantidade de tempo que foram registradas em:$totTIME_HMS";
### Add a record to the timeclock log
$stmt="INSERT INTO vicidial_timeclock_log set event='SAIR', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -311,14 +311,14 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_log record updated for $user: |$affected_rows| -->\n";
### Update the user's timeclock status record
$stmt="UPDATE vicidial_timeclock_status set status='SAIR', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
$stmt="UPDATE vicidial_timeclock_status set status='LOGOUT', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
print "<!-- vicidial_timeclock_status record updated for $user: |$affected_rows| -->\n";
### Add a record to the timeclock audit log
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='SAIR', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTOSAIR') or ($status=='INICIAR') or ($status=='SAIR') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "ERRO: timeclock entrada do log já realizados:$status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTOSAIR') or ($status=='INICIAR') or ($status=='SAIR') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Vez desde que foi registrado em:$totTIME_HMS";
$log_action = 'login';
@@ -377,7 +377,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{
$VDdisplayMESSAGE = "Quantidade de tempo que tem sido registrado em:$totTIME_HMS";
$log_action = 'logout';
$button_name = 'SAIR';
$button_name = 'LOGOUT';
$LOGtimeMESSAGE = "Você autenticado-nos em: $last_action_date<BR>Quantidade de tempo que tem sido registrado em:$totTIME_HMS<BR><BR>SAIR Clique abaixo para log-out";
}
+136 -70
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -589,13 +598,13 @@ if ($ACTION == 'LogiNCamPaigns')
$rowx=mysql_fetch_row($rslt);
$last_agent_event = $rowx[0];
}
if ( (strlen($last_agent_event)<2) or (ereg('SAIR',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{$show_campaign_list=0;}
}
}
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
if ( ( (ereg("INICIAR|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("INICIAR|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1854,7 +1863,7 @@ if ($ACTION == 'manDiaLnextCaLL')
}
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2262,7 +2271,7 @@ if ($ACTION == 'manDiaLonly')
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00048',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID não é válido\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID não é válido\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 segundos, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2596,7 +2662,7 @@ if ($stage == "end")
}
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00063',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3372,7 +3438,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00098',$user,$server_ip,$session_name,$one_mysql_log);}
echo "REC_BATENTE|$rec_channels[$loop_count]|$filename[$loop_count]|";
echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|";
if (strlen($filename)>2)
{
$stmt="SELECT recording_id,start_epoch,vicidial_id,lead_id FROM recording_log where filename='$filename[$loop_count]'";
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|REGISTRO_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4406,8 +4472,8 @@ if ($ACTION == 'userLOGout')
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
}
##### Insert a SAIR record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','SAIR','$campaign','$NOW_TIME','$StarTtime','$user_group');";
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00128',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4505,7 +4571,7 @@ if ($ACTION == 'userLOGout')
if ($vla_delete > 0)
{
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00138',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5031,7 +5097,7 @@ if ($ACTION == 'updateDISPO')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00158',$user,$server_ip,$session_name,$one_mysql_log);}
}
####### INICIAR Vtiger Call Logging #######
####### START Vtiger Call Logging #######
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00197',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5420,7 +5486,7 @@ if ($ACTION == 'updateDISPO')
####### END Vtiger Call Logging #######
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00159',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -5792,7 +5858,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
if ( ($affected_rows > 0) or ($comments == 'NO_STATUS_CHANGE') )
{
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00167',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5994,7 +6060,7 @@ if ($ACTION == 'PauseCodeSubmit')
if ($affected_rows > 0)
{
#############################################
##### INICIAR QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00176',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+141 -112
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show callsligadohold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofsegundos for campaign call and agent stats
$campagentstatctmax = '3'; # Number of segundos for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign nameligadologin pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookupsligadocampaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Desligar Cliente
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TelefoneSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT DISCAR by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -914,7 +916,7 @@ $VDloginDISPLAY=0;
$last_agent_event = $rowx[0];
}
if ($DB>0) {echo "|$stmt|$events_to_parse|$last_agent_event|";}
if ( (strlen($last_agent_event)<2) or (ereg('SAIR',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "É necessário efetuar login AO PRIMEIRO TIMECLOCK<BR>";
@@ -923,7 +925,7 @@ $VDloginDISPLAY=0;
### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR
### BEGIN - CHECK TO SEE IF SHIFT ENFORCEMENT IS ENABLED AND AGENT IS OUTSIDE OF THEIR SHIFTS, IF SO, OUTPUT ERROR
if ( ( (ereg("INICIAR|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("INICIAR|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1238,23 +1240,23 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
{$dispo_check_all_pause=1;}
$quick_transfer_button_enabled=0;
if (preg_match("/IN_GROUP|PREINICIAR_1|PREINICIAR_2|PREINICIAR_3|PREINICIAR_4|PREINICIAR_5/",$quick_transfer_button))
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$quick_transfer_button))
{$quick_transfer_button_enabled=1;}
$preset_populate='';
$prepopulate_transfer_preset_enabled=0;
if (preg_match("/PREINICIAR_1|PREINICIAR_2|PREINICIAR_3|PREINICIAR_4|PREINICIAR_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$prepopulate_transfer_preset))
{
$prepopulate_transfer_preset_enabled=1;
if (preg_match("/PREINICIAR_1/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_a_number;}
if (preg_match("/PREINICIAR_2/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_2/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_b_number;}
if (preg_match("/PREINICIAR_3/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_3/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_c_number;}
if (preg_match("/PREINICIAR_4/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_4/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_d_number;}
if (preg_match("/PREINICIAR_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_5/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_e_number;}
}
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER REGISTROING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TelefoneSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TelefoneSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -1763,7 +1765,7 @@ else
{
$VICIDiaL_park_on_extension = "$park_ext";
$VICIDiaL_park_on_filename = "$park_file_name";
echo "<!-- ESPERA CUSTOMIZADOIZADA: |$VICIDiaL_park_on_extension|$VICIDiaL_park_on_filename| -->\n";
echo "<!-- ESPERA CUSTOMIZADA: |$VICIDiaL_park_on_extension|$VICIDiaL_park_on_filename| -->\n";
}
echo "<!-- ESPERA PADRÃO: |$VICIDiaL_park_on_extension|$VICIDiaL_park_on_filename| -->\n";
@@ -1771,7 +1773,7 @@ else
if (strlen($web_form_address)>0)
{
$VICIDiaL_web_form_address = "$web_form_address";
echo "<!-- WEB FORM CUSTOMIZADOIZADO: |$VICIDiaL_web_form_address| -->\n";
echo "<!-- WEB FORM CUSTOMIZADO: |$VICIDiaL_web_form_address| -->\n";
}
else
{
@@ -1785,7 +1787,7 @@ else
if (strlen($web_form_address_two)>0)
{
$VICIDiaL_web_form_address_two = "$web_form_address_two";
echo "<!-- WEB FORM CUSTOMIZADOIZADO 2: |$VICIDiaL_web_form_address_two| -->\n";
echo "<!-- WEB FORM CUSTOMIZADO 2: |$VICIDiaL_web_form_address_two| -->\n";
}
else
{
@@ -1912,7 +1914,7 @@ else
$SIqueryCID = "S$CIDdate$session_id";
#############################################
##### INICIAR SYSTEM_SETTINGS LOOKUP #####
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01040',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callsegundos counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call segundos counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'CUSTOMIZADOER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -3359,7 +3361,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
showDiv('SysteMDisablEBoX');
}
if (AGLogiN == 'SHIFT_SAIR')
if (AGLogiN == 'SHIFT_LOGOUT')
{
shift_logout_flag=1;
}
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Discar telefone alternativo: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TELEFONE PRINCIPAL</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTelefoneE')\"><font class=\"preview_text\">TELEFONE ALTERNATIVO</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ENDERECO3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">FINALIZAR CONTATO</font></a>";
var man_status = "Discar telefone alternativo: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TELEFONE PRINCIPAL</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">TELEFONE ALTERNATIVO</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ENDERECO3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">FINALIZAR CONTATO</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Ligando: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Aguardando Atender... " + MD_ring_secondS + "segundos";
document.getElementById("MainStatuSSpan").innerHTML = " Ligando: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Aguardando Atender... " + MD_ring_secondS + " segundos";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -4666,30 +4687,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PREINICIAR_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PREINICIAR_1') || (quick_transfer_button == 'PREINICIAR_2') || (quick_transfer_button == 'PREINICIAR_3') || (quick_transfer_button == 'PREINICIAR_4') || (quick_transfer_button == 'PREINICIAR_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"RÁPIDA TRANSFERÊNCIA\"></a>";
if (quick_transfer_button == 'PREINICIAR_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PREINICIAR_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PREINICIAR_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PREINICIAR_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PREINICIAR_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTelefoneE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6028,7 +6049,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
}
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'SAIR') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'LOGOUT') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
{
PauseCodeSelectContent_create();
}
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Canal has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -6507,30 +6528,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PREINICIAR_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PREINICIAR_1') || (quick_transfer_button == 'PREINICIAR_2') || (quick_transfer_button == 'PREINICIAR_3') || (quick_transfer_button == 'PREINICIAR_4') || (quick_transfer_button == 'PREINICIAR_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"RÁPIDA TRANSFERÊNCIA\"></a>";
if (quick_transfer_button == 'PREINICIAR_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PREINICIAR_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PREINICIAR_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PREINICIAR_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PREINICIAR_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLDESLIGAR&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefoneE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefoneE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMIZADOER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMIZADOER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -8499,10 +8520,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"SAIR");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('CLOSE');
alert("PLEASE CLICK THE SAIR LINK TO LOG OUT NEXT TIME.\n");
alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n");
}
}
@@ -8515,7 +8536,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"SAIR");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('NORMAL');
}
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Atualizar the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Atualizar the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>NOTIFICAÇÃO TIMER: " + timer_action_seconds + "segundos<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>NOTIFICAÇÃO TIMER: " + timer_action_seconds + " segundos<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"RÁPIDA TRANSFERÊNCIA\"></a>";
}
if ( (quick_transfer_button == 'PREINICIAR_1') || (quick_transfer_button == 'PREINICIAR_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"RÁPIDA TRANSFERÊNCIA\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">segundos:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> segundos:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">REINICIAR</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> REINICIAR </a> |
<a href="#" onclick="CloserSelect_submit();return false;">ENVIAR</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">REINICIAR</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> REINICIAR </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">ENVIAR</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Canal</span>
<span id="DiaLDiaLAltPhonEHide">Canal</span>
<span id="DiaLLeaDPrevieWHide"> Canal</span>
<span id="DiaLDiaLAltPhonEHide"> Canal</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> ESTE AGENDAMENTO SO APARECE PARA MIM <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tempo de execução do script: $RUNtimesegundos -->";
echo "\n<!-- tempo de execução do script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";}
if ($format=='table') {echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+8 -8
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR AUFLEGEN/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR AUFLEGEN/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>VERBUNDEN MIT DIESEM TELEFON:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">KUNDEN LEITUNG</td><td><font class=\"log_title\">ENTFERNTE LEITUNG</td><td><font class=\"log_title\">AUFNAHME</td><td><font class=\"log_title\">AUFLEGEN</td><td><font class=\"log_title\"VERBINDEN</td><td><font class=\"log_title\">PARK</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>VERBUNDEN MIT DIESEM TELEFON:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">KUNDEN LEITUNG</td><td><font class=\"log_title\">ENTFERNTE LEITUNG</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">AUFLEGEN</td><td><font class=\"log_title\"VERBINDEN</td><td><font class=\"log_title\">PARK</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ANRUF DATUM\/ZEIT</td><td><font class=\"log_title\">NUMMER</td><td align=right><font class=\"log_title\">LÄNGE (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ANRUF DATUM\/ZEIT</td><td><font class=\"log_title\">NUMMER</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ANRUF DATUM\/ZEIT</td><td><font class=\"log_title\">IN-NUMMER</td><td COLSPAN=2><font class=\"log_title\">ANRUFERID</td><td align=right><font class=\"log_title\">LÄNGE</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ANRUF DATUM\/ZEIT</td><td><font class=\"log_title\">IN-NUMMER</td><td COLSPAN=2><font class=\"log_title\">ANRUFERID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK AUFLEGEN <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Amtsleitung auflegen</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Amtsleitung übernehmen</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ANRUF WEITERLEITEN</b> <BR>Leitung, die verbunden werden soll: <span id="MainXfeRChanneL">Kanal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ANRUF WEITERLEITEN</b> <BR>Leitung, die verbunden werden soll: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Erweiterungen:<BR><span id="MainXfeRContent"> Extension Menü </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> LOKALE Nebenstellen wahl</b> <BR>Telefon ruft an von: <span id="LocalDialChanneL">Kanal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> LOKALE Nebenstellen wahl</b> <BR>Telefon ruft an von: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Erweiterungen:<BR><span id="LocalDialContent"> Extension Menü </span></td>
<td>
<BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+45 -8
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is an is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$KanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$KanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$KanalA[$counter] ~";
# echo "$KanalA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+6 -6
View File
@@ -234,7 +234,7 @@ echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_i
// ################################################################################
// timeout to deactivate the call action links after 30Sekunden
// timeout to deactivate the call action links after 30 Sekunden
function link_timeout()
{
window.focus();
@@ -282,8 +282,8 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Kanal: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>AnruferID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
$phone = eregi_replace(".*\<","",$row[3]);
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Kanal=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">ANGEPASST</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Gewählte Nummer: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanalA: $ChanneLA[$counter] ~";
echo "KanalB: $ChanneLB[$counter] ~";
echo "KanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanalA: $ChanneLA[$counter] ~";
echo "KanalB: $ChanneLB[$counter] ~";
echo "KanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanalA: $ChanneLA[$counter] ~";
echo "KanalB: $ChanneLB[$counter] ~";
echo "KanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanalA: $ChanneLA[$counter] ~";
echo "KanalB: $ChanneLB[$counter] ~";
echo "KanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "KanalA: $ChanneLA[$counter] ~";
echo "KanalB: $ChanneLB[$counter] ~";
echo "KanalBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+26 -26
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "extenName $extenName muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "extenName $extenName muß eingestellt werden\n";
echo "exten $exten muß eingestellt werden\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Kanal $channel ist unzulässig or queryCID $queryCID ist unzulässig, Hangup Befehl nicht abgesetzt\n";
echo "Channel $channel ist unzulässig or queryCID $queryCID ist unzulässig, Hangup Befehl nicht abgesetzt\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Kanal $channel ist nicht Live an $call_server_ip, Hangup Befehl nicht abgesetzt $rowx[0]\n$stmt\n";
echo "Channel $channel ist nicht Live an $call_server_ip, Hangup Befehl nicht abgesetzt $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Kanal $channel in use by another agent an $call_server_ip, Hangup Befehl nicht abgesetzt $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent an $call_server_ip, Hangup Befehl nicht abgesetzt $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "extenName $extenName muß eingestellt werden\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "extenName $extenName muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "extenName $extenName muß eingestellt werden\n";
echo "exten $exten muß eingestellt werden\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "ExtraKanal $extrachannel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "ExtraChannel $extrachannel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht abgesetzt\n";
echo "Channel $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht abgesetzt\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n";
echo "Channel $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "ExtraKanal $extrachannel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "ExtraChannel $extrachannel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanal $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht abgesetzt\n";
echo "Channel $channel ist nicht Live an $call_server_ip, Redirect Befehl nicht abgesetzt\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n";
echo "Channel $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel ist nicht Live an $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra Befehl gesendet für Kanal $channel and \nExtraKanal $extrachannel\n to $exten an $server_ip\n";
echo "RedirectXtra Befehl gesendet für Kanal $channel and \nExtraChannel $extrachannel\n to $exten an $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten an $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra Befehl gesendet für Kanal $channel an $call_server_ip and \nExtraKanal $extrachannel\n to $exten an $server_ip\n";
echo "RedirectXtra Befehl gesendet für Kanal $channel an $call_server_ip and \nExtraChannel $extrachannel\n to $exten an $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Eine dieser Variablen ist unzulässig:\n";
echo "Kanal $channel muss länger als 2 Buchstaben sein\n";
echo "Channel $channel muss länger als 2 Buchstaben sein\n";
echo "queryCID $queryCID muss länger als 14 Buchstaben sein\n";
echo "exten $exten muß eingestellt werden\n";
echo "ext_context $ext_context muß eingestellt werden\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanal $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n";
echo "Channel $channel ist nicht Live an $server_ip, Redirect Befehl nicht abgesetzt\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Kanal $channel ist unzulässig or queryCID $queryCID ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht abgesetzt\n";
echo "Channel $channel ist unzulässig or queryCID $queryCID ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht abgesetzt\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanal $channel ist nicht Live an $server_ip, $ACTION Befehl nicht abgesetzt\n";
echo "Channel $channel ist nicht Live an $server_ip, $ACTION Befehl nicht abgesetzt\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Kanal $channel ist unzulässig or exten $exten ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht abgesetzt\n";
echo "Channel $channel ist unzulässig or exten $exten ist unzulässig or filename: $filename ist unzulässig, $ACTION Befehl nicht abgesetzt\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";}
if ($format=='debug') {echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -224,7 +224,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30Sekunden of your last login/logout
### You cannot log in or out within 30 Sekunden of your last login/logout
$VDdisplayMESSAGE = "Bitte warten Sie wenigstens 30 Sekunden zwischen dem an- und abmelden und umgekehrt";
echo"<HTML><HEAD>\n";
+123 -57
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID ist unzulässig\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID ist unzulässig\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 Sekunden, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|AUFNAHME_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+131 -102
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls an hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofSekunden for campaign call and agent stats
$campagentstatctmax = '3'; # Number of Sekunden for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name an login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups an campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Kunden auflegen
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TelefonSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT WÄHLEN by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -1238,23 +1240,23 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
{$dispo_check_all_pause=1;}
$quick_transfer_button_enabled=0;
if (preg_match("/IN_GROUP|PZURÜCKSETZEN_1|PZURÜCKSETZEN_2|PZURÜCKSETZEN_3|PZURÜCKSETZEN_4|PZURÜCKSETZEN_5/",$quick_transfer_button))
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$quick_transfer_button))
{$quick_transfer_button_enabled=1;}
$preset_populate='';
$prepopulate_transfer_preset_enabled=0;
if (preg_match("/PZURÜCKSETZEN_1|PZURÜCKSETZEN_2|PZURÜCKSETZEN_3|PZURÜCKSETZEN_4|PZURÜCKSETZEN_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$prepopulate_transfer_preset))
{
$prepopulate_transfer_preset_enabled=1;
if (preg_match("/PZURÜCKSETZEN_1/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_a_number;}
if (preg_match("/PZURÜCKSETZEN_2/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_2/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_b_number;}
if (preg_match("/PZURÜCKSETZEN_3/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_3/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_c_number;}
if (preg_match("/PZURÜCKSETZEN_4/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_4/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_d_number;}
if (preg_match("/PZURÜCKSETZEN_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_5/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_e_number;}
}
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER AUFNAHMEING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1698,7 +1700,7 @@ else
$updater_check_enabled=$row[45];
$AFLogging_enabled=$row[46];
$QUEUE_ACTION_enabled=$row[47];
$AnruferID_popup_enabled=$row[48];
$CallerID_popup_enabled=$row[48];
$voicemail_button_enabled=$row[49];
$enable_fast_refresh=$row[50];
$fast_refresh_rate=$row[51];
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TelefonSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TelefonSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callSekunden counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call Sekunden counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'ANGEPASSTER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Wähle alternative Telefonnummer: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TELEFONNUMMER</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTelefonE')\"><font class=\"preview_text\">ALTERNATIVE TELEFONNUMMER</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRESSE3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ADRESSE BEENDEN</font></a>";
var man_status = "Wähle alternative Telefonnummer: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TELEFONNUMMER</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">ALTERNATIVE TELEFONNUMMER</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRESSE3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ADRESSE BEENDEN</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Telefonierend: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Warte auf Freizeichen... " + MD_ring_secondS + "Sekunden";
document.getElementById("MainStatuSSpan").innerHTML = " Telefonierend: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Warte auf Freizeichen... " + MD_ring_secondS + " Sekunden";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -4666,30 +4687,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PZURÜCKSETZEN_1') || (quick_transfer_button == 'PZURÜCKSETZEN_2') || (quick_transfer_button == 'PZURÜCKSETZEN_3') || (quick_transfer_button == 'PZURÜCKSETZEN_4') || (quick_transfer_button == 'PZURÜCKSETZEN_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
if (quick_transfer_button == 'PZURÜCKSETZEN_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTelefonE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Kanal has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -6507,30 +6528,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PZURÜCKSETZEN_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PZURÜCKSETZEN_1') || (quick_transfer_button == 'PZURÜCKSETZEN_2') || (quick_transfer_button == 'PZURÜCKSETZEN_3') || (quick_transfer_button == 'PZURÜCKSETZEN_4') || (quick_transfer_button == 'PZURÜCKSETZEN_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
if (quick_transfer_button == 'PZURÜCKSETZEN_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PZURÜCKSETZEN_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLAUFLEGEN&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefonE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefonE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('ANGEPASSTER','" + document.vicidial_form.phone_number.value + "','0');return false;\">ANGEPASSTER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Aktualisieren the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Aktualisieren the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>Timer-Benachrichtigung: " + timer_action_seconds + "Sekunden<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>Timer-Benachrichtigung: " + timer_action_seconds + " Sekunden<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
}
if ( (quick_transfer_button == 'PZURÜCKSETZEN_1') || (quick_transfer_button == 'PZURÜCKSETZEN_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">Sekunden:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> Sekunden:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">ZURÜCKSETZEN</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> ZURÜCKSETZEN </a> |
<a href="#" onclick="CloserSelect_submit();return false;">ÜBERNEHMEN</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">ZURÜCKSETZEN</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> ZURÜCKSETZEN </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">ÜBERNEHMEN</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Kanal</span>
<span id="DiaLDiaLAltPhonEHide">Kanal</span>
<span id="DiaLLeaDPrevieWHide"> Kanal</span>
<span id="DiaLDiaLAltPhonEHide"> Kanal</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> NUR MEINE WIEDERVORLAGE <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- Scriptlaufzeit: $RUNtimeSekunden -->";
echo "\n<!-- Scriptlaufzeit: $RUNtime Sekunden -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";}
if ($format=='table') {echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+9 -9
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR ΚΛΕΙΣΙΜΟ/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR ΚΛΕΙΣΙΜΟ/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>ΕΝΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩΝΟ:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">ΚΑΝΑΛΙ ΠΕΛΑΤΩΝ</td><td><font class=\"log_title\">ΑΠΟΜΑΚΡΟ ΚΑΝΑΛΙ</td><td><font class=\"log_title\">ΕΓΓΡΑΦΗ</td><td><font class=\"log_title\">ΚΛΕΙΣΙΜΟ</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">ΣΤΑΘΜΕΥΣΗ</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>ΕΝΕΡΓΕΣ ΚΛΗΣΕΙΣ ΣΕ ΑΥΤΟ ΤΟ ΤΗΛΕΦΩΝΟ:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">ΚΑΝΑΛΙ ΠΕΛΑΤΩΝ</td><td><font class=\"log_title\">ΑΠΟΜΑΚΡΟ ΚΑΝΑΛΙ</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">ΚΛΕΙΣΙΜΟ</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">ΣΤΑΘΜΕΥΣΗ</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ΗΜΕΡΟΜΗΝΙΑ/ΧΡΟΝΟΣ ΚΛΗΣΗΣ</td><td><font class=\"log_title\">ΑΡΙΘΜΟΣ</td><td align=right><font class=\"log_title\">ΜΗΚΟΣ (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ΗΜΕΡΟΜΗΝΙΑ/ΧΡΟΝΟΣ ΚΛΗΣΗΣ</td><td><font class=\"log_title\">ΑΡΙΘΜΟΣ</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ΗΜΕΡΟΜΗΝΙΑ/ΧΡΟΝΟΣ ΚΛΗΣΗΣ</td><td><font class=\"log_title\">ΣΕ-ΑΡΙΘΜΟ</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">ΜΗΚΟΣ</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> ΗΜΕΡΟΜΗΝΙΑ/ΧΡΟΝΟΣ ΚΛΗΣΗΣ</td><td><font class=\"log_title\">ΣΕ-ΑΡΙΘΜΟ</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK ΚΛΕΙΣΙΜΟ <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Κλείσιμο Κορμού</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Κλέψιμο Κορμού</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ΜΕΤΑΦΟΡΑ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ</b> <BR>Κανάλι προς μεταφορά: <span id="MainXfeRChanneL">Κανάλι</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ΜΕΤΑΦΟΡΑ ΕΝΕΡΓΗΣ ΚΛΗΣΗΣ</b> <BR>Κανάλι προς μεταφορά: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Τηλ.συνδέσεις:<BR><span id="MainXfeRContent"> Επιλογές τηλ. συνδέσεων </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ΤΟΠΙΚΕΣ τηλ. συνδέσεις Κλήσεως</b> <BR>Τηλέφωνο που καλεί από: <span id="LocalDialChanneL">Κανάλι</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> ΤΟΠΙΚΕΣ τηλ. συνδέσεις Κλήσεως</b> <BR>Τηλέφωνο που καλεί από: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Τηλ.συνδέσεις:<BR><span id="LocalDialContent"> Επιλογές τηλ. συνδέσεων </span></td>
<td>
<BR>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">ΣΤΑΣΗ</a> | <a href="#" onclick="start();return false;">ΕΝΑΡΞΗ</a> &nbsp; &nbsp; Ρυθμός ανανέωσης: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Γρηγορότερα</a> | <a href="#" onclick="slower();return false;">Πιό αργά</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Ρυθμός ανανέωσης: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Γρηγορότερα</a> | <a href="#" onclick="slower();return false;">Πιό αργά</a></p>
<div id="status"><em>Αρχή..</em></div>
</td></tr>
<tr><td>Ενεργές τηλ. συνδέσεις <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+47 -10
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is στο is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -465,7 +502,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
$Ashift_logout=0;
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|ΕΝΑΡΞΗ",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|START",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if (strlen($LOGgroup_shiftsSQL) < 3)
@@ -531,7 +568,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($AexternalDEAD > 0)
{$Alogin='DEAD_EXTERNAL';}
if ($Ashift_logout > 0)
{$Alogin='SHIFT_ΑΠΟΣΥΝΔΕΣΗ';}
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Κατάσταση: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$ΚανάλιA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$ΚανάλιA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$ΚανάλιA[$counter] ~";
# echo "$ΚανάλιA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+5 -5
View File
@@ -234,7 +234,7 @@ echo "<!-- ΕΚΔΟΣΗ: $version ΔΗΜΙΟΥΡΓΙΑ: $build UNIQUEID:
// ################################################################################
// timeout to deactivate the call action links after 30δευτερόλεπτα
// timeout to deactivate the call action links after 30 δευτερόλεπτα
function link_timeout()
{
window.focus();
@@ -282,7 +282,7 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Κανάλι: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Κανάλι=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">ΣΥΝΗΘΕΙΑ</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Αριθμός που καλέσατε: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "ΚανάλιA: $ChanneLA[$counter] ~";
echo "ΚανάλιB: $ChanneLB[$counter] ~";
echo "ΚανάλιBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+27 -27
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "extenName $extenName πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "extenName $extenName πρέπει να τεθεί\n";
echo "exten $exten πρέπει να τεθεί\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Κανάλι $channel δεν ισχύει or queryCID $queryCID δεν ισχύει, Hangup εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν ισχύει or queryCID $queryCID δεν ισχύει, Hangup εντολή που δεν έγινε εισαγωγή\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $call_server_ip, Hangup εντολή που δεν έγινε εισαγωγή $rowx[0]\n$stmt\n";
echo "Channel $channel δεν είναι ενεργό στο $call_server_ip, Hangup εντολή που δεν έγινε εισαγωγή $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Κανάλι $channel in use by another agent στο $call_server_ip, Hangup εντολή που δεν έγινε εισαγωγή $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent στο $call_server_ip, Hangup εντολή που δεν έγινε εισαγωγή $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -571,7 +571,7 @@ if ($ACTION=="Hangup")
if ($rowx[0] > 0)
{
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "extenName $extenName πρέπει να τεθεί\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "extenName $extenName πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "extenName $extenName πρέπει να τεθεί\n";
echo "exten $exten πρέπει να τεθεί\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "ExtraΚανάλι $extrachannel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "ExtraChannel $extrachannel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "ExtraΚανάλι $extrachannel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "ExtraChannel $extrachannel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν είναι ενεργό στο $call_server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel δεν είναι ενεργό στο $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel and \nExtraΚανάλι $extrachannel\n to $exten στο $server_ip\n";
echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel and \nExtraChannel $extrachannel\n to $exten στο $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten στο $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip and \nExtraΚανάλι $extrachannel\n to $exten στο $server_ip\n";
echo "RedirectXtra εντολή που στέλνεται για Κανάλι $channel στο $call_server_ip and \nExtraChannel $extrachannel\n to $exten στο $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Μία από αυτές τις μεταβλητές δεν ισχύει:\n";
echo "Κανάλι $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "Channel $channel πρέπει να είναι μεγαλύτερος από 2 χαρακτήρες\n";
echo "queryCID $queryCID πρέπει να είναι μεγαλύτερος από 14 χαρακτήρες\n";
echo "exten $exten πρέπει να τεθεί\n";
echo "ext_context $ext_context πρέπει να τεθεί\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν είναι ενεργό στο $server_ip, Redirect εντολή που δεν έγινε εισαγωγή\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Κανάλι $channel δεν ισχύει or queryCID $queryCID δεν ισχύει or filename: $filename δεν ισχύει, $ACTION εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν ισχύει or queryCID $queryCID δεν ισχύει or filename: $filename δεν ισχύει, $ACTION εντολή που δεν έγινε εισαγωγή\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Κανάλι $channel δεν είναι ενεργό στο $server_ip, $ACTION εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν είναι ενεργό στο $server_ip, $ACTION εντολή που δεν έγινε εισαγωγή\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Κανάλι $channel δεν ισχύει or exten $exten δεν ισχύει or filename: $filename δεν ισχύει, $ACTION εντολή που δεν έγινε εισαγωγή\n";
echo "Channel $channel δεν ισχύει or exten $exten δεν ισχύει or filename: $filename δεν ισχύει, $ACTION εντολή που δεν έγινε εισαγωγή\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";}
if ($format=='debug') {echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+12 -12
View File
@@ -214,17 +214,17 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
### No vicidial_timeclock_status record found, insert one
$stmt="INSERT INTO vicidial_timeclock_status set status='ΕΝΑΡΞΗ', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
$stmt="INSERT INTO vicidial_timeclock_status set status='START', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$status='ΕΝΑΡΞΗ';
$status='START';
$totTIME_HMS='0:00:00';
$affected_rows = mysql_affected_rows($link);
print "<!-- ΝΕΟ vicidial_timeclock_status record inserted for $user: |$affected_rows| -->\n";
}
if ( ($last_action_sec < 30) and ($status != 'ΕΝΑΡΞΗ') )
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30δευτερόλεπτα of your last login/logout
### You cannot log in or out within 30 δευτερόλεπτα of your last login/logout
$VDdisplayMESSAGE = "Δεν μπορείτε να συνδεθείτε ή να αναφέρονται μέσα σε 30 δευτερόλεπτα από την τελευταία σας login ή logout";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTOΑΠΟΣΥΝΔΕΣΗ') or ($status=='ΕΝΑΡΞΗ') or ($status=='ΑΠΟΣΥΝΔΕΣΗ') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -296,7 +296,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$LOGtimeMESSAGE = "Έχετε αποσυνδεθεί από την$NOW_TIME<BR>Ποσό φορά που ήταν συνδεδεμένος στο:$totTIME_HMS";
### Add a record to the timeclock log
$stmt="INSERT INTO vicidial_timeclock_log set event='ΑΠΟΣΥΝΔΕΣΗ', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -311,14 +311,14 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_log record updated for $user: |$affected_rows| -->\n";
### Update the user's timeclock status record
$stmt="UPDATE vicidial_timeclock_status set status='ΑΠΟΣΥΝΔΕΣΗ', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
$stmt="UPDATE vicidial_timeclock_status set status='LOGOUT', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
print "<!-- vicidial_timeclock_status record updated for $user: |$affected_rows| -->\n";
### Add a record to the timeclock audit log
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='ΑΠΟΣΥΝΔΕΣΗ', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTOΑΠΟΣΥΝΔΕΣΗ') or ($status=='ΕΝΑΡΞΗ') or ($status=='ΑΠΟΣΥΝΔΕΣΗ') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "ERROR: timeclock καταχώρηση αρχείου καταγραφής που έχουν ήδη πραγματοποιηθεί:$status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTOΑΠΟΣΥΝΔΕΣΗ') or ($status=='ΕΝΑΡΞΗ') or ($status=='ΑΠΟΣΥΝΔΕΣΗ') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Ο χρόνος από την τελευταία φορά που είναι συνδεδεμένος στο:$totTIME_HMS";
$log_action = 'login';
@@ -377,8 +377,8 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{
$VDdisplayMESSAGE = "Χρονικό διάστημα σας έχει συνδεθεί σε:$totTIME_HMS";
$log_action = 'logout';
$button_name = 'ΑΠΟΣΥΝΔΕΣΗ';
$LOGtimeMESSAGE = "Μπορείτε συνδεδεμένος στην διεύθυνση: $last_action_date<BR>Χρονικό διάστημα σας έχει συνδεθεί σε:$totTIME_HMS<BR><BR>Κάντε κλικ παρακάτω για να ΑΠΟΣΥΝΔΕΣΗ log-out";
$button_name = 'LOGOUT';
$LOGtimeMESSAGE = "Μπορείτε συνδεδεμένος στην διεύθυνση: $last_action_date<BR>Χρονικό διάστημα σας έχει συνδεθεί σε:$totTIME_HMS<BR><BR>Κάντε κλικ παρακάτω για να LOGOUT log-out";
}
echo"<HTML><HEAD>\n";
+136 -70
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -589,13 +598,13 @@ if ($ACTION == 'LogiNCamPaigns')
$rowx=mysql_fetch_row($rslt);
$last_agent_event = $rowx[0];
}
if ( (strlen($last_agent_event)<2) or (ereg('ΑΠΟΣΥΝΔΕΣΗ',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{$show_campaign_list=0;}
}
}
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
if ( ( (ereg("ΕΝΑΡΞΗ|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("ΕΝΑΡΞΗ|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1854,7 +1863,7 @@ if ($ACTION == 'manDiaLnextCaLL')
}
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2262,7 +2271,7 @@ if ($ACTION == 'manDiaLonly')
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00048',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID δεν ισχύει\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID δεν ισχύει\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 δευτερόλεπτα, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2596,7 +2662,7 @@ if ($stage == "end")
}
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00063',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3372,7 +3438,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00098',$user,$server_ip,$session_name,$one_mysql_log);}
echo "REC_ΣΤΑΣΗ|$rec_channels[$loop_count]|$filename[$loop_count]|";
echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|";
if (strlen($filename)>2)
{
$stmt="SELECT recording_id,start_epoch,vicidial_id,lead_id FROM recording_log where filename='$filename[$loop_count]'";
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|ΕΓΓΡΑΦΗ_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4406,8 +4472,8 @@ if ($ACTION == 'userLOGout')
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
}
##### Insert a ΑΠΟΣΥΝΔΕΣΗ record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','ΑΠΟΣΥΝΔΕΣΗ','$campaign','$NOW_TIME','$StarTtime','$user_group');";
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00128',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4505,7 +4571,7 @@ if ($ACTION == 'userLOGout')
if ($vla_delete > 0)
{
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00138',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5031,7 +5097,7 @@ if ($ACTION == 'updateDISPO')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00158',$user,$server_ip,$session_name,$one_mysql_log);}
}
####### ΕΝΑΡΞΗ Vtiger Call Logging #######
####### START Vtiger Call Logging #######
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00197',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5420,7 +5486,7 @@ if ($ACTION == 'updateDISPO')
####### END Vtiger Call Logging #######
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00159',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -5792,7 +5858,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
if ( ($affected_rows > 0) or ($comments == 'NO_STATUS_CHANGE') )
{
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00167',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5994,7 +6060,7 @@ if ($ACTION == 'PauseCodeSubmit')
if ($affected_rows > 0)
{
#############################################
##### ΕΝΑΡΞΗ QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00176',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+138 -109
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls στο hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofδευτερόλεπτα for campaign call and agent stats
$campagentstatctmax = '3'; # Number of δευτερόλεπτα for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name στο login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups στο campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Κλείσιμο Πελάτη
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$ΤηλSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT ΚΛΗΣΗ by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -914,7 +916,7 @@ $VDloginDISPLAY=0;
$last_agent_event = $rowx[0];
}
if ($DB>0) {echo "|$stmt|$events_to_parse|$last_agent_event|";}
if ( (strlen($last_agent_event)<2) or (ereg('ΑΠΟΣΥΝΔΕΣΗ',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Πρέπει να συνδεθείτε ΣΤΗΝ ΠΡΩΤΗ ΤΟΥ TIMECLOCK<BR>";
@@ -923,7 +925,7 @@ $VDloginDISPLAY=0;
### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR
### BEGIN - CHECK TO SEE IF SHIFT ENFORCEMENT IS ENABLED AND AGENT IS OUTSIDE OF THEIR SHIFTS, IF SO, OUTPUT ERROR
if ( ( (ereg("ΕΝΑΡΞΗ|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("ΕΝΑΡΞΗ|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1238,23 +1240,23 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
{$dispo_check_all_pause=1;}
$quick_transfer_button_enabled=0;
if (preg_match("/IN_GROUP|PΕΠΑΝΑΦΟΡΑ_1|PΕΠΑΝΑΦΟΡΑ_2|PΕΠΑΝΑΦΟΡΑ_3|PΕΠΑΝΑΦΟΡΑ_4|PΕΠΑΝΑΦΟΡΑ_5/",$quick_transfer_button))
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$quick_transfer_button))
{$quick_transfer_button_enabled=1;}
$preset_populate='';
$prepopulate_transfer_preset_enabled=0;
if (preg_match("/PΕΠΑΝΑΦΟΡΑ_1|PΕΠΑΝΑΦΟΡΑ_2|PΕΠΑΝΑΦΟΡΑ_3|PΕΠΑΝΑΦΟΡΑ_4|PΕΠΑΝΑΦΟΡΑ_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$prepopulate_transfer_preset))
{
$prepopulate_transfer_preset_enabled=1;
if (preg_match("/PΕΠΑΝΑΦΟΡΑ_1/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_a_number;}
if (preg_match("/PΕΠΑΝΑΦΟΡΑ_2/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_2/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_b_number;}
if (preg_match("/PΕΠΑΝΑΦΟΡΑ_3/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_3/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_c_number;}
if (preg_match("/PΕΠΑΝΑΦΟΡΑ_4/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_4/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_d_number;}
if (preg_match("/PΕΠΑΝΑΦΟΡΑ_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_5/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_e_number;}
}
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER ΕΓΓΡΑΦΗING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($ΤηλSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($ΤηλSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -1912,7 +1914,7 @@ else
$SIqueryCID = "S$CIDdate$session_id";
#############################################
##### ΕΝΑΡΞΗ SYSTEM_SETTINGS LOOKUP #####
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01040',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callδευτερόλεπτα counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call δευτερόλεπτα counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'ΣΥΝΗΘΕΙΑER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -3359,7 +3361,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
showDiv('SysteMDisablEBoX');
}
if (AGLogiN == 'SHIFT_ΑΠΟΣΥΝΔΕΣΗ')
if (AGLogiN == 'SHIFT_LOGOUT')
{
shift_logout_flag=1;
}
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Κλήση εναλκού αριθμού: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">ΚΥΡΙΟ ΤΗΛΕΦΩΝΟ</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTΤηλE')\"><font class=\"preview_text\">ΕΝΑΛΛΑΚΤΙΚΟ ΤΗΛΕΦΩΝΟ</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">3ΔΙΕΥΘΥΝΣΗ</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ΤΕΛΕΙΩΣΤΕ</font></a>";
var man_status = "Κλήση εναλκού αριθμού: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">ΚΥΡΙΟ ΤΗΛΕΦΩΝΟ</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">ΕΝΑΛΛΑΚΤΙΚΟ ΤΗΛΕΦΩΝΟ</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">3ΔΙΕΥΘΥΝΣΗ</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ΤΕΛΕΙΩΣΤΕ</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Σε Κλήση: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Αναμονή για κουδούνισμα... " + MD_ring_secondS + "δευτερόλεπτα";
document.getElementById("MainStatuSSpan").innerHTML = " Σε Κλήση: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Αναμονή για κουδούνισμα... " + MD_ring_secondS + " δευτερόλεπτα";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -4666,30 +4687,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_1') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_2') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_3') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_4') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Γρήγορη μεταφορά\"></a>";
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTΤηλE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6028,7 +6049,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
}
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'ΑΠΟΣΥΝΔΕΣΗ') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'LOGOUT') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
{
PauseCodeSelectContent_create();
}
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Κανάλι has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -6507,30 +6528,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PΕΠΑΝΑΦΟΡΑ_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_1') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_2') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_3') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_4') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Γρήγορη μεταφορά\"></a>";
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLΚΛΕΙΣΙΜΟ&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTΤηλE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTΤηλE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('ΣΥΝΗΘΕΙΑER','" + document.vicidial_form.phone_number.value + "','0');return false;\">ΣΥΝΗΘΕΙΑER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -8499,10 +8520,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"ΑΠΟΣΥΝΔΕΣΗ");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('CLOSE');
alert("PLEASE CLICK THE ΑΠΟΣΥΝΔΕΣΗ LINK TO LOG OUT NEXT TIME.\n");
alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n");
}
}
@@ -8515,7 +8536,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"ΑΠΟΣΥΝΔΕΣΗ");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('NORMAL');
}
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Ανανέωση the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Ανανέωση the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER ΚΟΙΝΟΠΟΙΗΣΗ: " + timer_action_seconds + "δευτερόλεπτα<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER ΚΟΙΝΟΠΟΙΗΣΗ: " + timer_action_seconds + " δευτερόλεπτα<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Γρήγορη μεταφορά\"></a>";
}
if ( (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_1') || (quick_transfer_button == 'PΕΠΑΝΑΦΟΡΑ_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Γρήγορη μεταφορά\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">δευτερόλεπτα:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> δευτερόλεπτα:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">ΕΠΑΝΑΦΟΡΑ</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> ΕΠΑΝΑΦΟΡΑ </a> |
<a href="#" onclick="CloserSelect_submit();return false;">ΥΠΟΒΑΛΕΤΕ</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">ΕΠΑΝΑΦΟΡΑ</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> ΕΠΑΝΑΦΟΡΑ </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">ΥΠΟΒΑΛΕΤΕ</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Κανάλι</span>
<span id="DiaLDiaLAltPhonEHide">Κανάλι</span>
<span id="DiaLLeaDPrevieWHide"> Κανάλι</span>
<span id="DiaLDiaLAltPhonEHide"> Κανάλι</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> ΜΟΝΟ ΤΗΝ ΕΠΑΝΑΚΛΗΣΗ ΜΟΥ <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- χρόνος εκτέλεσης: $RUNtimeδευτερόλεπτα -->";
echo "\n<!-- χρόνος εκτέλεσης: $RUNtime δευτερόλεπτα -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";}
if ($format=='table') {echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+9 -9
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR COLGAR/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR COLGAR/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>LLAMADAS ACTIVAS EN ESTE TELÉFONO:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANAL CLIENTE</td><td><font class=\"log_title\">CANAL REMOTO</td><td><font class=\"log_title\">GRABACIÓN</td><td><font class=\"log_title\">COLGAR</td><td><font class=\"log_title\">TRANSFERENCIA</td><td><font class=\"log_title\">PARKING</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>LLAMADAS ACTIVAS EN ESTE TELÉFONO:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANAL CLIENTE</td><td><font class=\"log_title\">CANAL REMOTO</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">COLGAR</td><td><font class=\"log_title\">TRANSFERENCIA</td><td><font class=\"log_title\">PARKING</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> FECHA/HORA DE LA LLAMADA</td><td><font class=\"log_title\">NÚMERO</td><td align=right><font class=\"log_title\">LONGITUD (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> FECHA/HORA DE LA LLAMADA</td><td><font class=\"log_title\">NÚMERO</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> FECHA/HORA DE LA LLAMADA</td><td><font class=\"log_title\">NÚMERO-ENTRANTE</td><td COLSPAN=2><font class=\"log_title\">LLAMADORID</td><td align=right><font class=\"log_title\">LONGITUD</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> FECHA/HORA DE LA LLAMADA</td><td><font class=\"log_title\">NÚMERO-ENTRANTE</td><td COLSPAN=2><font class=\"log_title\">LLAMADORID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK COLGAR <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Colgar Trunk</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Capturar Trunk</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERIR LLAMADA ACTIVA</b> <BR>Canal que va a ser transferido: <span id="MainXfeRChanneL">Canal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERIR LLAMADA ACTIVA</b> <BR>Canal que va a ser transferido: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Extensiones:<BR><span id="MainXfeRContent"> Menú Extensiones </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Marcar a Extensiones LOCALES</b> <BR>Teléfono llamando desde: <span id="LocalDialChanneL">Canal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Marcar a Extensiones LOCALES</b> <BR>Teléfono llamando desde: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Extensiones:<BR><span id="LocalDialContent"> Menú Extensiones </span></td>
<td>
<BR>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">PARADA</a> | <a href="#" onclick="start();return false;">COMIENZO</a> &nbsp; &nbsp; Actualizar la tarifa: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Más rápido</a> | <a href="#" onclick="slower();return false;">Más lento</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Actualizar la tarifa: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Más rápido</a> | <a href="#" onclick="slower();return false;">Más lento</a></p>
<div id="status"><em>Inizializando..</em></div>
</td></tr>
<tr><td>Extensiones Activas <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+47 -10
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is en is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -465,7 +502,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
$Ashift_logout=0;
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|COMIENZO",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|START",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if (strlen($LOGgroup_shiftsSQL) < 3)
@@ -531,7 +568,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($AexternalDEAD > 0)
{$Alogin='DEAD_EXTERNAL';}
if ($Ashift_logout > 0)
{$Alogin='SHIFT_SALIR';}
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Estado: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$CanalA[$counter] ~";
# echo "$CanalA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+6 -6
View File
@@ -234,7 +234,7 @@ echo "<!-- VERSIÓN: $version CONSTRUCCION: $build UNIQUEID: $uniqueid
// ################################################################################
// timeout to deactivate the call action links after 30segundos
// timeout to deactivate the call action links after 30 segundos
function link_timeout()
{
window.focus();
@@ -282,8 +282,8 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Canal: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>LlamadorID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
$phone = eregi_replace(".*\<","",$row[3]);
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Canal=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">A MEDIDA</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Número Marcado: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+27 -27
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "extenName $extenName debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "extenName $extenName debe ser fijado\n";
echo "exten $exten debe ser fijado\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Canal $channel No es válido or queryCID $queryCID No es válido, Hangup comando no insertado\n";
echo "Channel $channel No es válido or queryCID $queryCID No es válido, Hangup comando no insertado\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Canal $channel no está activo en $call_server_ip, Hangup comando no insertado $rowx[0]\n$stmt\n";
echo "Channel $channel no está activo en $call_server_ip, Hangup comando no insertado $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Canal $channel in use by another agent en $call_server_ip, Hangup comando no insertado $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent en $call_server_ip, Hangup comando no insertado $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -571,7 +571,7 @@ if ($ACTION=="Hangup")
if ($rowx[0] > 0)
{
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "exten $exten debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "exten $exten debe ser fijado\n";
echo "extenName $extenName debe ser fijado\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "exten $exten debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "extenName $extenName debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "extenName $extenName debe ser fijado\n";
echo "exten $exten debe ser fijado\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "ExtraCanal $extrachannel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "ExtraChannel $extrachannel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "exten $exten debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel no está activo en $call_server_ip, Redirect comando no insertado\n";
echo "Channel $channel no está activo en $call_server_ip, Redirect comando no insertado\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n";
echo "Channel $channel no está activo en $server_ip, Redirect comando no insertado\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "ExtraCanal $extrachannel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "ExtraChannel $extrachannel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "exten $exten debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel no está activo en $call_server_ip, Redirect comando no insertado\n";
echo "Channel $channel no está activo en $call_server_ip, Redirect comando no insertado\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n";
echo "Channel $channel no está activo en $server_ip, Redirect comando no insertado\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel no está activo en $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra comando enviado a Canal $channel and \nExtraCanal $extrachannel\n to $exten en $server_ip\n";
echo "RedirectXtra comando enviado a Canal $channel and \nExtraChannel $extrachannel\n to $exten en $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten en $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra comando enviado a Canal $channel en $call_server_ip and \nExtraCanal $extrachannel\n to $exten en $server_ip\n";
echo "RedirectXtra comando enviado a Canal $channel en $call_server_ip and \nExtraChannel $extrachannel\n to $exten en $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Una de estas variables No es válido:\n";
echo "Canal $channel debe ser mayor de 2 caracteres\n";
echo "Channel $channel debe ser mayor de 2 caracteres\n";
echo "queryCID $queryCID debe ser mayor de 14 caracteres\n";
echo "exten $exten debe ser fijado\n";
echo "ext_context $ext_context debe ser fijado\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canal $channel no está activo en $server_ip, Redirect comando no insertado\n";
echo "Channel $channel no está activo en $server_ip, Redirect comando no insertado\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canal $channel No es válido or queryCID $queryCID No es válido or filename: $filename No es válido, $ACTION comando no insertado\n";
echo "Channel $channel No es válido or queryCID $queryCID No es válido or filename: $filename No es válido, $ACTION comando no insertado\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canal $channel no está activo en $server_ip, $ACTION comando no insertado\n";
echo "Channel $channel no está activo en $server_ip, $ACTION comando no insertado\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canal $channel No es válido or exten $exten No es válido or filename: $filename No es válido, $ACTION comando no insertado\n";
echo "Channel $channel No es válido or exten $exten No es válido or filename: $filename No es válido, $ACTION comando no insertado\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";}
if ($format=='debug') {echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+12 -12
View File
@@ -214,17 +214,17 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
### No vicidial_timeclock_status record found, insert one
$stmt="INSERT INTO vicidial_timeclock_status set status='COMIENZO', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
$stmt="INSERT INTO vicidial_timeclock_status set status='START', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$status='COMIENZO';
$status='START';
$totTIME_HMS='0:00:00';
$affected_rows = mysql_affected_rows($link);
print "<!-- NUEVO vicidial_timeclock_status record inserted for $user: |$affected_rows| -->\n";
}
if ( ($last_action_sec < 30) and ($status != 'COMIENZO') )
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30segundos of your last login/logout
### You cannot log in or out within 30 segundos of your last login/logout
$VDdisplayMESSAGE = "No puede iniciar sesión o en un plazo de 30 segundos de su última conexión o desconexión";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTOSALIR') or ($status=='COMIENZO') or ($status=='SALIR') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -296,7 +296,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$LOGtimeMESSAGE = "Que en la sesión$NOW_TIME<BR>Cantidad de tiempo que se han registrado en:$totTIME_HMS";
### Add a record to the timeclock log
$stmt="INSERT INTO vicidial_timeclock_log set event='SALIR', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -311,14 +311,14 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_log record updated for $user: |$affected_rows| -->\n";
### Update the user's timeclock status record
$stmt="UPDATE vicidial_timeclock_status set status='SALIR', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
$stmt="UPDATE vicidial_timeclock_status set status='LOGOUT', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
print "<!-- vicidial_timeclock_status record updated for $user: |$affected_rows| -->\n";
### Add a record to the timeclock audit log
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='SALIR', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTOSALIR') or ($status=='COMIENZO') or ($status=='SALIR') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "ERROR: timeclock entrada de registro ya realizados:$status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTOSALIR') or ($status=='COMIENZO') or ($status=='SALIR') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Vez desde que se conectó por última vez en:$totTIME_HMS";
$log_action = 'login';
@@ -377,8 +377,8 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{
$VDdisplayMESSAGE = "Cantidad de tiempo que se han registrado en:$totTIME_HMS";
$log_action = 'logout';
$button_name = 'SALIR';
$LOGtimeMESSAGE = "Iniciado la sesión en que usted en: $last_action_date<BR>Cantidad de tiempo que se han registrado en:$totTIME_HMS<BR><BR>Haga clic a continuación para acceder SALIR-out";
$button_name = 'LOGOUT';
$LOGtimeMESSAGE = "Iniciado la sesión en que usted en: $last_action_date<BR>Cantidad de tiempo que se han registrado en:$totTIME_HMS<BR><BR>Haga clic a continuación para acceder LOGOUT-out";
}
echo"<HTML><HEAD>\n";
+136 -70
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -589,13 +598,13 @@ if ($ACTION == 'LogiNCamPaigns')
$rowx=mysql_fetch_row($rslt);
$last_agent_event = $rowx[0];
}
if ( (strlen($last_agent_event)<2) or (ereg('SALIR',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{$show_campaign_list=0;}
}
}
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
if ( ( (ereg("COMIENZO|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("COMIENZO|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1854,7 +1863,7 @@ if ($ACTION == 'manDiaLnextCaLL')
}
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2262,7 +2271,7 @@ if ($ACTION == 'manDiaLonly')
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00048',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID No es válido\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID No es válido\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 segundos, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2596,7 +2662,7 @@ if ($stage == "end")
}
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00063',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3372,7 +3438,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00098',$user,$server_ip,$session_name,$one_mysql_log);}
echo "REC_PARADA|$rec_channels[$loop_count]|$filename[$loop_count]|";
echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|";
if (strlen($filename)>2)
{
$stmt="SELECT recording_id,start_epoch,vicidial_id,lead_id FROM recording_log where filename='$filename[$loop_count]'";
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|GRABACIÓN_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4406,8 +4472,8 @@ if ($ACTION == 'userLOGout')
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
}
##### Insert a SALIR record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','SALIR','$campaign','$NOW_TIME','$StarTtime','$user_group');";
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00128',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4505,7 +4571,7 @@ if ($ACTION == 'userLOGout')
if ($vla_delete > 0)
{
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00138',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5031,7 +5097,7 @@ if ($ACTION == 'updateDISPO')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00158',$user,$server_ip,$session_name,$one_mysql_log);}
}
####### COMIENZO Vtiger Call Logging #######
####### START Vtiger Call Logging #######
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00197',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5420,7 +5486,7 @@ if ($ACTION == 'updateDISPO')
####### END Vtiger Call Logging #######
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00159',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -5792,7 +5858,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
if ( ($affected_rows > 0) or ($comments == 'NO_STATUS_CHANGE') )
{
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00167',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5994,7 +6060,7 @@ if ($ACTION == 'PauseCodeSubmit')
if ($affected_rows > 0)
{
#############################################
##### COMIENZO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00176',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+139 -110
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls en hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofsegundos for campaign call and agent stats
$campagentstatctmax = '3'; # Number of segundos for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name en login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups en campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Colgar al Cliente
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TeléfonoSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT DIAL by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -914,7 +916,7 @@ $VDloginDISPLAY=0;
$last_agent_event = $rowx[0];
}
if ($DB>0) {echo "|$stmt|$events_to_parse|$last_agent_event|";}
if ( (strlen($last_agent_event)<2) or (ereg('SALIR',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "USTED DEBE ENTRAR A LA PRIMERA TIMECLOCK<BR>";
@@ -923,7 +925,7 @@ $VDloginDISPLAY=0;
### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR
### BEGIN - CHECK TO SEE IF SHIFT ENFORCEMENT IS ENABLED AND AGENT IS OUTSIDE OF THEIR SHIFTS, IF SO, OUTPUT ERROR
if ( ( (ereg("COMIENZO|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("COMIENZO|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1238,23 +1240,23 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
{$dispo_check_all_pause=1;}
$quick_transfer_button_enabled=0;
if (preg_match("/IN_GROUP|PREINICIAR_1|PREINICIAR_2|PREINICIAR_3|PREINICIAR_4|PREINICIAR_5/",$quick_transfer_button))
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$quick_transfer_button))
{$quick_transfer_button_enabled=1;}
$preset_populate='';
$prepopulate_transfer_preset_enabled=0;
if (preg_match("/PREINICIAR_1|PREINICIAR_2|PREINICIAR_3|PREINICIAR_4|PREINICIAR_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$prepopulate_transfer_preset))
{
$prepopulate_transfer_preset_enabled=1;
if (preg_match("/PREINICIAR_1/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_a_number;}
if (preg_match("/PREINICIAR_2/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_2/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_b_number;}
if (preg_match("/PREINICIAR_3/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_3/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_c_number;}
if (preg_match("/PREINICIAR_4/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_4/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_d_number;}
if (preg_match("/PREINICIAR_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_5/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_e_number;}
}
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER GRABACIÓNING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1698,7 +1700,7 @@ else
$updater_check_enabled=$row[45];
$AFLogging_enabled=$row[46];
$QUEUE_ACTION_enabled=$row[47];
$LlamadorID_popup_enabled=$row[48];
$CallerID_popup_enabled=$row[48];
$voicemail_button_enabled=$row[49];
$enable_fast_refresh=$row[50];
$fast_refresh_rate=$row[51];
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TeléfonoSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TeléfonoSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -1912,7 +1914,7 @@ else
$SIqueryCID = "S$CIDdate$session_id";
#############################################
##### COMIENZO SYSTEM_SETTINGS LOOKUP #####
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01040',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callsegundos counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call segundos counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'A MEDIDAER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -3359,7 +3361,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
showDiv('SysteMDisablEBoX');
}
if (AGLogiN == 'SHIFT_SALIR')
if (AGLogiN == 'SHIFT_LOGOUT')
{
shift_logout_flag=1;
}
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Marcar Número de teléfono Alt: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TELÉFONO PRINCIPAL</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTeléfonoE')\"><font class=\"preview_text\">TELÉFONO ALT</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">DIRECCIÓN3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ACABAR LEAD</font></a>";
var man_status = "Marcar Número de teléfono Alt: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TELÉFONO PRINCIPAL</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">TELÉFONO ALT</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">DIRECCIÓN3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ACABAR LEAD</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Llamando: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Espeerar al Ring... " + MD_ring_secondS + "segundos";
document.getElementById("MainStatuSSpan").innerHTML = " Llamando: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Espeerar al Ring... " + MD_ring_secondS + " segundos";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -4666,30 +4687,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PREINICIAR_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PREINICIAR_1') || (quick_transfer_button == 'PREINICIAR_2') || (quick_transfer_button == 'PREINICIAR_3') || (quick_transfer_button == 'PREINICIAR_4') || (quick_transfer_button == 'PREINICIAR_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"TRANSFERENCIA RÁPIDA\"></a>";
if (quick_transfer_button == 'PREINICIAR_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PREINICIAR_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PREINICIAR_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PREINICIAR_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PREINICIAR_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTeléfonoE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6028,7 +6049,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
}
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'SALIR') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'LOGOUT') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
{
PauseCodeSelectContent_create();
}
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Canal has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -6507,30 +6528,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PREINICIAR_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PREINICIAR_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PREINICIAR_1') || (quick_transfer_button == 'PREINICIAR_2') || (quick_transfer_button == 'PREINICIAR_3') || (quick_transfer_button == 'PREINICIAR_4') || (quick_transfer_button == 'PREINICIAR_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"TRANSFERENCIA RÁPIDA\"></a>";
if (quick_transfer_button == 'PREINICIAR_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PREINICIAR_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PREINICIAR_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PREINICIAR_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PREINICIAR_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLCOLGAR&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTeléfonoE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTeléfonoE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('A MEDIDAER','" + document.vicidial_form.phone_number.value + "','0');return false;\">A MEDIDAER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -8499,10 +8520,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"SALIR");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('CLOSE');
alert("PLEASE CLICK THE SALIR LINK TO LOG OUT NEXT TIME.\n");
alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n");
}
}
@@ -8515,7 +8536,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"SALIR");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('NORMAL');
}
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Recarga the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Recarga the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>NOTIFICACIÓN TIMER: " + timer_action_seconds + "segundos<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>NOTIFICACIÓN TIMER: " + timer_action_seconds + " segundos<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"TRANSFERENCIA RÁPIDA\"></a>";
}
if ( (quick_transfer_button == 'PREINICIAR_1') || (quick_transfer_button == 'PREINICIAR_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"TRANSFERENCIA RÁPIDA\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">segundos:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> segundos:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">REINICIAR</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> REINICIAR </a> |
<a href="#" onclick="CloserSelect_submit();return false;">ENVIAR</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">REINICIAR</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> REINICIAR </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">ENVIAR</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Canal</span>
<span id="DiaLDiaLAltPhonEHide">Canal</span>
<span id="DiaLLeaDPrevieWHide"> Canal</span>
<span id="DiaLDiaLAltPhonEHide"> Canal</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> MI SERVICIO REPETIDO SOLAMENTE <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- tiempo de ejecución del Script: $RUNtimesegundos -->";
echo "\n<!-- tiempo de ejecución del Script: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";}
if ($format=='table') {echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+9 -9
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR RACCROCHER/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR RACCROCHER/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>APPELS EN COURS SUR CE TELEPHONE:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANAL CLIENT</td><td><font class=\"log_title\">CANAL DISTANT</td><td><font class=\"log_title\">ENREGISTREMENT</td><td><font class=\"log_title\">RACCROCHER</td><td><font class=\"log_title\">TRANSFERT</td><td><font class=\"log_title\">MISE EN ATT</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>APPELS EN COURS SUR CE TELEPHONE:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANAL CLIENT</td><td><font class=\"log_title\">CANAL DISTANT</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">RACCROCHER</td><td><font class=\"log_title\">TRANSFERT</td><td><font class=\"log_title\">MISE EN ATT</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> APPEL DATE/TIME</td><td><font class=\"log_title\">NOMBRE</td><td align=right><font class=\"log_title\">LONGUEUR (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> APPEL DATE/TIME</td><td><font class=\"log_title\">NOMBRE</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> APPEL DATE/TIME</td><td><font class=\"log_title\">IN-NOMBRE</td><td COLSPAN=2><font class=\"log_title\">APPELANT</td><td align=right><font class=\"log_title\">LONGUEUR</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> APPEL DATE/TIME</td><td><font class=\"log_title\">IN-NOMBRE</td><td COLSPAN=2><font class=\"log_title\">APPELANT</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK RACCROCHER <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Raccrocher le Faisceau</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Intercepter le Faisceau</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERT D'APPEL EN COURS</b> <BR>Canal à transférer: <span id="MainXfeRChanneL">Canal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERT D'APPEL EN COURS</b> <BR>Canal à transférer: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Extensions:<BR><span id="MainXfeRContent"> Extensions </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Composer une Extension LOCALE</b> <BR>Téléphone appelant de: <span id="LocalDialChanneL">Canal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Composer une Extension LOCALE</b> <BR>Téléphone appelant de: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Extensions:<BR><span id="LocalDialContent"> Extensions </span></td>
<td>
<BR>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">ARRÊT</a> | <a href="#" onclick="start();return false;">DEBUT</a> &nbsp; &nbsp; Vitesse de rafraichissement: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Plus rapidement</a> | <a href="#" onclick="slower();return false;">Plus lentement</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Vitesse de rafraichissement: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Plus rapidement</a> | <a href="#" onclick="slower();return false;">Plus lentement</a></p>
<div id="status"><em>Initialisation..</em></div>
</td></tr>
<tr><td>Extensions Actives <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+47 -10
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is sur is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -465,7 +502,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
$Ashift_logout=0;
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|DEBUT",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|START",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if (strlen($LOGgroup_shiftsSQL) < 3)
@@ -531,7 +568,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($AexternalDEAD > 0)
{$Alogin='DEAD_EXTERNAL';}
if ($Ashift_logout > 0)
{$Alogin='SHIFT_DÉCONNEXION';}
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Statut: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$CanalA[$counter] ~";
# echo "$CanalA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+6 -6
View File
@@ -234,7 +234,7 @@ echo "<!-- VERSION: $version BUILD: $build UNIQUEID: $uniqueid server_i
// ################################################################################
// timeout to deactivate the call action links after 30secondes
// timeout to deactivate the call action links after 30 secondes
function link_timeout()
{
window.focus();
@@ -282,8 +282,8 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Canal: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Appelant: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
$phone = eregi_replace(".*\<","",$row[3]);
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Canal=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">COUTUME</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Numéro Composé: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanalA: $ChanneLA[$counter] ~";
echo "CanalB: $ChanneLB[$counter] ~";
echo "CanalBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+27 -27
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "extenName $extenName est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "extenName $extenName est obligatoire\n";
echo "exten $exten est obligatoire\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Canal $channel est invalide or queryCID $queryCID est invalide, Hangup commande non insérée\n";
echo "Channel $channel est invalide or queryCID $queryCID est invalide, Hangup commande non insérée\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Canal $channel n'est pas en ligne sur $call_server_ip, Hangup commande non insérée $rowx[0]\n$stmt\n";
echo "Channel $channel n'est pas en ligne sur $call_server_ip, Hangup commande non insérée $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Canal $channel in use by another agent sur $call_server_ip, Hangup commande non insérée $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent sur $call_server_ip, Hangup commande non insérée $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -571,7 +571,7 @@ if ($ACTION=="Hangup")
if ($rowx[0] > 0)
{
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "exten $exten est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "exten $exten est obligatoire\n";
echo "extenName $extenName est obligatoire\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "exten $exten est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "extenName $extenName est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "extenName $extenName est obligatoire\n";
echo "exten $exten est obligatoire\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "ExtraCanal $extrachannel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "ExtraChannel $extrachannel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "exten $exten est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel n'est pas en ligne sur $call_server_ip, Redirect commande non insérée\n";
echo "Channel $channel n'est pas en ligne sur $call_server_ip, Redirect commande non insérée\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n";
echo "Channel $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "ExtraCanal $extrachannel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "ExtraChannel $extrachannel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "exten $exten est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canal $channel n'est pas en ligne sur $call_server_ip, Redirect commande non insérée\n";
echo "Channel $channel n'est pas en ligne sur $call_server_ip, Redirect commande non insérée\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canal $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n";
echo "Channel $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel n'est pas en ligne sur $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra commande envoyée pour Canal $channel and \nExtraCanal $extrachannel\n to $exten sur $server_ip\n";
echo "RedirectXtra commande envoyée pour Canal $channel and \nExtraChannel $extrachannel\n to $exten sur $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten sur $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra commande envoyée pour Canal $channel sur $call_server_ip and \nExtraCanal $extrachannel\n to $exten sur $server_ip\n";
echo "RedirectXtra commande envoyée pour Canal $channel sur $call_server_ip and \nExtraChannel $extrachannel\n to $exten sur $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Une de ces variables est invalide:\n";
echo "Canal $channel doit avoir plus de 2 caractères \n";
echo "Channel $channel doit avoir plus de 2 caractères \n";
echo "queryCID $queryCID doit avoir plus de 14 caractères \n";
echo "exten $exten est obligatoire\n";
echo "ext_context $ext_context est obligatoire\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canal $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n";
echo "Channel $channel n'est pas en ligne sur $server_ip, Redirect commande non insérée\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canal $channel est invalide or queryCID $queryCID est invalide or filename: $filename est invalide, $ACTION commande non insérée\n";
echo "Channel $channel est invalide or queryCID $queryCID est invalide or filename: $filename est invalide, $ACTION commande non insérée\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canal $channel n'est pas en ligne sur $server_ip, $ACTION commande non insérée\n";
echo "Channel $channel n'est pas en ligne sur $server_ip, $ACTION commande non insérée\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canal $channel est invalide or exten $exten est invalide or filename: $filename est invalide, $ACTION commande non insérée\n";
echo "Channel $channel est invalide or exten $exten est invalide or filename: $filename est invalide, $ACTION commande non insérée\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";}
if ($format=='debug') {echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+12 -12
View File
@@ -214,17 +214,17 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
### No vicidial_timeclock_status record found, insert one
$stmt="INSERT INTO vicidial_timeclock_status set status='DEBUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
$stmt="INSERT INTO vicidial_timeclock_status set status='START', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$status='DEBUT';
$status='START';
$totTIME_HMS='0:00:00';
$affected_rows = mysql_affected_rows($link);
print "<!-- NOUVEAU vicidial_timeclock_status record inserted for $user: |$affected_rows| -->\n";
}
if ( ($last_action_sec < 30) and ($status != 'DEBUT') )
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30secondes of your last login/logout
### You cannot log in or out within 30 secondes of your last login/logout
$VDdisplayMESSAGE = "Vous ne pouvez pas vous connecter ou dans un délai de 30 secondes de votre dernière connexion ou déconnexion";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTODÉCONNEXION') or ($status=='DEBUT') or ($status=='DÉCONNEXION') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -296,7 +296,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$LOGtimeMESSAGE = "Vous vous êtes connecté à$NOW_TIME<BR>Montant de temps vous avez été enregistrés dans:$totTIME_HMS";
### Add a record to the timeclock log
$stmt="INSERT INTO vicidial_timeclock_log set event='DÉCONNEXION', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -311,14 +311,14 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_log record updated for $user: |$affected_rows| -->\n";
### Update the user's timeclock status record
$stmt="UPDATE vicidial_timeclock_status set status='DÉCONNEXION', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
$stmt="UPDATE vicidial_timeclock_status set status='LOGOUT', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
print "<!-- vicidial_timeclock_status record updated for $user: |$affected_rows| -->\n";
### Add a record to the timeclock audit log
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='DÉCONNEXION', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTODÉCONNEXION') or ($status=='DEBUT') or ($status=='DÉCONNEXION') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "ERREUR: timeclock entrée de journal déjà fait:$status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTODÉCONNEXION') or ($status=='DEBUT') or ($status=='DÉCONNEXION') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Temps écoulé depuis la dernière session ont été vous-en:$totTIME_HMS";
$log_action = 'login';
@@ -377,8 +377,8 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{
$VDdisplayMESSAGE = "Montant de temps vous avez été enregistrés dans:$totTIME_HMS";
$log_action = 'logout';
$button_name = 'DÉCONNEXION';
$LOGtimeMESSAGE = "Vous vous êtes inscrit en ligne à: $last_action_date<BR>Montant de temps vous avez été enregistrés dans:$totTIME_HMS<BR><BR>Cliquez ci-dessous pour vous connecter DÉCONNEXION-out";
$button_name = 'LOGOUT';
$LOGtimeMESSAGE = "Vous vous êtes inscrit en ligne à: $last_action_date<BR>Montant de temps vous avez été enregistrés dans:$totTIME_HMS<BR><BR>Cliquez ci-dessous pour vous connecter LOGOUT-out";
}
echo"<HTML><HEAD>\n";
+136 -70
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -589,13 +598,13 @@ if ($ACTION == 'LogiNCamPaigns')
$rowx=mysql_fetch_row($rslt);
$last_agent_event = $rowx[0];
}
if ( (strlen($last_agent_event)<2) or (ereg('DÉCONNEXION',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{$show_campaign_list=0;}
}
}
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
if ( ( (ereg("DEBUT|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("DEBUT|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1854,7 +1863,7 @@ if ($ACTION == 'manDiaLnextCaLL')
}
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2262,7 +2271,7 @@ if ($ACTION == 'manDiaLonly')
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00048',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID est invalide\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID est invalide\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 secondes, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2596,7 +2662,7 @@ if ($stage == "end")
}
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00063',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3372,7 +3438,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00098',$user,$server_ip,$session_name,$one_mysql_log);}
echo "REC_ARRÊT|$rec_channels[$loop_count]|$filename[$loop_count]|";
echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|";
if (strlen($filename)>2)
{
$stmt="SELECT recording_id,start_epoch,vicidial_id,lead_id FROM recording_log where filename='$filename[$loop_count]'";
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|ENREGISTREMENT_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4406,8 +4472,8 @@ if ($ACTION == 'userLOGout')
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
}
##### Insert a DÉCONNEXION record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','DÉCONNEXION','$campaign','$NOW_TIME','$StarTtime','$user_group');";
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00128',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4505,7 +4571,7 @@ if ($ACTION == 'userLOGout')
if ($vla_delete > 0)
{
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00138',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5031,7 +5097,7 @@ if ($ACTION == 'updateDISPO')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00158',$user,$server_ip,$session_name,$one_mysql_log);}
}
####### DEBUT Vtiger Call Logging #######
####### START Vtiger Call Logging #######
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00197',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5420,7 +5486,7 @@ if ($ACTION == 'updateDISPO')
####### END Vtiger Call Logging #######
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00159',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -5792,7 +5858,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
if ( ($affected_rows > 0) or ($comments == 'NO_STATUS_CHANGE') )
{
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00167',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5994,7 +6060,7 @@ if ($ACTION == 'PauseCodeSubmit')
if ($affected_rows > 0)
{
#############################################
##### DEBUT QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00176',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+139 -110
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls sur hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofsecondes for campaign call and agent stats
$campagentstatctmax = '3'; # Number of secondes for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name sur login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups sur campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Raccrocher
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TéléphoneSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT COMPOSER by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -914,7 +916,7 @@ $VDloginDISPLAY=0;
$last_agent_event = $rowx[0];
}
if ($DB>0) {echo "|$stmt|$events_to_parse|$last_agent_event|";}
if ( (strlen($last_agent_event)<2) or (ereg('DÉCONNEXION',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Vous devez vous connecter pour timeclock LE PREMIER<BR>";
@@ -923,7 +925,7 @@ $VDloginDISPLAY=0;
### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR
### BEGIN - CHECK TO SEE IF SHIFT ENFORCEMENT IS ENABLED AND AGENT IS OUTSIDE OF THEIR SHIFTS, IF SO, OUTPUT ERROR
if ( ( (ereg("DEBUT|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("DEBUT|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1238,23 +1240,23 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
{$dispo_check_all_pause=1;}
$quick_transfer_button_enabled=0;
if (preg_match("/IN_GROUP|PREINITIALISATION_1|PREINITIALISATION_2|PREINITIALISATION_3|PREINITIALISATION_4|PREINITIALISATION_5/",$quick_transfer_button))
if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$quick_transfer_button))
{$quick_transfer_button_enabled=1;}
$preset_populate='';
$prepopulate_transfer_preset_enabled=0;
if (preg_match("/PREINITIALISATION_1|PREINITIALISATION_2|PREINITIALISATION_3|PREINITIALISATION_4|PREINITIALISATION_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$prepopulate_transfer_preset))
{
$prepopulate_transfer_preset_enabled=1;
if (preg_match("/PREINITIALISATION_1/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_1/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_a_number;}
if (preg_match("/PREINITIALISATION_2/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_2/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_b_number;}
if (preg_match("/PREINITIALISATION_3/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_3/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_c_number;}
if (preg_match("/PREINITIALISATION_4/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_4/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_d_number;}
if (preg_match("/PREINITIALISATION_5/",$prepopulate_transfer_preset))
if (preg_match("/PRESET_5/",$prepopulate_transfer_preset))
{$preset_populate = $xferconf_e_number;}
}
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER ENREGISTREMENTING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1698,7 +1700,7 @@ else
$updater_check_enabled=$row[45];
$AFLogging_enabled=$row[46];
$QUEUE_ACTION_enabled=$row[47];
$Appelant_popup_enabled=$row[48];
$CallerID_popup_enabled=$row[48];
$voicemail_button_enabled=$row[49];
$enable_fast_refresh=$row[50];
$fast_refresh_rate=$row[51];
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TéléphoneSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TéléphoneSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -1912,7 +1914,7 @@ else
$SIqueryCID = "S$CIDdate$session_id";
#############################################
##### DEBUT SYSTEM_SETTINGS LOOKUP #####
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01040',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callsecondes counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call secondes counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'COUTUMEER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -3359,7 +3361,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
showDiv('SysteMDisablEBoX');
}
if (AGLogiN == 'SHIFT_DÉCONNEXION')
if (AGLogiN == 'SHIFT_LOGOUT')
{
shift_logout_flag=1;
}
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Appel Numéro 2nd.: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TÉLÉPHONE PRINCIPAL</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTéléphoneE')\"><font class=\"preview_text\">TELEPHONE 2nd.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRESSE3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">TERMINER LA SAISIE</font></a>";
var man_status = "Appel Numéro 2nd.: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">TÉLÉPHONE PRINCIPAL</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">TELEPHONE 2nd.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRESSE3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">TERMINER LA SAISIE</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Appeler: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Attente... " + MD_ring_secondS + "secondes";
document.getElementById("MainStatuSSpan").innerHTML = " Appeler: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Attente... " + MD_ring_secondS + " secondes";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -4666,30 +4687,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PREINITIALISATION_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PREINITIALISATION_1') || (quick_transfer_button == 'PREINITIALISATION_2') || (quick_transfer_button == 'PREINITIALISATION_3') || (quick_transfer_button == 'PREINITIALISATION_4') || (quick_transfer_button == 'PREINITIALISATION_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
if (quick_transfer_button == 'PREINITIALISATION_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTéléphoneE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6028,7 +6049,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
}
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'DÉCONNEXION') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'LOGOUT') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
{
PauseCodeSelectContent_create();
}
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Canal has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -6507,30 +6528,30 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (prepopulate_transfer_preset_enabled > 0)
{
if (prepopulate_transfer_preset == 'PREINITIALISATION_1')
if (prepopulate_transfer_preset == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_2')
if (prepopulate_transfer_preset == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_3')
if (prepopulate_transfer_preset == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_4')
if (prepopulate_transfer_preset == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (prepopulate_transfer_preset == 'PREINITIALISATION_5')
if (prepopulate_transfer_preset == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
if ( (quick_transfer_button == 'PREINITIALISATION_1') || (quick_transfer_button == 'PREINITIALISATION_2') || (quick_transfer_button == 'PREINITIALISATION_3') || (quick_transfer_button == 'PREINITIALISATION_4') || (quick_transfer_button == 'PREINITIALISATION_5') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
if (quick_transfer_button == 'PREINITIALISATION_1')
if (quick_transfer_button == 'PRESET_1')
{document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_2')
if (quick_transfer_button == 'PRESET_2')
{document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_3')
if (quick_transfer_button == 'PRESET_3')
{document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_4')
if (quick_transfer_button == 'PRESET_4')
{document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;}
if (quick_transfer_button == 'PREINITIALISATION_5')
if (quick_transfer_button == 'PRESET_5')
{document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;}
}
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLRACCROCHER&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTéléphoneE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTéléphoneE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('COUTUMEER','" + document.vicidial_form.phone_number.value + "','0');return false;\">COUTUMEER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -8499,10 +8520,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"DÉCONNEXION");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('CLOSE');
alert("PLEASE CLICK THE DÉCONNEXION LINK TO LOG OUT NEXT TIME.\n");
alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n");
}
}
@@ -8515,7 +8536,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"DÉCONNEXION");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('NORMAL');
}
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Rafraichir the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Rafraichir the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER NOTIFICATION: " + timer_action_seconds + "secondes<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER NOTIFICATION: " + timer_action_seconds + " secondes<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
}
if ( (quick_transfer_button == 'PREINITIALISATION_1') || (quick_transfer_button == 'PREINITIALISATION_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Quick Transfer\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">secondes:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> secondes:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">REINITIALISATION</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> REINITIALISATION </a> |
<a href="#" onclick="CloserSelect_submit();return false;">VALIDER</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">REINITIALISATION</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> REINITIALISATION </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">VALIDER</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Canal</span>
<span id="DiaLDiaLAltPhonEHide">Canal</span>
<span id="DiaLLeaDPrevieWHide"> Canal</span>
<span id="DiaLDiaLAltPhonEHide"> Canal</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> RAPPELS PERSONNELS <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- durée d'exécution du script: $RUNtimesecondes -->";
echo "\n<!-- durée d'exécution du script: $RUNtime secondes -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- script runtime: $RUNtimesecondi -->";}
if ($format=='table') {echo "\n<!-- script runtime: $RUNtime secondi -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+9 -9
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR RIAGGANCIA/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR RIAGGANCIA/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>CHIAMATE IN CORSO SU QUESTO TELEFONO:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANALE CLIENT</td><td><font class=\"log_title\">CANALE REMOTO</td><td><font class=\"log_title\">Registrazione</td><td><font class=\"log_title\">RIAGGANCIA</td><td><font class=\"log_title\">TRASF</td><td><font class=\"log_title\">ATTESA</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>CHIAMATE IN CORSO SU QUESTO TELEFONO:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANALE CLIENT</td><td><font class=\"log_title\">CANALE REMOTO</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">RIAGGANCIA</td><td><font class=\"log_title\">TRASF</td><td><font class=\"log_title\">ATTESA</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/ORA CHIAMATA</td><td><font class=\"log_title\">NUMERO</td><td align=right><font class=\"log_title\">LUNGHEZZA (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/ORA CHIAMATA</td><td><font class=\"log_title\">NUMERO</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/ORA CHIAMATA</td><td><font class=\"log_title\">IN-NUMERO</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LUNGHEZZA</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATA/ORA CHIAMATA</td><td><font class=\"log_title\">IN-NUMERO</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK RIAGGANCIA <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Disconnetti il Trunk</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Dirotta il Trunk</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRASFERIMENTO DELLA CHIAMATA IN CORSO</b> <BR>Canale trasferito: <span id="MainXfeRChanneL">Canale</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRASFERIMENTO DELLA CHIAMATA IN CORSO</b> <BR>Canale trasferito: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Interni:<BR><span id="MainXfeRContent"> Menu Interni </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> LOCAL Interni Dial</b> <BR>Chiamata proveniente da: <span id="LocalDialChanneL">Canale</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> LOCAL Interni Dial</b> <BR>Chiamata proveniente da: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Interni:<BR><span id="LocalDialContent"> Menu Interni </span></td>
<td>
<BR>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">ARRESTO</a> | <a href="#" onclick="start();return false;">INIZIO</a> &nbsp; &nbsp; Frequenza di refresh: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Piu` veloce</a> | <a href="#" onclick="slower();return false;">Piu` lento</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Frequenza di refresh: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Piu` veloce</a> | <a href="#" onclick="slower();return false;">Piu` lento</a></p>
<div id="status"><em>Inizializzazione..</em></div>
</td></tr>
<tr><td>Interni Attivi <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+46 -9
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is su is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -465,7 +502,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
$Ashift_logout=0;
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|INIZIO",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|START",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if (strlen($LOGgroup_shiftsSQL) < 3)
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanaleA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanaleA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$CanaleA[$counter] ~";
# echo "$CanaleA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+5 -5
View File
@@ -234,7 +234,7 @@ echo "<!-- VERSIONE: $version BUILD: $build UNIQUEID: $uniqueid server_
// ################################################################################
// timeout to deactivate the call action links after 30secondi
// timeout to deactivate the call action links after 30 secondi
function link_timeout()
{
window.focus();
@@ -282,7 +282,7 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Canale: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Canale=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CLIENTE</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Numero chiamato: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "CanaleA: $ChanneLA[$counter] ~";
echo "CanaleB: $ChanneLB[$counter] ~";
echo "CanaleBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+27 -27
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "extenName $extenName deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "extenName $extenName deve essere impostato\n";
echo "exten $exten deve essere impostato\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Canale $channel non e` valido or queryCID $queryCID non e` valido, Hangup comando non inserito\n";
echo "Channel $channel non e` valido or queryCID $queryCID non e` valido, Hangup comando non inserito\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Canale $channel non e` attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n";
echo "Channel $channel non e` attivo su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Canale $channel in use by another agent su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent su $call_server_ip, Hangup comando non inserito $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -571,7 +571,7 @@ if ($ACTION=="Hangup")
if ($rowx[0] > 0)
{
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "exten $exten deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "exten $exten deve essere impostato\n";
echo "extenName $extenName deve essere impostato\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "exten $exten deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "extenName $extenName deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "extenName $extenName deve essere impostato\n";
echo "exten $exten deve essere impostato\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "ExtraCanale $extrachannel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "ExtraChannel $extrachannel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "exten $exten deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canale $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n";
echo "Channel $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canale $channel non e` attivo su $server_ip, Redirect comando non inserito\n";
echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "ExtraCanale $extrachannel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "ExtraChannel $extrachannel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "exten $exten deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Canale $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n";
echo "Channel $channel non e` attivo su $call_server_ip, Redirect comando non inserito\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Canale $channel non e` attivo su $server_ip, Redirect comando non inserito\n";
echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel non e` attivo su $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra comando inviato per Canale $channel and \nExtraCanale $extrachannel\n to $exten su $server_ip\n";
echo "RedirectXtra comando inviato per Canale $channel and \nExtraChannel $extrachannel\n to $exten su $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten su $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra comando inviato per Canale $channel su $call_server_ip and \nExtraCanale $extrachannel\n to $exten su $server_ip\n";
echo "RedirectXtra comando inviato per Canale $channel su $call_server_ip and \nExtraChannel $extrachannel\n to $exten su $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Una di queste variabili non e` valido:\n";
echo "Canale $channel deve avere piu' di 2 caratteri\n";
echo "Channel $channel deve avere piu' di 2 caratteri\n";
echo "queryCID $queryCID deve avere piu' di 14 caratteri\n";
echo "exten $exten deve essere impostato\n";
echo "ext_context $ext_context deve essere impostato\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canale $channel non e` attivo su $server_ip, Redirect comando non inserito\n";
echo "Channel $channel non e` attivo su $server_ip, Redirect comando non inserito\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canale $channel non e` valido or queryCID $queryCID non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n";
echo "Channel $channel non e` valido or queryCID $queryCID non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Canale $channel non e` attivo su $server_ip, $ACTION comando non inserito\n";
echo "Channel $channel non e` attivo su $server_ip, $ACTION comando non inserito\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Canale $channel non e` valido or exten $exten non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n";
echo "Channel $channel non e` valido or exten $exten non e` valido or filename: $filename non e` valido, $ACTION comando non inserito\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- script runtime: $RUNtimesecondi -->";}
if ($format=='debug') {echo "\n<!-- script runtime: $RUNtime secondi -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+7 -7
View File
@@ -214,17 +214,17 @@ if ( ($stage == 'login') or ($stage == 'logout') )
else
{
### No vicidial_timeclock_status record found, insert one
$stmt="INSERT INTO vicidial_timeclock_status set status='INIZIO', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
$stmt="INSERT INTO vicidial_timeclock_status set status='START', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$status='INIZIO';
$status='START';
$totTIME_HMS='0:00:00';
$affected_rows = mysql_affected_rows($link);
print "<!-- NUOVO vicidial_timeclock_status record inserted for $user: |$affected_rows| -->\n";
}
if ( ($last_action_sec < 30) and ($status != 'INIZIO') )
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30secondi of your last login/logout
### You cannot log in or out within 30 secondi of your last login/logout
$VDdisplayMESSAGE = "Non è possibile accedere o entro 30 secondi del tuo ultimo accesso o il logout";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTOLOGOUT') or ($status=='INIZIO') or ($status=='LOGOUT') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='INIZIO') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "ERRORE: orologio registro entrata già fatto:$status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTOLOGOUT') or ($status=='INIZIO') or ($status=='LOGOUT') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Tempo dallultimo registrato in:$totTIME_HMS";
$log_action = 'login';
+133 -67
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -595,7 +604,7 @@ if ($ACTION == 'LogiNCamPaigns')
}
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
if ( ( (ereg("INIZIO|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("INIZIO|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1854,7 +1863,7 @@ if ($ACTION == 'manDiaLnextCaLL')
}
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00037',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2262,7 +2271,7 @@ if ($ACTION == 'manDiaLonly')
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00048',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID non e` valido\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID non e` valido\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 secondi, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -2596,7 +2662,7 @@ if ($stage == "end")
}
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00063',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3372,7 +3438,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00098',$user,$server_ip,$session_name,$one_mysql_log);}
echo "REC_ARRESTO|$rec_channels[$loop_count]|$filename[$loop_count]|";
echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|";
if (strlen($filename)>2)
{
$stmt="SELECT recording_id,start_epoch,vicidial_id,lead_id FROM recording_log where filename='$filename[$loop_count]'";
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|Registrazione_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4505,7 +4571,7 @@ if ($ACTION == 'userLOGout')
if ($vla_delete > 0)
{
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00138',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5031,7 +5097,7 @@ if ($ACTION == 'updateDISPO')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00158',$user,$server_ip,$session_name,$one_mysql_log);}
}
####### INIZIO Vtiger Call Logging #######
####### START Vtiger Call Logging #######
$stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00197',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5420,7 +5486,7 @@ if ($ACTION == 'updateDISPO')
####### END Vtiger Call Logging #######
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00159',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -5792,7 +5858,7 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
if ( ($affected_rows > 0) or ($comments == 'NO_STATUS_CHANGE') )
{
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00167',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -5994,7 +6060,7 @@ if ($ACTION == 'PauseCodeSubmit')
if ($affected_rows > 0)
{
#############################################
##### INIZIO QUEUEMETRICS LOGGING LOOKUP #####
##### START QUEUEMETRICS LOGGING LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00176',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+107 -78
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls su hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofsecondi for campaign call and agent stats
$campagentstatctmax = '3'; # Number of secondi for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name su login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups su campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Riaggancia il cliente
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TelefonoSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT CHIAMA by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -923,7 +925,7 @@ $VDloginDISPLAY=0;
### END - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR
### BEGIN - CHECK TO SEE IF SHIFT ENFORCEMENT IS ENABLED AND AGENT IS OUTSIDE OF THEIR SHIFTS, IF SO, OUTPUT ERROR
if ( ( (ereg("INIZIO|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("INIZIO|ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("START|ALL",$shift_enforcement)) and (!ereg("OFF",$VU_agent_shift_enforcement_override)) ) or (ereg("START|ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if ( (strlen($LOGgroup_shiftsSQL) < 3) and ($VU_shift_override_flag < 1) )
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER RegistrazioneING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TelefonoSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TelefonoSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -1763,7 +1765,7 @@ else
{
$VICIDiaL_park_on_extension = "$park_ext";
$VICIDiaL_park_on_filename = "$park_file_name";
echo "<!-- CAMPAIGN CLIENTE ATTESAING: |$VICIDiaL_park_on_extension|$VICIDiaL_park_on_filename| -->\n";
echo "<!-- CAMPAIGN CUSTOM ATTESAING: |$VICIDiaL_park_on_extension|$VICIDiaL_park_on_filename| -->\n";
}
echo "<!-- CAMPAIGN DEFAULT ATTESAING: |$VICIDiaL_park_on_extension|$VICIDiaL_park_on_filename| -->\n";
@@ -1771,7 +1773,7 @@ else
if (strlen($web_form_address)>0)
{
$VICIDiaL_web_form_address = "$web_form_address";
echo "<!-- CAMPAIGN CLIENTE WEB FORM: |$VICIDiaL_web_form_address| -->\n";
echo "<!-- CAMPAIGN CUSTOM WEB FORM: |$VICIDiaL_web_form_address| -->\n";
}
else
{
@@ -1785,7 +1787,7 @@ else
if (strlen($web_form_address_two)>0)
{
$VICIDiaL_web_form_address_two = "$web_form_address_two";
echo "<!-- CAMPAIGN CLIENTE WEB FORM 2: |$VICIDiaL_web_form_address_two| -->\n";
echo "<!-- CAMPAIGN CUSTOM WEB FORM 2: |$VICIDiaL_web_form_address_two| -->\n";
}
else
{
@@ -1912,7 +1914,7 @@ else
$SIqueryCID = "S$CIDdate$session_id";
#############################################
##### INIZIO SYSTEM_SETTINGS LOOKUP #####
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,vicidial_agent_disable,allow_sipsak_messages FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01040',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callsecondi counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call secondi counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'CLIENTEER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Chiama Numero Altern.: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">NUMERO PRINCIPALE</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTelefonoE')\"><font class=\"preview_text\">NUMERO ALTERNATIVO</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">INDIRIZZO3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">Termina Contatto</font></a>";
var man_status = "Chiama Numero Altern.: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">NUMERO PRINCIPALE</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">NUMERO ALTERNATIVO</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">INDIRIZZO3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">Termina Contatto</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + " &nbsp; In attesa del Ring... " + MD_ring_secondS + "secondi";
document.getElementById("MainStatuSSpan").innerHTML = " In Chiamata: " + status_display_number + " UID: " + CIDcheck + " &nbsp; In attesa del Ring... " + MD_ring_secondS + " secondi";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTelefonoE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Canale has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLRIAGGANCIA&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefonoE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefonoE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CLIENTEER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CLIENTEER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Aggiorna the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Aggiorna the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER NOTIFICA: " + timer_action_seconds + "secondi<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER NOTIFICA: " + timer_action_seconds + " secondi<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"QUICK TRANSFER\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">secondi:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> secondi:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">RESET</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> RESET </a> |
<a href="#" onclick="CloserSelect_submit();return false;">INVIA</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">RESET</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> RESET </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">INVIA</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Canale</span>
<span id="DiaLDiaLAltPhonEHide">Canale</span>
<span id="DiaLLeaDPrevieWHide"> Canale</span>
<span id="DiaLDiaLAltPhonEHide"> Canale</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> CHIAMATABACK PERSONALE (nessun altro potra` richiamarlo) <BR>";}
@@ -10964,7 +10993,7 @@ if ( ($alt_phone_dialing) and ($auto_dial_level==0) )
FILE REGISTRAZIONE:<BR>
</center>
<font class="body_tiny"><span id="RecorDingFilename"></span></font><BR>
ID Registrazione: <font class="body_small"><span id="RecorDID"></span></font><BR>
ID RECORD: <font class="body_small"><span id="RecorDID"></span></font><BR>
<center>
<!-- <a href=\"#\" onclick=\"conf_send_recording('MonitorConf','" + head_conf + "','');return false;\">Record</a> -->
<span STYLE="background-color: <?php echo $MAIN_COLOR ?>" id="RecorDControl"><a href="#" onclick="conf_send_recording('MonitorConf',session_id,'');return false;"><IMG SRC="../agc/images/vdc_LB_startrecording.gif" border=0 alt="Start Registrazione"></a></span><BR>
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script runtime: $RUNtimesecondi -->";
echo "\n<!-- script runtime: $RUNtime secondi -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- script looptijd: $RUNtimeseconden -->";}
if ($format=='table') {echo "\n<!-- script looptijd: $RUNtime seconden -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+8 -8
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR OPHANGEN/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR OPHANGEN/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>LIVE GESPREKKEN OP DEZE TELEFOON:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CLIENT KANAAL</td><td><font class=\"log_title\">REMOTE KANAAL</td><td><font class=\"log_title\">OPENEMEN</td><td><font class=\"log_title\">OPHANGEN</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">PARKEER</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>LIVE GESPREKKEN OP DEZE TELEFOON:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CLIENT KANAAL</td><td><font class=\"log_title\">REMOTE KANAAL</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">OPHANGEN</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">PARKEER</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATUM\/TIJD GESPREK</td><td><font class=\"log_title\">NUMMER</td><td align=right><font class=\"log_title\">LENGTE (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATUM\/TIJD GESPREK</td><td><font class=\"log_title\">NUMMER</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATUM\/TIJD GESPREK</td><td><font class=\"log_title\">INKOMEND-NUMMER</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LENGTE</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATUM\/TIJD GESPREK</td><td><font class=\"log_title\">INKOMEND-NUMMER</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK OPHANGEN <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Trunk Ophangen</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Trunk Kapen</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> LIVE GESPREK DOORSCHAKELEN</b> <BR>Doorschakelkanaal: <span id="MainXfeRChanneL">Kanaal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> LIVE GESPREK DOORSCHAKELEN</b> <BR>Doorschakelkanaal: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Extenties:<BR><span id="MainXfeRContent"> Extentie Menu </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Bel Lokale Extenties</b> <BR>Telefoon belt vanaf: <span id="LocalDialChanneL">Kanaal</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Bel Lokale Extenties</b> <BR>Telefoon belt vanaf: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Extenties:<BR><span id="LocalDialContent"> Extentie Menu </span></td>
<td>
<BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+46 -9
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is op is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -531,7 +568,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($AexternalDEAD > 0)
{$Alogin='DEAD_EXTERNAL';}
if ($Ashift_logout > 0)
{$Alogin='SHIFT_UITLOGGEN';}
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$KanaalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$KanaalA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$KanaalA[$counter] ~";
# echo "$KanaalA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+5 -5
View File
@@ -234,7 +234,7 @@ echo "<!-- VERSIE: $version BUILD: $build UNIQUEID: $uniqueid server_ip
// ################################################################################
// timeout to deactivate the call action links after 30seconden
// timeout to deactivate the call action links after 30 seconden
function link_timeout()
{
window.focus();
@@ -282,7 +282,7 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Kanaal: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Kanaal=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">AANGEPAST</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Nummer Gekozen: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanaalA: $ChanneLA[$counter] ~";
echo "KanaalB: $ChanneLB[$counter] ~";
echo "KanaalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanaalA: $ChanneLA[$counter] ~";
echo "KanaalB: $ChanneLB[$counter] ~";
echo "KanaalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanaalA: $ChanneLA[$counter] ~";
echo "KanaalB: $ChanneLB[$counter] ~";
echo "KanaalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanaalA: $ChanneLA[$counter] ~";
echo "KanaalB: $ChanneLB[$counter] ~";
echo "KanaalBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "KanaalA: $ChanneLA[$counter] ~";
echo "KanaalB: $ChanneLB[$counter] ~";
echo "KanaalBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+26 -26
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "extenName $extenName moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "extenName $extenName moet ingevuld zijn\n";
echo "exten $exten moet ingevuld zijn\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Kanaal $channel is niet geldig or queryCID $queryCID is niet geldig, Hangup commando niet uitgevoerd\n";
echo "Channel $channel is niet geldig or queryCID $queryCID is niet geldig, Hangup commando niet uitgevoerd\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Kanaal $channel is niet live op $call_server_ip, Hangup commando niet uitgevoerd $rowx[0]\n$stmt\n";
echo "Channel $channel is niet live op $call_server_ip, Hangup commando niet uitgevoerd $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Kanaal $channel in use by another agent op $call_server_ip, Hangup commando niet uitgevoerd $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent op $call_server_ip, Hangup commando niet uitgevoerd $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "exten $exten moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "exten $exten moet ingevuld zijn\n";
echo "extenName $extenName moet ingevuld zijn\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "exten $exten moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "extenName $extenName moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "extenName $extenName moet ingevuld zijn\n";
echo "exten $exten moet ingevuld zijn\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "ExtraKanaal $extrachannel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "ExtraChannel $extrachannel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "exten $exten moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanaal $channel is niet live op $call_server_ip, Redirect commando niet uitgevoerd\n";
echo "Channel $channel is niet live op $call_server_ip, Redirect commando niet uitgevoerd\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is niet live op $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanaal $channel is niet live op $server_ip, Redirect commando niet uitgevoerd\n";
echo "Channel $channel is niet live op $server_ip, Redirect commando niet uitgevoerd\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is niet live op $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "ExtraKanaal $extrachannel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "ExtraChannel $extrachannel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "exten $exten moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanaal $channel is niet live op $call_server_ip, Redirect commando niet uitgevoerd\n";
echo "Channel $channel is niet live op $call_server_ip, Redirect commando niet uitgevoerd\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is niet live op $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanaal $channel is niet live op $server_ip, Redirect commando niet uitgevoerd\n";
echo "Channel $channel is niet live op $server_ip, Redirect commando niet uitgevoerd\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is niet live op $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra commando verstuurd voor Kanaal $channel and \nExtraKanaal $extrachannel\n to $exten op $server_ip\n";
echo "RedirectXtra commando verstuurd voor Kanaal $channel and \nExtraChannel $extrachannel\n to $exten op $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten op $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra commando verstuurd voor Kanaal $channel op $call_server_ip and \nExtraKanaal $extrachannel\n to $exten op $server_ip\n";
echo "RedirectXtra commando verstuurd voor Kanaal $channel op $call_server_ip and \nExtraChannel $extrachannel\n to $exten op $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Een van deze variabelen is niet geldig:\n";
echo "Kanaal $channel moet groter zijn dan 2 karakters\n";
echo "Channel $channel moet groter zijn dan 2 karakters\n";
echo "queryCID $queryCID moet groter zijn dan 14 karakters\n";
echo "exten $exten moet ingevuld zijn\n";
echo "ext_context $ext_context moet ingevuld zijn\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanaal $channel is niet live op $server_ip, Redirect commando niet uitgevoerd\n";
echo "Channel $channel is niet live op $server_ip, Redirect commando niet uitgevoerd\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Kanaal $channel is niet geldig or queryCID $queryCID is niet geldig or filename: $filename is niet geldig, $ACTION commando niet uitgevoerd\n";
echo "Channel $channel is niet geldig or queryCID $queryCID is niet geldig or filename: $filename is niet geldig, $ACTION commando niet uitgevoerd\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanaal $channel is niet live op $server_ip, $ACTION commando niet uitgevoerd\n";
echo "Channel $channel is niet live op $server_ip, $ACTION commando niet uitgevoerd\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Kanaal $channel is niet geldig or exten $exten is niet geldig or filename: $filename is niet geldig, $ACTION commando niet uitgevoerd\n";
echo "Channel $channel is niet geldig or exten $exten is niet geldig or filename: $filename is niet geldig, $ACTION commando niet uitgevoerd\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- script looptijd: $RUNtimeseconden -->";}
if ($format=='debug') {echo "\n<!-- script looptijd: $RUNtime seconden -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+8 -8
View File
@@ -224,7 +224,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30seconden of your last login/logout
### You cannot log in or out within 30 seconden of your last login/logout
$VDdisplayMESSAGE = "Je kunt niet inloggen binnen 30 seconden na je laatste in- of uitlogpoging";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTOUITLOGGEN') or ($status=='START') or ($status=='UITLOGGEN') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -296,7 +296,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$LOGtimeMESSAGE = "Je bent ingelogd op $NOW_TIME<BR>Tijd die je ingelogd bent geweest: $totTIME_HMS";
### Add a record to the timeclock log
$stmt="INSERT INTO vicidial_timeclock_log set event='UITLOGGEN', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -311,14 +311,14 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_log record updated for $user: |$affected_rows| -->\n";
### Update the user's timeclock status record
$stmt="UPDATE vicidial_timeclock_status set status='UITLOGGEN', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
$stmt="UPDATE vicidial_timeclock_status set status='LOGOUT', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
print "<!-- vicidial_timeclock_status record updated for $user: |$affected_rows| -->\n";
### Add a record to the timeclock audit log
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='UITLOGGEN', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTOUITLOGGEN') or ($status=='START') or ($status=='UITLOGGEN') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "FOUT: tijdslot log toevoeging reeds gemaakt: $status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTOUITLOGGEN') or ($status=='START') or ($status=='UITLOGGEN') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Tijd sinds je laatste login: $totTIME_HMS";
$log_action = 'login';
@@ -377,7 +377,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{
$VDdisplayMESSAGE = "Tijd dat je bent ingelogd$totTIME_HMS";
$log_action = 'logout';
$button_name = 'UITLOGGEN';
$button_name = 'LOGOUT';
$LOGtimeMESSAGE = "Je bent ingelogd om: $last_action_date<BR>Tijd dat je bent ingelogd$totTIME_HMS<BR><BR>Klik op UITLOGGEN om uit te loggen";
}
+126 -60
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -589,7 +598,7 @@ if ($ACTION == 'LogiNCamPaigns')
$rowx=mysql_fetch_row($rslt);
$last_agent_event = $rowx[0];
}
if ( (strlen($last_agent_event)<2) or (ereg('UITLOGGEN',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{$show_campaign_list=0;}
}
}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID is niet geldig\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID is niet geldig\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 seconden, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|OPENEMEN_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4406,8 +4472,8 @@ if ($ACTION == 'userLOGout')
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
}
##### Insert a UITLOGGEN record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','UITLOGGEN','$campaign','$NOW_TIME','$StarTtime','$user_group');";
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00128',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+107 -78
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls op hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofseconden for campaign call and agent stats
$campagentstatctmax = '3'; # Number of seconden for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name op login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups op campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Ophangen Klant
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TelefoonSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT BEL by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -914,7 +916,7 @@ $VDloginDISPLAY=0;
$last_agent_event = $rowx[0];
}
if ($DB>0) {echo "|$stmt|$events_to_parse|$last_agent_event|";}
if ( (strlen($last_agent_event)<2) or (ereg('UITLOGGEN',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "JE MOET EERS INLOGGEN BIJ DE TIJDKLOK<BR>";
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER OPENEMENING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TelefoonSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TelefoonSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callseconden counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call seconden counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'AANGEPASTER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -3359,7 +3361,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
showDiv('SysteMDisablEBoX');
}
if (AGLogiN == 'SHIFT_UITLOGGEN')
if (AGLogiN == 'SHIFT_LOGOUT')
{
shift_logout_flag=1;
}
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Bel Alt. Tel. Nummer: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">HOOFD TEL.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTelefoonE')\"><font class=\"preview_text\">ALT TEL.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRES3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">LEAD AFRONDEN</font></a>";
var man_status = "Bel Alt. Tel. Nummer: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">HOOFD TEL.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">ALT TEL.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRES3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">LEAD AFRONDEN</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Bellen: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Wachten op Kiestoon... " + MD_ring_secondS + "seconden";
document.getElementById("MainStatuSSpan").innerHTML = " Bellen: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Wachten op Kiestoon... " + MD_ring_secondS + " seconden";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTelefoonE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6028,7 +6049,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
}
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'UITLOGGEN') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'LOGOUT') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
{
PauseCodeSelectContent_create();
}
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Kanaal has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLOPHANGEN&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefoonE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefoonE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AANGEPASTER','" + document.vicidial_form.phone_number.value + "','0');return false;\">AANGEPASTER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -8499,10 +8520,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"UITLOGGEN");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('CLOSE');
alert("PLEASE CLICK THE UITLOGGEN LINK TO LOG OUT NEXT TIME.\n");
alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n");
}
}
@@ -8515,7 +8536,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"UITLOGGEN");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('NORMAL');
}
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Ververs the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Ververs the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER AANMELDING: " + timer_action_seconds + "seconden<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>TIMER AANMELDING: " + timer_action_seconds + " seconden<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Snelle overdracht\"></a>";
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Snelle overdracht\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">seconden:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> seconden:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">RESET</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> RESET </a> |
<a href="#" onclick="CloserSelect_submit();return false;">OPSLAAN</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">RESET</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> RESET </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">OPSLAAN</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Kanaal</span>
<span id="DiaLDiaLAltPhonEHide">Kanaal</span>
<span id="DiaLLeaDPrevieWHide"> Kanaal</span>
<span id="DiaLDiaLAltPhonEHide"> Kanaal</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> ALLEEN MIJN TERUGBELLER <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- script looptijd: $RUNtimeseconden -->";
echo "\n<!-- script looptijd: $RUNtime seconden -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";}
if ($format=='table') {echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+9 -9
View File
@@ -718,7 +718,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE TRUNK LIST FOR ROZŁĄCZ/HIJACK MENU FUNCTIONS
// LIVE TRUNK LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busytrunkhangup()
{
document.getElementById("TrunkHangupContent").innerHTML = Nactiveext;
@@ -765,7 +765,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
}
// ################################################################################
// LIVE LOCAL LIST FOR ROZŁĄCZ/HIJACK MENU FUNCTIONS
// LIVE LOCAL LIST FOR HANGUP/HIJACK MENU FUNCTIONS
function refresh_busylocalhangup()
{
document.getElementById("LocalHangupContent").innerHTML = Nactiveext;
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>AKTYWNE ROZMOWY Z TEGO TELEFONU:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">KANAŁ KLIENCKI</td><td><font class=\"log_title\">KANAŁ ZDALNY</td><td><font class=\"log_title\">NAGRYWAJ</td><td><font class=\"log_title\">ROZŁĄCZ</td><td><font class=\"log_title\">TRANSFER</td><td><font class=\"log_title\">PARKING</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>AKTYWNE ROZMOWY Z TEGO TELEFONU:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">KANAŁ KLIENCKI</td><td><font class=\"log_title\">KANAŁ ZDALNY</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">ROZŁĄCZ</td><td><font class=\"log_title\">TRANSFER</td><td><font class=\"log_title\">PARKING</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> POŁĄCZENIE DATA/CZAS</td><td><font class=\"log_title\">NUMER</td><td align=right><font class=\"log_title\">DŁUGOŚĆ (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> POŁĄCZENIE DATA/CZAS</td><td><font class=\"log_title\">NUMER</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> POŁĄCZENIE DATA/CZAS</td><td><font class=\"log_title\">IN-NUMER</td><td COLSPAN=2><font class=\"log_title\">IDROZMÓWCY</td><td align=right><font class=\"log_title\">DŁUGOŚĆ</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> POŁĄCZENIE DATA/CZAS</td><td><font class=\"log_title\">IN-NUMER</td><td COLSPAN=2><font class=\"log_title\">IDROZMÓWCY</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2734,7 +2734,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:0px;top:12px;z-index:29;" id="TrunkHangupBox">
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK ROZŁĄCZ <BR><BR>
<table border=1 bgcolor="#CDE0C2" width=600 height=500><TR><TD> TRUNK HANGUP <BR><BR>
<span id="TrunkHangupContent"> Active Trunks Menu </span><BR>
<span id="TrunkHangup_HUlink"><a href="#" onclick="busyhangup_send_hangup('Trunk');return false;">Rozłącz międzymiastową</a> &nbsp; | &nbsp; </span>
<span id="TrunkHangup_HJlink"><a href="#" onclick="busyhangup_send_redirect('Trunk','HIJACK');return false;">Przejmij międzymiastową</a> &nbsp; | &nbsp; </span>
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> AKTYWNA ROZMOWA PRZENIESIONA</b> <BR>Kanały do przeniesienia: <span id="MainXfeRChanneL">Kanał</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> AKTYWNA ROZMOWA PRZENIESIONA</b> <BR>Kanały do przeniesienia: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>NumerWenętrzny:<BR><span id="MainXfeRContent"> Menu rozszerzeń </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Wybieranie numerów wewnętrznych</b> <BR>Połączenie przychodzące z: <span id="LocalDialChanneL">Kanał</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Wybieranie numerów wewnętrznych</b> <BR>Połączenie przychodzące z: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>NumerWenętrzny:<BR><span id="LocalDialContent"> Menu rozszerzeń </span></td>
<td>
<BR>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">BATENTE</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Szybkość odswieżania: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Szybciej</a> | <a href="#" onclick="slower();return false;">Wolniej</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Szybkość odswieżania: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Szybciej</a> | <a href="#" onclick="slower();return false;">Wolniej</a></p>
<div id="status"><em>Inicjalizuje..</em></div>
</td></tr>
<tr><td>Aktywne numery wewnętrzne <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+46 -9
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is na is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -531,7 +568,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
if ($AexternalDEAD > 0)
{$Alogin='DEAD_EXTERNAL';}
if ($Ashift_logout > 0)
{$Alogin='SHIFT_WYLOGUJ';}
{$Alogin='SHIFT_LOGOUT';}
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . "\n";
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$KanałA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$KanałA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$KanałA[$counter] ~";
# echo "$KanałA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+6 -6
View File
@@ -234,7 +234,7 @@ echo "<!-- WERSJA: $version KOMPILACJA: $build UNIQUEID: $uniqueid serv
// ################################################################################
// timeout to deactivate the call action links after 30sekundy
// timeout to deactivate the call action links after 30 sekundy
function link_timeout()
{
window.focus();
@@ -282,8 +282,8 @@ else
# Zap/73|"V.I.C.I. MARKET" <7275338730>|2005-04-28 14:01:21|7274514936|Inbound direct to Matt|||||
if ($format=='debug') {echo "\n<!-- $row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]|$row[8]|$row[9]|$row[10]|$row[11]|$row[12]|$row[13]| -->";}
echo "<table width=95% cellpadding=1 cellspacing=3>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Kanał: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>IDRozmówcy: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Channel: </td><td align=left>$row[1]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>CallerID: </td><td align=left>$row[3]</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td colspan=2 align=center>\n";
$phone = eregi_replace(".*\<","",$row[3]);
@@ -305,7 +305,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_prefix=$NXX";
$local_web_callerID_QUERY_STRING.="&callerID_last4=$XXXX";
$local_web_callerID_QUERY_STRING.="&callerID_Time=$row[6]";
$local_web_callerID_QUERY_STRING.="&callerID_Kanał=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_Channel=$row[1]";
$local_web_callerID_QUERY_STRING.="&callerID_uniqueID=$row[0]";
$local_web_callerID_QUERY_STRING.="&callerID_phone_ext=$row[5]";
$local_web_callerID_QUERY_STRING.="&callerID_server_ip=$row[2]";
@@ -316,7 +316,7 @@ else
$local_web_callerID_QUERY_STRING.="&callerID_comment_c=$row[11]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_d=$row[12]";
$local_web_callerID_QUERY_STRING.="&callerID_comment_e=$row[13]";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">UŻYTKOWNIKA</a> - \n";
echo "<a href=\"$local_web_callerID_URL$local_web_callerID_QUERY_STRING\" target=\"_blank\">CUSTOM</a> - \n";
echo "</td></tr>\n";
echo "<tr bgcolor=\"#DDDDFF\"><td>Wybierany numer: </td><td align=left>$row[8]</td></tr>\n";
@@ -343,7 +343,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+16 -16
View File
@@ -165,9 +165,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -179,9 +179,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -193,9 +193,9 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
@@ -207,16 +207,16 @@ echo "$row[0]|";
{
$row=mysql_fetch_row($rslt);
echo "Conversation: $counter ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $row[0]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $row[0]|";
}
else
{
echo "Conversation: $counter ~";
echo "KanałA: $ChanneLA[$counter] ~";
echo "KanałB: $ChanneLB[$counter] ~";
echo "KanałBtrunk: $ChanneLA[$counter]|";
echo "ChannelA: $ChanneLA[$counter] ~";
echo "ChannelB: $ChanneLB[$counter] ~";
echo "ChannelBtrunk: $ChanneLA[$counter]|";
}
}
}
@@ -270,7 +270,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+26 -26
View File
@@ -320,7 +320,7 @@ if ($ACTION=="OriginateName")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "extenName $extenName musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -349,7 +349,7 @@ if ($ACTION=="OriginateNameVmail")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "extenName $extenName musi być ustawiony\n";
echo "exten $exten musi być ustawiony\n";
@@ -486,7 +486,7 @@ if ($ACTION=="Hangup")
if ( (strlen($channel)<3) or (strlen($queryCID)<15) )
{
$channel_live=0;
echo "Kanał $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Hangup komenda nie wstawiona\n";
echo "Channel $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy, Hangup komenda nie wstawiona\n";
}
else
{
@@ -527,7 +527,7 @@ if ($ACTION=="Hangup")
if ($row[0]==0)
{
$channel_live=0;
echo "Kanał $channel nie jest aktywna na $call_server_ip, Hangup komenda nie wstawiona $rowx[0]\n$stmt\n";
echo "Channel $channel nie jest aktywna na $call_server_ip, Hangup komenda nie wstawiona $rowx[0]\n$stmt\n";
}
else
{
@@ -545,7 +545,7 @@ if ($ACTION=="Hangup")
if ($row[0] > 0)
{
$channel_live=0;
echo "Kanał $channel in use by another agent na $call_server_ip, Hangup komenda nie wstawiona $rowx[0]\n$stmt\n";
echo "Channel $channel in use by another agent na $call_server_ip, Hangup komenda nie wstawiona $rowx[0]\n$stmt\n";
if ($WeBRooTWritablE > 0)
{
$fp = fopen ("./vicidial_debug.txt", "a");
@@ -694,7 +694,7 @@ if ($ACTION=="RedirectVD")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "exten $exten musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -777,7 +777,7 @@ if ($ACTION=="RedirectToPark")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "exten $exten musi być ustawiony\n";
echo "extenName $extenName musi być ustawiony\n";
@@ -807,7 +807,7 @@ if ($ACTION=="RedirectFromPark")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "exten $exten musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -831,7 +831,7 @@ if ($ACTION=="RedirectName")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "extenName $extenName musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -860,7 +860,7 @@ if ($ACTION=="RedirectNameVmail")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "extenName $extenName musi być ustawiony\n";
echo "exten $exten musi być ustawiony\n";
@@ -900,8 +900,8 @@ if ($ACTION=="RedirectXtraCXNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "ExtraKanał $extrachannel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "ExtraChannel $extrachannel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "exten $exten musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -1008,7 +1008,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n";
echo "Channel $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $call_server_ip";}
}
}
@@ -1027,7 +1027,7 @@ if ($ACTION=="RedirectXtraCXNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
echo "Channel $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $server_ip";}
}
}
@@ -1125,8 +1125,8 @@ if ($ACTION=="RedirectXtraNeW")
$channel_liveX=0;
$channel_liveY=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "ExtraKanał $extrachannel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "ExtraChannel $extrachannel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "exten $exten musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -1225,7 +1225,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveX=0;
echo "Kanał $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n";
echo "Channel $channel nie jest aktywna na $call_server_ip, Redirect komenda nie wstawiona\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $call_server_ip";}
}
}
@@ -1244,7 +1244,7 @@ if ($ACTION=="RedirectXtraNeW")
if ($rowx[0]==0)
{
$channel_liveY=0;
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
echo "Channel $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel nie jest aktywna na $server_ip";}
}
}
@@ -1257,7 +1257,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02057',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra komenda wysłana do Kanał $channel and \nExtraKanał $extrachannel\n to $exten na $server_ip\n";
echo "RedirectXtra komenda wysłana do Kanał $channel and \nExtraChannel $extrachannel\n to $exten na $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel and $extrachannel to $exten na $server_ip";}
}
else
@@ -1284,7 +1284,7 @@ if ($ACTION=="RedirectXtraNeW")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02059',$user,$server_ip,$session_name,$one_mysql_log);}
echo "RedirectXtra komenda wysłana do Kanał $channel na $call_server_ip and \nExtraKanał $extrachannel\n to $exten na $server_ip\n";
echo "RedirectXtra komenda wysłana do Kanał $channel na $call_server_ip and \nExtraChannel $extrachannel\n to $exten na $server_ip\n";
if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel/$call_server_ip and $extrachannel/$server_ip to $exten";}
}
}
@@ -1346,7 +1346,7 @@ if ($ACTION=="Redirect")
{
$channel_live=0;
echo "Jedna z tych zmiennych nie jest prawidłowy:\n";
echo "Kanał $channel musi mieć więcej niż 2 znaki\n";
echo "Channel $channel musi mieć więcej niż 2 znaki\n";
echo "queryCID $queryCID musi mieć więcje niż 14 znaków\n";
echo "exten $exten musi być ustawiony\n";
echo "ext_context $ext_context musi być ustawiony\n";
@@ -1371,7 +1371,7 @@ if ($ACTION=="Redirect")
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanał $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
echo "Channel $channel nie jest aktywna na $server_ip, Redirect komenda nie wstawiona\n";
}
}
if ($channel_live==1)
@@ -1403,7 +1403,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Kanał $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wstawiona\n";
echo "Channel $channel nie jest prawidłowy or queryCID $queryCID nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wstawiona\n";
}
else
{
@@ -1422,7 +1422,7 @@ if ( ($ACTION=="Monitor") || ($ACTION=="StopMonitor") )
if ($rowx[0]==0)
{
$channel_live=0;
echo "Kanał $channel nie jest aktywna na $server_ip, $ACTION komenda nie wstawiona\n";
echo "Channel $channel nie jest aktywna na $server_ip, $ACTION komenda nie wstawiona\n";
}
}
if ($channel_live==1)
@@ -1490,7 +1490,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
if ( (strlen($exten)<3) or (strlen($channel)<4) or (strlen($filename)<8) )
{
$channel_live=0;
echo "Kanał $channel nie jest prawidłowy or exten $exten nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wstawiona\n";
echo "Channel $channel nie jest prawidłowy or exten $exten nie jest prawidłowy or filename: $filename nie jest prawidłowy, $ACTION komenda nie wstawiona\n";
}
else
{
@@ -1673,7 +1673,7 @@ if ($ACTION=="VolumeControl")
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='debug') {echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";}
if ($format=='debug') {echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";}
if ($format=='debug') {echo "\n</body>\n</html>\n";}
exit;
+1 -1
View File
@@ -138,7 +138,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+9 -9
View File
@@ -224,7 +224,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
}
if ( ($last_action_sec < 30) and ($status != 'START') )
{
### You cannot log in or out within 30sekundy of your last login/logout
### You cannot log in or out within 30 sekundy of your last login/logout
$VDdisplayMESSAGE = "Nie można zalogować się w ciągu 30 sekund od ostatniego logowania lub wylogowywania";
echo"<HTML><HEAD>\n";
@@ -262,7 +262,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ($commit == 'YES')
{
if ( ( ($status=='AUTOWYLOGUJ') or ($status=='START') or ($status=='WYLOGUJ') ) and ($stage=='login') )
if ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='login') )
{
$VDdisplayMESSAGE = "You have now logged-in";
$LOGtimeMESSAGE = "You logged in at $NOW_TIME";
@@ -296,7 +296,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
$LOGtimeMESSAGE = "Możesz zalogować się na$NOW_TIME<BR>Czas był zalogowany w:$totTIME_HMS";
### Add a record to the timeclock log
$stmt="INSERT INTO vicidial_timeclock_log set event='WYLOGUJ', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_log set event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -311,14 +311,14 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_log record updated for $user: |$affected_rows| -->\n";
### Update the user's timeclock status record
$stmt="UPDATE vicidial_timeclock_status set status='WYLOGUJ', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
$stmt="UPDATE vicidial_timeclock_status set status='LOGOUT', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
print "<!-- vicidial_timeclock_status record updated for $user: |$affected_rows| -->\n";
### Add a record to the timeclock audit log
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='WYLOGUJ', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
$stmt="INSERT INTO vicidial_timeclock_audit_log set timeclock_id='$timeclock_id', event='LOGOUT', user='$user', user_group='$user_group', event_epoch='$StarTtimE', ip_address='$ip', login_sec='$last_action_sec', event_date='$NOW_TIME';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
@@ -332,7 +332,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
print "<!-- vicidial_timeclock_audit_log record updated for $user: |$affected_rows| -->\n";
}
if ( ( ( ($status=='AUTOWYLOGUJ') or ($status=='START') or ($status=='WYLOGUJ') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
if ( ( ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') ) and ($stage=='logout') ) or ( ($status=='LOGIN') and ($stage=='login') ) )
{echo "ERROR: timeclock wpisu już wykonane:$status|$stage"; exit;}
if ($referrer=='agent')
@@ -366,7 +366,7 @@ if ( ($stage == 'login') or ($stage == 'logout') )
if ( ($status=='AUTOWYLOGUJ') or ($status=='START') or ($status=='WYLOGUJ') )
if ( ($status=='AUTOLOGOUT') or ($status=='START') or ($status=='LOGOUT') )
{
$VDdisplayMESSAGE = "Czas od twojego ostatniego logowania w:$totTIME_HMS";
$log_action = 'login';
@@ -377,8 +377,8 @@ if ( ($stage == 'login') or ($stage == 'logout') )
{
$VDdisplayMESSAGE = "Kwota czas były rejestrowane w:$totTIME_HMS";
$log_action = 'logout';
$button_name = 'WYLOGUJ';
$LOGtimeMESSAGE = "Możesz zalogować się na stronie: $last_action_date<BR>Kwota czas były rejestrowane w:$totTIME_HMS<BR><BR>Kliknij poniżej, aby zalogować WYLOGUJ-out";
$button_name = 'LOGOUT';
$LOGtimeMESSAGE = "Możesz zalogować się na stronie: $last_action_date<BR>Kwota czas były rejestrowane w:$totTIME_HMS<BR><BR>Kliknij poniżej, aby zalogować LOGOUT-out";
}
echo"<HTML><HEAD>\n";
+127 -61
View File
@@ -12,7 +12,7 @@
# - $pass
# optional variables:
# - $format - ('text','debug')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $ACTION - ('regCLOSER','regTERRITORY','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCaLL','manDiaLlogCALL','userLOGout','updateDISPO','updateLEAD','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview','CALLSINQUEUEview','CALLSINQUEUEgrab','DiaLableLeaDsCounT','UpdateFields')
# - $stage - ('start','finish','lookup','new')
# - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -')
# - $conf_exten - ('8600011',...)
@@ -85,6 +85,8 @@
# - $vtiger_callback_id - ('16534'...)
# - $nodeletevdac - ('0','1')
# - $agent_territories - ('ABC001','ABC002'...)
# - $alt_num_status - ('0','1')
# - $DiaL_SecondS - ('0','1','2',...)
#
# CHANGELOG:
# 50629-1044 - First build of script
@@ -226,12 +228,14 @@
# 91228-1340 - Added API fields update functions
# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100104-1509 - Fixed vicidial_log duplicate check to allow update if dup and logging update
# 100109-0745 - Added alt_num_status for ALTNUM dialing status
# 100109-1336 - Fixed Manual dial live call detection
#
$version = '2.2.0-136';
$build = '100104-1509';
$version = '2.2.0-138';
$build = '100109-1336';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=290;
$mysql_log_count=296;
$one_mysql_log=0;
require("dbconnect.php");
@@ -407,6 +411,11 @@ if (isset($_GET["nodeletevdac"])) {$nodeletevdac=$_GET["nodeletevdac"];}
elseif (isset($_POST["nodeletevdac"])) {$nodeletevdac=$_POST["nodeletevdac"];}
if (isset($_GET["agent_territories"])) {$agent_territories=$_GET["agent_territories"];}
elseif (isset($_POST["agent_territories"])) {$agent_territories=$_POST["agent_territories"];}
if (isset($_GET["alt_num_status"])) {$alt_num_status=$_GET["alt_num_status"];}
elseif (isset($_POST["alt_num_status"])) {$alt_num_status=$_POST["alt_num_status"];}
if (isset($_GET["DiaL_SecondS"])) {$DiaL_SecondS=$_GET["DiaL_SecondS"];}
elseif (isset($_POST["DiaL_SecondS"])) {$DiaL_SecondS=$_POST["DiaL_SecondS"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -589,7 +598,7 @@ if ($ACTION == 'LogiNCamPaigns')
$rowx=mysql_fetch_row($rslt);
$last_agent_event = $rowx[0];
}
if ( (strlen($last_agent_event)<2) or (ereg('WYLOGUJ',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{$show_campaign_list=0;}
}
}
@@ -2316,61 +2325,115 @@ if ($ACTION == 'manDiaLonly')
################################################################################
### manDiaLlookCALL - for manual VICIDiaL dialing this will attempt to look up
### manDiaLlookCaLL - for manual VICIDiaL dialing this will attempt to look up
### the trunk channel that the call was placed on
################################################################################
if ($ACTION == 'manDiaLlookCaLL')
{
{
$MT[0]='';
$row=''; $rowx='';
if (strlen($MDnextCID)<18)
{
echo "NO\n";
echo "MDnextCID $MDnextCID nie jest prawidłowy\n";
exit;
}
else
{
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
$call_good=0;
if (strlen($MDnextCID)<18)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
echo "$uniqueid\n$channel";
$wait_sec=0;
$stmt = "select wait_epoch,wait_sec from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "NO\n";
echo "MDnextCID $MDnextCID nie jest prawidłowy\n";
exit;
}
else
{
echo "NO\n";
##### look for the channel in the UPDATED vicidial_manager record of the call initiation
$stmt="SELECT uniqueid,channel FROM vicidial_manager where callerid='$MDnextCID' and server_ip='$server_ip' and status IN('UPDATED','DEAD') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00052',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
if ($VM_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid =$row[0];
$channel =$row[1];
$call_output = "$uniqueid\n$channel\n";
$call_good++;
}
else
{
### after 10 sekundy, start checking for call termination in the carrier log
if ( ($DiaL_SecondS > 0) and (preg_match("/0$/",$DiaL_SecondS)) )
{
$stmt="SELECT uniqueid,channel,end_epoch FROM call_log where caller_code='$MDnextCID' and server_ip='$server_ip' order by start_time desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00291',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VM_mancallX_ct = mysql_num_rows($rslt);
if ($VM_mancallX_ct > 0)
{
$row=mysql_fetch_row($rslt);
$uniqueid = $row[0];
$channel = $row[1];
$end_epoch = $row[2];
### Local channel hung up, check carrier log for error
if ($end_epoch > 1000)
{
$stmt="SELECT dialstatus,hangup_cause FROM vicidial_carrier_log where uniqueid='$uniqueid' and server_ip='$server_ip' and channel='$channel' and dialstatus IN('BUSY','CHANUNAVAIL','CONGESTION') LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00292',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$CL_mancall_ct = mysql_num_rows($rslt);
if ($CL_mancall_ct > 0)
{
$row=mysql_fetch_row($rslt);
$dialstatus =$row[0];
$hangup_cause =$row[1];
$channel = $dialstatus . "-" . $hangup_cause;
$call_output = "$uniqueid\n$channel\nERROR";
$call_good++;
### Delete call record
$stmt="DELETE from vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00293',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
}
}
if ($call_good > 0)
{
$wait_sec=0;
$dead_epochSQL = '';
$stmt = "select wait_epoch,wait_sec,dead_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00053',$user,$server_ip,$session_name,$one_mysql_log);}
$VDpr_ct = mysql_num_rows($rslt);
if ($VDpr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$wait_sec = (($StarTtime - $row[0]) + $row[1]);
$now_dead_epoch = $row[2];
if ( ($now_dead_epoch > 1000) and ($now_dead_epoch < $StarTtime) )
{$dead_epochSQL = ",dead_epoch='$StarTtime'";}
}
$stmt="UPDATE vicidial_agent_log set wait_sec='$wait_sec',wait_epoch='$StarTtime',talk_epoch='$StarTtime',lead_id='$lead_id' $dead_epochSQL where agent_log_id='$agent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00054',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_auto_calls set uniqueid='$uniqueid',channel='$channel' where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00055',$user,$server_ip,$session_name,$one_mysql_log);}
echo "$call_output";
}
else
{echo "NO\n$DiaL_SecondS\n";}
}
}
}
@@ -2481,6 +2544,9 @@ if ($stage == "start")
if ($stage == "end")
{
$status_dispo = 'DISPO';
if ($alt_num_status > 0)
{$status_dispo = 'ALTNUM';}
##### get call type from vicidial_live_agents table
$VLA_inOUT='NONE';
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
@@ -2578,7 +2644,7 @@ if ($stage == "end")
if ($VLA_inOUT == 'INBOUND')
{
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00062',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3155,7 +3221,7 @@ if ($stage == "end")
}
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
$stmt="UPDATE vicidial_log set $SQLterm end_epoch='$StarTtime', length_in_sec='$length_in_sec', status='$status_dispo' where uniqueid='$uniqueid' and lead_id='$lead_id' and user='$user' order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00090',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3204,7 +3270,7 @@ if ($stage == "end")
if (strlen($SQLterm) > 0)
{
##### update the duration and end time in the vicidial_log table
$stmt="UPDATE vicidial_closer_log set $SQLterm where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$stmt="UPDATE vicidial_closer_log set $SQLterm, status='$status_dispo' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00092',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -3372,7 +3438,7 @@ if ($stage == "end")
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00098',$user,$server_ip,$session_name,$one_mysql_log);}
echo "REC_BATENTE|$rec_channels[$loop_count]|$filename[$loop_count]|";
echo "REC_STOP|$rec_channels[$loop_count]|$filename[$loop_count]|";
if (strlen($filename)>2)
{
$stmt="SELECT recording_id,start_epoch,vicidial_id,lead_id FROM recording_log where filename='$filename[$loop_count]'";
@@ -3416,7 +3482,7 @@ if ($stage == "end")
echo "$recording_id|$length_in_min|";
# $fp = fopen ("./recording_debug_$NOW_DATE$txt", "a");
# fwrite ($fp, "$NOW_TIME|NAGRYWAJ_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fwrite ($fp, "$NOW_TIME|RECORD_LOG|$filename[$loop_count]|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$VDIDselect|\n");
# fclose($fp);
}
else {echo "||";}
@@ -4335,7 +4401,7 @@ if ($ACTION == 'VDADcheckINCOMING')
##### BEGIN special filtering and response for Vtiger account balance function #####
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00294',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -4358,7 +4424,7 @@ if ($ACTION == 'VDADcheckINCOMING')
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='3 minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);}
$vla_update_timer = mysql_affected_rows($link);
$fp = fopen ("./call_url_log.txt", "a");
@@ -4406,8 +4472,8 @@ if ($ACTION == 'userLOGout')
$row=mysql_fetch_row($rslt);
$user_group = trim("$row[0]");
}
##### Insert a WYLOGUJ record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','WYLOGUJ','$campaign','$NOW_TIME','$StarTtime','$user_group');";
##### Insert a LOGOUT record into the user log
$stmt="INSERT INTO vicidial_user_log (user,event,campaign_id,event_date,event_epoch,user_group) values('$user','LOGOUT','$campaign','$NOW_TIME','$StarTtime','$user_group');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00128',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -4577,7 +4643,7 @@ if ($ACTION == 'userLOGout')
################################################################################
### updateDISPO - update the vicidial_list table to reflect the agent choice of
### call disposition for that leand
### call disposition for that lead
################################################################################
if ($ACTION == 'updateDISPO')
{
@@ -5616,7 +5682,7 @@ if ($ACTION == 'updateDISPO')
$stmt = "SELECT enable_vtiger_integration FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00296',$user,$server_ip,$session_name,$one_mysql_log);}
$ss_conf_ct = mysql_num_rows($rslt);
if ($ss_conf_ct > 0)
{
@@ -6503,7 +6569,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+109 -80
View File
@@ -172,7 +172,7 @@
# 80331-1433 - Added second transfer try for VICIDIAL transfers/hangups on manual dial calls
# 80402-0121 - Fixes for manual dial transfers on some systems
# 80407-2112 - Work on adding phone login load balancing across servers
# 80416-0559 - Added ability to log computer_ip at login, set the $PhoneSComPIP variable
# 80416-0559 - Added ability to log computer_ip at login, set the $PhonESComPIP variable
# 80428-0413 - UTF8 changes and testing
# 80505-0054 - Added multi-phones load-balanced alias option
# 80507-0932 - Fixed Script display bug (+ instead of space)
@@ -269,10 +269,12 @@
# 91228-1339 - Added API "fields update" functions and "timer action" functions
# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs
# 100107-0108 - Added dynamic screen size based on login screen browser dimensions
# 100109-0801 - Added ALTNUM alt number status, fixed alt number dialing from setting
# 100109-1338 - Fixed Manual dial live call detection
#
$version = '2.2.0-247';
$build = '100107-0108';
$version = '2.2.0-249';
$build = '100109-1338';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=64;
$one_mysql_log=0;
@@ -391,7 +393,7 @@ $view_scripts = '1'; # set to 1 to show the SCRIPTS tab
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
$callholdstatus = '1'; # set to 1 to show calls na hold count
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
$campagentstatctmax = '3'; # Number ofsekundy for campaign call and agent stats
$campagentstatctmax = '3'; # Number of sekundy for campaign call and agent stats
$show_campname_pulldown = '1'; # set to 1 to show campaign name na login pulldown
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
@@ -403,7 +405,7 @@ $LogiNAJAX = '1'; # set to 1 to do lookups na campaigns for login
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$hangup_all_non_reserved= '1'; # set to 1 to force hangup all non-reserved channels upon Odłącz kilenta
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$TelefonSComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$PhonESComPIP = '1'; # set to 1 to log computer IP to phone if blank, set to 2 to force log each login
$DefaulTAlTDiaL = '0'; # set to 1 to enable ALT WYBIERZ by default if enabled for the campaign
$AgentAlert_allowed = '1'; # set to 1 to allow Agent alert option
$disable_blended_checkbox='0'; # set to 1 to disable the BLENDED checkbox from the in-group chooser screen
@@ -914,7 +916,7 @@ $VDloginDISPLAY=0;
$last_agent_event = $rowx[0];
}
if ($DB>0) {echo "|$stmt|$events_to_parse|$last_agent_event|";}
if ( (strlen($last_agent_event)<2) or (ereg('WYLOGUJ',$last_agent_event)) )
if ( (strlen($last_agent_event)<2) or (ereg('LOGOUT',$last_agent_event)) )
{
$VDloginDISPLAY=1;
$VDdisplayMESSAGE = "Należy zalogować się do TIMECLOCK PIERWSZEJ<BR>";
@@ -1287,7 +1289,7 @@ echo "<TD WIDTH=100 ALIGN=RIGHT VALIGN=TOP NOWRAP><a href=\"../agc_en/vicidial.
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
$campaign_recording = $VU_vicidial_recording_override;
echo "<!-- USER NAGRYWAJING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
echo "<!-- USER RECORDING OVERRIDE: |$VU_vicidial_recording_override|$campaign_recording| -->\n";
}
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1698,7 +1700,7 @@ else
$updater_check_enabled=$row[45];
$AFLogging_enabled=$row[46];
$QUEUE_ACTION_enabled=$row[47];
$IDRozmówcy_popup_enabled=$row[48];
$CallerID_popup_enabled=$row[48];
$voicemail_button_enabled=$row[49];
$enable_fast_refresh=$row[50];
$fast_refresh_rate=$row[51];
@@ -1718,7 +1720,7 @@ else
{
$no_empty_session_warnings=1;
}
if ($TelefonSComPIP == '1')
if ($PhonESComPIP == '1')
{
if (strlen($computer_ip) < 4)
{
@@ -1728,7 +1730,7 @@ else
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01026',$VD_login,$server_ip,$session_name,$one_mysql_log);}
}
}
if ($TelefonSComPIP == '2')
if ($PhonESComPIP == '2')
{
$stmt="UPDATE phones SET computer_ip='$ip' where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
@@ -2226,7 +2228,7 @@ $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference
$HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks
$CQwidth = ($MASTERwidth + 300); # 730 - calls in queue listings
$AMwidth = ($MASTERwidth + 270); # 700 - preset-dial links
$SCwidth = ($MASTERwidth + 230); # 670 - live callsekundy counter, sidebar link
$SCwidth = ($MASTERwidth + 230); # 670 - live call sekundy counter, sidebar link
$MUwidth = ($MASTERwidth + 180); # 610 - agent mute
$SSwidth = ($MASTERwidth + 176); # 606 - scroll script
$SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session
@@ -3019,7 +3021,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{threeway_cid = campaign_cid;}
if (three_way_call_cid == 'AGENT_PHONE')
{threeway_cid = outbound_cid;}
if (three_way_call_cid == 'UŻYTKOWNIKAER')
if (three_way_call_cid == 'CUSTOMER')
{threeway_cid = document.vicidial_form.phone_number.value;}
if (three_way_call_cid == 'AGENT_CHOOSE')
{
@@ -3359,7 +3361,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
showDiv('SysteMDisablEBoX');
}
if (AGLogiN == 'SHIFT_WYLOGUJ')
if (AGLogiN == 'SHIFT_LOGOUT')
{
shift_logout_flag=1;
}
@@ -4091,6 +4093,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Insert or update the vicidial_log entry for a customer call
function DialLog(taskMDstage,nodeletevdac)
{
var alt_num_status = 0;
if (taskMDstage == "start")
{
var MDlogEPOCH = 0;
@@ -4107,10 +4110,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)
{
alt_num_status = 1;
reselect_alt_dial = 1;
alt_dial_active = 1;
alt_dial_status_display = 1;
var man_status = "Zadzwoń pod numer alt.: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">NUMER PODSTAWOWY</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTTelefonE')\"><font class=\"preview_text\">NUMER ALT.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRES3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ZAKOŃCZ WPROWADZANIE DANYCH</font></a>";
var man_status = "Zadzwoń pod numer alt.: <a href=\"#\" onclick=\"ManualDialOnly('MaiNPhonE')\"><font class=\"preview_text\">NUMER PODSTAWOWY</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('ALTPhonE')\"><font class=\"preview_text\">NUMER ALT.</font></a> or <a href=\"#\" onclick=\"ManualDialOnly('AddresS3')\"><font class=\"preview_text\">ADRES3</font></a> or <a href=\"#\" onclick=\"ManualDialAltDonE()\"><font class=\"preview_text_red\">ZAKOŃCZ WPROWADZANIE DANYCH</font></a>";
document.getElementById("MainStatuSSpan").innerHTML = man_status;
}
}
@@ -4135,14 +4139,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp)
{
{
manDiaLlog_query = "format=text&server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlogCaLL&stage=" + taskMDstage + "&uniqueid=" + document.vicidial_form.uniqueid.value +
"&user=" + user + "&pass=" + pass + "&campaign=" + campaign +
"&lead_id=" + document.vicidial_form.lead_id.value +
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac;
"&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway + "&hangup_all_non_reserved=" + hangup_all_non_reserved + "&blind_transfer=" + blind_transfer + "&dial_method" + dial_method + "&nodeletevdac=" + nodeletevdac + "&alt_num_status=" + alt_num_status;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -4376,14 +4380,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Open up a callback customer record as manual dial preview mode
function new_callback_call(taskCBid,taskLEADid)
{
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
hideDiv('CallBacKsLisTBox');
ManualDialNext(taskCBid,taskLEADid,'','','','0');
}
@@ -4455,7 +4460,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
agent_dialed_number=1;
@@ -4463,11 +4467,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (tempDiaLnow == 'PREVIEW')
{
// alt_phone_dialing=1;
agent_dialed_type='MANUAL_PREVIEW';
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=true;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
}
else
{
@@ -4505,14 +4511,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
agent_dialed_number=1;
agent_dialed_type='MANUAL_DIALFAST';
alt_phone_dialing=1;
// alt_phone_dialing=1;
auto_dial_level=0;
manual_dial_in_progress=1;
MainPanelToFront();
buildDiv('DiaLLeaDPrevieW');
buildDiv('DiaLDiaLAltPhonE');
if (alt_phone_dialing == 1)
{buildDiv('DiaLDiaLAltPhonE');}
document.vicidial_form.LeadPreview.checked=false;
document.vicidial_form.DiaLAltPhonE.checked=true;
// document.vicidial_form.DiaLAltPhonE.checked=true;
ManualDialNext("","",MDDiaLCodEform,MDPhonENumbeRform,MDLookuPLeaD,MDVendorLeadCode,'0');
}
}
@@ -4550,7 +4557,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value;
manDiaLlook_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLlookCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&MDnextCID=" + CIDcheck + "&agent_log_id=" + agent_log_id + "&lead_id=" + document.vicidial_form.lead_id.value + "&DiaL_SecondS=" + MD_ring_secondS;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLlook_query);
@@ -4574,7 +4581,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alt_dial_status_display=='0')
{
// alert(document.getElementById("MainStatuSSpan").innerHTML);
document.getElementById("MainStatuSSpan").innerHTML = " Dzwoni: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Czeka na dzwonek... " + MD_ring_secondS + "sekundy";
document.getElementById("MainStatuSSpan").innerHTML = " Dzwoni: " + status_display_number + " UID: " + CIDcheck + " &nbsp; Czeka na dzwonek... " + MD_ring_secondS + " sekundy";
// alert("channel not found yet:\n" + campaign);
}
}
@@ -4584,6 +4591,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
XDuniqueid = MDlookResponse_array[0];
XDchannel = MDlookResponse_array[1];
var XDalert = MDlookResponse_array[2];
if (XDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + XDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (XDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') && (MD_ring_secondS < 10) )
{
// bad grab of Local channel, try again
@@ -4620,6 +4634,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
MDuniqueid = MDlookResponse_array[0];
MDchannel = MDlookResponse_array[1];
var MDalert = MDlookResponse_array[2];
if (MDalert == 'ERROR')
{
var DiaLAlerTMessagE = "Call Rejected: " + MDchannel;
TimerActionRun("DiaLAlerT",DiaLAlerTMessagE);
}
if ( (MDchannel.match(regMDL)) && (asterisk_version != '1.0.8') && (asterisk_version != '1.0.9') )
{
// bad grab of Local channel, try again
@@ -5751,7 +5772,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
all_record = 'NO';
all_record_count=0;
var usegroupalias=0;
if (taskaltnum == 'ALTTelefonE')
if (taskaltnum == 'ALTPhonE')
{
var manDiaLonly_num = document.vicidial_form.alt_phone.value;
lead_dial_number = document.vicidial_form.alt_phone.value;
@@ -6028,7 +6049,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
}
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'WYLOGUJ') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
if ( (agent_pause_codes_active=='FORCE') && (temp_reason != 'LOGOUT') && (temp_reason != 'REQUEUE') && (temp_reason != 'DIALNEXT') )
{
PauseCodeSelectContent_create();
}
@@ -6124,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
else
{
// alert("Kanał has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
// alert("Channel has changed from:\n" + lastcustchannel + '|' + lastcustserverip + "\nto:\n" + reVDIC_data_VDAC[3] + '|' + reVDIC_data_VDAC[4]);
document.vicidial_form.callchannel.value = reVDIC_data_VDAC[3];
lastcustchannel = reVDIC_data_VDAC[3];
document.vicidial_form.callserverip.value = reVDIC_data_VDAC[4];
@@ -7262,7 +7283,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var queryCID = "HLvdcW" + epoch_sec + user_abb;
var hangupvalue = customer_channel;
// alert(auto_dial_level + "|" + CalLCID + "|" + customer_server_ip + "|" + hangupvalue + "|" + VD_live_call_secondS);
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLROZŁĄCZ&nodeletevdac=" + nodeletevdac;
custhangup_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=Hangup&format=text&user=" + user + "&pass=" + pass + "&channel=" + hangupvalue + "&call_server_ip=" + customer_server_ip + "&queryCID=" + queryCID + "&auto_dial_level=" + auto_dial_level + "&CalLCID=" + CalLCID + "&secondS=" + VD_live_call_secondS + "&exten=" + session_id + "&campaign=" + group + "&stage=CALLHANGUP&nodeletevdac=" + nodeletevdac;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(custhangup_query);
@@ -7375,7 +7396,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefonE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7413,7 +7434,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
reselect_alt_dial = 1;
if (altdispo == 'ALTPH2')
{
ManualDialOnly('ALTTelefonE');
ManualDialOnly('ALTPhonE');
}
else
{
@@ -7752,7 +7773,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
VD_group_aliases_ct_half = (VD_group_aliases_ct_half - 1);
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CAMPAIGN','" + campaign_cid + "','0');return false;\">CAMPAIGN - " + campaign_cid + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('UŻYTKOWNIKAER','" + document.vicidial_form.phone_number.value + "','0');return false;\">UŻYTKOWNIKAER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('CUSTOMER','" + document.vicidial_form.phone_number.value + "','0');return false;\">CUSTOMER - " + document.vicidial_form.phone_number.value + "</a></b></font><BR><BR>";
GroupAlias_HTML = GroupAlias_HTML + "<font size=2 style=\"BACKGROUND-COLOR: #FFFFCC\"><b><a href=\"#\" onclick=\"GroupAliasSelect_submit('AGENT_PHONE','" + outbound_cid + "','0');return false;\">AGENT_PHONE - " + outbound_cid + "</a></b></font><BR><BR>";
}
var loop_ct = 0;
@@ -8499,10 +8520,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"WYLOGUJ");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('CLOSE');
alert("PLEASE CLICK THE WYLOGUJ LINK TO LOG OUT NEXT TIME.\n");
alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n");
}
}
@@ -8515,7 +8536,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (VDRP_stage != 'PAUSED')
{
AutoDial_ReSume_PauSe("VDADpause",'','','',"WYLOGUJ");
AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT");
}
LogouT('NORMAL');
}
@@ -9074,7 +9095,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Odswież the agents view sidebar or xfer frame
// RefresH the agents view sidebar or xfer frame
function refresh_agents_view(RAlocation,RAcount)
{
if (RAcount > 0)
@@ -9185,7 +9206,7 @@ function phone_number_format(formatphone) {
// ################################################################################
// Odswież the calls in queue bottombar
// RefresH the calls in queue bottombar
function refresh_calls_in_queue(CQcount)
{
if (CQcount > 0)
@@ -9535,46 +9556,54 @@ else
// ################################################################################
// Finish the wrapup timer early
function TimerActionRun()
function TimerActionRun(taskaction,taskdialalert)
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
if (taskaction == 'DiaLAlerT')
{
document.getElementById("TimerContentSpan").innerHTML = "<b>ZAWIADOMIENIE TIMER: " + timer_action_seconds + "sekundy<BR><BR>" + timer_action_message + "</b>";
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert + "</b>";
showDiv('TimerSpan');
}
else
{
if ( (timer_action_message.length > 0) || (timer_action == 'MESSAGE_ONLY') )
{
document.getElementById("TimerContentSpan").innerHTML = "<b>ZAWIADOMIENIE TIMER: " + timer_action_seconds + " sekundy<BR><BR>" + timer_action_message + "</b>";
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
showDiv('TimerSpan');
}
if (timer_action == 'WEBFORM')
{
WebFormRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
}
if (timer_action == 'WEBFORM2')
{
WebFormTwoRefresH('NO','YES');
window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');
}
if (timer_action == 'D1_DIAL')
{
DtMf_PreSet_a_DiaL();
}
if (timer_action == 'D2_DIAL')
{
DtMf_PreSet_b_DiaL();
}
if (timer_action == 'D3_DIAL')
{
DtMf_PreSet_c_DiaL();
}
if (timer_action == 'D4_DIAL')
{
DtMf_PreSet_d_DiaL();
}
if (timer_action == 'D5_DIAL')
{
DtMf_PreSet_e_DiaL();
}
timer_action = 'NONE';
}
@@ -9838,7 +9867,7 @@ else
}
if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) )
{
TimerActionRun();
TimerActionRun('','');
}
if (HKdispo_display > 0)
{
@@ -10261,7 +10290,7 @@ else
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Szybka wypłata\"></a>";
}
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') )
if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') )
{
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"../agc/images/vdc_LB_quickxfer.gif\" border=0 alt=\"Szybka wypłata\"></a>";
}
@@ -10457,7 +10486,7 @@ echo "</head>\n";
<span id="PauseCodeLinkSpan"></span> <BR>
</font></span>
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text">sekundy:
<span style="position:absolute;left:<?php echo $SCwidth ?>px;top:49px;z-index:18;" id="SecondSspan"><font class="body_text"> sekundy:
<span id="SecondSDISP"> &nbsp; &nbsp; </span>
</font></span>
@@ -10736,7 +10765,7 @@ if ($agent_display_dialable_leads > 0)
</span>
<span style="position:absolute;left:0px;top:0px;z-index:41;" id="WrapupBox">
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=550><TR><TD align=center> Call Wrapup <span id="WrapupTimer"></span>sekundy remaining in wrapup<BR><BR>
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=550><TR><TD align=center> Call Wrapup <span id="WrapupTimer"></span> sekundy remaining in wrapup<BR><BR>
<span id="WrapupMessage"><?php echo $wrapup_message ?></span>
<BR><BR>
<a href="#" onclick="WrapupFinish();return false;">Finish Wrapup and Move On</a>
@@ -10873,7 +10902,7 @@ if ($agent_display_dialable_leads > 0)
<?php
}
?>
<a href="#" onclick="CloserSelectContent_create();return false;">RESET</a> |
<a href="#" onclick="CloserSelectContent_create();return false;"> RESET </a> |
<a href="#" onclick="CloserSelect_submit();return false;">ZATWIERDŹ</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10883,7 +10912,7 @@ if ($agent_display_dialable_leads > 0)
<table border=1 bgcolor="#CCFFCC" width=<?php echo $CAwidth ?> height=460><TR><TD align=center VALIGN=top> TERRITORY SELECTION <BR>
<span id="TerritorySelectContent"> Territory Selection </span>
<input type=hidden name=TerritorySelectList><BR>
<a href="#" onclick="TerritorySelectContent_create();return false;">RESET</a> |
<a href="#" onclick="TerritorySelectContent_create();return false;"> RESET </a> |
<a href="#" onclick="TerritorySelect_submit();return false;">ZATWIERDŹ</a>
<BR><BR><BR><BR> &nbsp;
</TD></TR></TABLE>
@@ -10891,8 +10920,8 @@ if ($agent_display_dialable_leads > 0)
<span style="position:absolute;left:0px;top:0px;z-index:55;" id="NothingBox">
<BUTTON Type=button name="inert_button"><img src="../agc/images/blank.gif"></BUTTON>
<span id="DiaLLeaDPrevieWHide">Kanał</span>
<span id="DiaLDiaLAltPhonEHide">Kanał</span>
<span id="DiaLLeaDPrevieWHide"> Kanał</span>
<span id="DiaLDiaLAltPhonEHide"> Kanał</span>
<?php
if (!$agentonly_callbacks)
{echo "<input type=checkbox name=CallBackOnlyMe size=1 value=\"0\"> TYLKO MOJE INNE TERMINY <BR>";}
+1 -1
View File
@@ -132,7 +132,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- czas działania skyptu: $RUNtimesekundy -->";
echo "\n<!-- czas działania skyptu: $RUNtime sekundy -->";
echo "\n</body>\n</html>\n";
}
+1 -1
View File
@@ -470,7 +470,7 @@ if ($ADD==5)
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
if ($format=='table') {echo "\n<!-- runtime do certificado: $RUNtimesegundos -->";}
if ($format=='table') {echo "\n<!-- runtime do certificado: $RUNtime segundos -->";}
if ($format=='table') {echo "\n</body>\n</html>\n";}
exit;
+6 -6
View File
@@ -1386,7 +1386,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=3;
if (live_calls > 0)
{
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>VIVO CONVIDA ESTE TELEFONE:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANALETA DO CLIENTE</td><td><font class=\"log_title\">CANALETA REMOTA</td><td><font class=\"log_title\">REGISTRO</td><td><font class=\"log_title\">HANGUP</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">PARQUE</td></tr>";
var live_calls_HTML = "<font face=\"Arial,Helvetica\"><B>VIVO CONVIDA ESTE TELEFONE:</B></font><BR><table width=100%><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\">CANALETA DO CLIENTE</td><td><font class=\"log_title\">CANALETA REMOTA</td><td><font class=\"log_title\">RECORD</td><td><font class=\"log_title\">HANGUP</td><td><font class=\"log_title\">XFER</td><td><font class=\"log_title\">PARQUE</td></tr>";
if ( (LCAcount > live_calls) || (LCAcount < live_calls) )
{
LCAe[0]=''; LCAe[1]=''; LCAe[2]=''; LCAe[3]=''; LCAe[4]=''; LCAe[5]='';
@@ -1533,7 +1533,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (out_calls > 0)
{
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATE/TIME DA CHAMADA</td><td><font class=\"log_title\">NÚMERO</td><td align=right><font class=\"log_title\">COMPRIMENTO (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
var out_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATE/TIME DA CHAMADA</td><td><font class=\"log_title\">NÚMERO</td><td align=right><font class=\"log_title\">LENGTH (M:SS)</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < out_calls)
{
loop_ct++;
@@ -1561,7 +1561,7 @@ if ($enable_fast_refresh < 1) {echo "var refresh_interval = 1000;\n";}
var conv_start=0;
if (in_calls > 0)
{
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATE/TIME DA CHAMADA</td><td><font class=\"log_title\">IN-NÚMERO</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">COMPRIMENTO</td><td><font class=\"log_title\"> </td></tr>"
var in_log_HTML = "<table width=580><tr bgcolor=#E6E6E6><td><font class=\"log_title\">#</td><td><font class=\"log_title\"> DATE/TIME DA CHAMADA</td><td><font class=\"log_title\">IN-NÚMERO</td><td COLSPAN=2><font class=\"log_title\">CALLERID</td><td align=right><font class=\"log_title\">LENGTH</td><td><font class=\"log_title\"> </td></tr>"
while (loop_ct < in_calls)
{
loop_ct++;
@@ -2758,7 +2758,7 @@ echo "</head>\n";
<span style="position:absolute;left:80px;top:12px;z-index:42;" id="MainXfeRBox">
<input type=hidden name=H_XfeR_channel>
<input type=hidden name=M_XfeR_channel>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERÊNCIA VIVA DA CHAMADA</b> <BR>Canaleta a ser transferida: <span id="MainXfeRChanneL">Canaleta</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> TRANSFERÊNCIA VIVA DA CHAMADA</b> <BR>Canaleta a ser transferida: <span id="MainXfeRChanneL">Channel</span><BR></tr>
<tr><td>Extensões:<BR><span id="MainXfeRContent"> Menu Das Extensões </span></td>
<td>
<BR>
@@ -2772,7 +2772,7 @@ echo "</head>\n";
</span>
<span style="position:absolute;left:80px;top:12px;z-index:43;" id="LocalDialBox">
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Seletor LOCAL Das Extensões</b> <BR>Telefone que chama-se de: <span id="LocalDialChanneL">Canaleta</span><BR></tr>
<table border=0 bgcolor="#FFFFCC" width=600 height=500 cellpadding=3><TR><TD COLSPAN=3 ALIGN=CENTER><b> Seletor LOCAL Das Extensões</b> <BR>Telefone que chama-se de: <span id="LocalDialChanneL">Channel</span><BR></tr>
<tr><td>Extensões:<BR><span id="LocalDialContent"> Menu Das Extensões </span></td>
<td>
<BR>
@@ -2839,7 +2839,7 @@ echo "</head>\n";
<span style="position:absolute;left:0px;top:46px;z-index:20;" id="ActiveLinesPanel">
<table border=0 BGCOLOR="#CDE0C2" width=640>
<tr><td colspan=3>
<a href="#" onclick="pause();return false;">BATENTE</a> | <a href="#" onclick="start();return false;">COMEÇO</a> &nbsp; &nbsp; Refresque a taxa: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Mais rapidamente</a> | <a href="#" onclick="slower();return false;">Mais lento</a></p>
<a href="#" onclick="pause();return false;">STOP</a> | <a href="#" onclick="start();return false;">START</a> &nbsp; &nbsp; Refresque a taxa: <span id="refresh_rate">1000 ms</span> <a href="#" onclick="faster();return false;">Mais rapidamente</a> | <a href="#" onclick="slower();return false;">Mais lento</a></p>
<div id="status"><em>Inicializar..</em></div>
</td></tr>
<tr><td>Extensões Ativas <BR>
+1 -1
View File
@@ -188,7 +188,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- runtime do certificado: $RUNtimesegundos -->";
echo "\n<!-- runtime do certificado: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}
+46 -9
View File
@@ -49,12 +49,13 @@
# 90908-1037 - Added DEAD call logging
# 91130-2022 - Added code for manager override of in-group selection
# 91228-1341 - Added API fields update functions
# 100109-1337 - Fixed Manual dial live call detection
#
$version = '2.2.0-24';
$build = '91228-1341';
$version = '2.2.0-25';
$build = '100109-1337';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=17;
$mysql_log_count=32;
$one_mysql_log=0;
require("dbconnect.php");
@@ -347,6 +348,42 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
$one_mysql_log=0;
$retry_count++;
}
##### BEGIN DEAD logging section #####
### find whether the call the agent is em is hung up
$stmt="SELECT count(*) from vicidial_auto_calls where callerid='$Acallerid';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03029',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$AcalleridCOUNT=$row[0];
if ( ($AcalleridCOUNT < 1) and (eregi("INCALL",$Astatus)) and (strlen($Aagent_log_id) > 0) )
{
$DEADcustomer++;
### find whether the agent log record has already logged DEAD
$stmt="SELECT count(*) from vicidial_agent_log where agent_log_id='$Aagent_log_id' and ( (dead_epoch IS NOT NULL) or (dead_epoch > 10000) );";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03030',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Aagent_log_idCOUNT=$row[0];
if ($Aagent_log_idCOUNT < 1)
{
$NEWdead_epoch = date("U");
$deadNOW_TIME = date("Y-m-d H:i:s");
$stmt="UPDATE vicidial_agent_log set dead_epoch='$NEWdead_epoch' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03031',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set last_state_change='$deadNOW_TIME' where agent_log_id='$Aagent_log_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03032',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
##### END DEAD logging section #####
}
### grab the API hangup and API dispo fields in vicidial_live_agents
@@ -465,7 +502,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
### CHECK TO SEE IF AGENT IS WITHIN THEIR SHIFT IF RESTRICTED, IF NOT, OUTPUT ERROR
$Ashift_logout=0;
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|COMEÇO",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
if ( ( (ereg("ALL",$shift_enforcement)) and (!ereg("OFF|START",$VU_agent_shift_enforcement_override)) ) or (ereg("ALL",$VU_agent_shift_enforcement_override)) )
{
$shift_ok=0;
if (strlen($LOGgroup_shiftsSQL) < 3)
@@ -556,7 +593,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanaletaA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
$stmt="SELECT channel FROM live_channels where server_ip = '$server_ip' and extension = '$conf_exten';";
@@ -570,7 +607,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
{
$loop_count++; $total_conf++;
$row=mysql_fetch_row($rslt);
$CanaletaA[$total_conf] = "$row[0]";
$ChannelA[$total_conf] = "$row[0]";
if ($format=='debug') {echo "\n<!-- $row[0] -->";}
}
}
@@ -582,8 +619,8 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
while($total_conf > $counter)
{
$counter++;
$countecho = "$countecho$CanaletaA[$counter] ~";
# echo "$CanaletaA[$counter] ~";
$countecho = "$countecho$ChannelA[$counter] ~";
# echo "$ChannelA[$counter] ~";
}
echo "$countecho\n";
@@ -616,7 +653,7 @@ if ($format=='debug')
{
$ENDtime = date("U");
$RUNtime = ($ENDtime - $StarTtime);
echo "\n<!-- runtime do certificado: $RUNtimesegundos -->";
echo "\n<!-- runtime do certificado: $RUNtime segundos -->";
echo "\n</body>\n</html>\n";
}

Some files were not shown because too many files have changed in this diff Show More