Added timer action methods HANGUP, EXTENSION, CALLMENU and IN_GROUP
Fixed queue priority in outbound auto-dial calls when agents have not selected to take calls from all allowed in-groups in a campaign Added delete_lead option to the update_lead function in the Non-Agent api Added a GROUP column to the Remote Agents listing in admin.php Changed the new 3rd gen lead loader to the default, with a link to the old one Fixed FORM bug when no script is used in vicidial.php git-svn-id: svn://192.168.202.10@1486 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -73,6 +73,7 @@
|
|||||||
# 91230-1159 - Change to callee callerID when sending the call to VMAIL
|
# 91230-1159 - Change to callee callerID when sending the call to VMAIL
|
||||||
# 100205-1024 - Fixed CPD send to message
|
# 100205-1024 - Fixed CPD send to message
|
||||||
# 100623-1320 - Added queue_priority to queue processing (backport from 2.4)
|
# 100623-1320 - Added queue_priority to queue processing (backport from 2.4)
|
||||||
|
# 100727-1653 - Fixes for queue priority feature (backport from 2.4)
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||||
@@ -1376,30 +1377,16 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
{
|
{
|
||||||
if ($agent_search_method =~ /^SO/)
|
if ($agent_search_method =~ /^SO/)
|
||||||
{$agent_search_method = 'LO';}
|
{$agent_search_method = 'LO';}
|
||||||
$rec_countWAIT=0;
|
|
||||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$CIDlead_id' and ( ( (campaign_id = '$VDADcampaign') and (call_time < \"$VDADcall_time\") ) or ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) ) );";
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
|
||||||
$sthArows=$sthA->rows;
|
|
||||||
$dbhP=$dbhA; $mysql_count='01033'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
|
||||||
$rec_count=0;
|
|
||||||
while ($sthArows > $rec_count)
|
|
||||||
{
|
|
||||||
@aryA = $sthA->fetchrow_array;
|
|
||||||
$rec_countWAIT = $aryA[0];
|
|
||||||
$rec_count++;
|
|
||||||
}
|
|
||||||
$sthA->finish();
|
|
||||||
if ($DBconcurrent_transfers =~ /AUTO/)
|
if ($DBconcurrent_transfers =~ /AUTO/)
|
||||||
{
|
{
|
||||||
$active_agents=1;
|
$active_agents=1;
|
||||||
$stmtA = "SELECT count(*) FROM vicidial_live_agents where server_ip='$VARserver_ip' and campaign_id = '$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
|
$stmtA = "SELECT count(*) FROM vicidial_live_agents where campaign_id = '$VDADcampaign' and server_ip='$VARserver_ip' and last_update_time > '$BDtsSQLdate';";
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
$dbhP=$dbhA; $mysql_count='01034'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='01041'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
$rec_count=0;
|
$rec_count=0;
|
||||||
while ($sthArows > $rec_count)
|
while ($sthArows > $rec_count)
|
||||||
{
|
{
|
||||||
@@ -1415,6 +1402,122 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
}
|
}
|
||||||
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
|
$cbc=0;
|
||||||
|
$rec_countWAITOUT=0;
|
||||||
|
$rec_countWAITIN=0;
|
||||||
|
$rec_countWAITINallowed=0;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
$READY_agent_closer_camps='';
|
||||||
|
$READY_users='';
|
||||||
|
$READY_users_count=0;
|
||||||
|
$AGENTDIRECT_user_ids='';
|
||||||
|
### find number of outbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$CIDlead_id' and campaign_id = '$VDADcampaign' and call_time < \"$VDADcall_time\";";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITOUT = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
if (length($closer_campaigns) > 3)
|
||||||
|
{
|
||||||
|
### find number of inbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01070'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITIN = $aryA[0];
|
||||||
|
$rec_countWAITINallowed = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
### if there are inbound calls waiting, see if any READY agents are able to take them
|
||||||
|
if ($rec_countWAITIN > 0)
|
||||||
|
{
|
||||||
|
### get a list of the in-groups that the READY agents are able to take calls from
|
||||||
|
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and server_ip='$VARserver_ip' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01071'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$READY_users_count=0;
|
||||||
|
while ($sthArows > $READY_users_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$READY_users .= "'$aryA[1]',";
|
||||||
|
@VLagent_camps = split(/ /,$aryA[0]);
|
||||||
|
$ki=0;
|
||||||
|
foreach(@VLagent_camps)
|
||||||
|
{
|
||||||
|
if ( ($VLagent_camps[$ki] !~ /AGENTDIRECT/) && (length($VLagent_camps[$ki]) > 1) && ($READY_agent_closer_camps !~ /'$VLagent_camps[$ki]'/) )
|
||||||
|
{$READY_agent_closer_camps .= "'$VLagent_camps[$ki]',";}
|
||||||
|
$ki++;
|
||||||
|
}
|
||||||
|
$READY_users_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$READY_agent_closer_camps =~ s/.$//gi;
|
||||||
|
$READY_users =~ s/.$//gi;
|
||||||
|
|
||||||
|
if (length($READY_users)>2)
|
||||||
|
{
|
||||||
|
if ($closer_campaigns =~ /AGENTDIRECT/)
|
||||||
|
{
|
||||||
|
### get a list of the users that have AGENTDIRECT calls waiting for them
|
||||||
|
$stmtA = "SELECT agent_only FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%AGENTDIRECT%\" and last_update_time > '$BDtsSQLdate' and agent_only IN($READY_users) and agent_only != '';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01072'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
while ($sthArows > $agentdirect_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$AGENTDIRECT_user_ids .= "'$aryA[0]',";
|
||||||
|
$agentdirect_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$AGENTDIRECT_user_ids =~ s/.$//gi;
|
||||||
|
if (length($AGENTDIRECT_user_ids)>2)
|
||||||
|
{$AGENTDIRECT_user_ids = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only IN($AGENTDIRECT_user_ids)) )";}
|
||||||
|
else
|
||||||
|
{$AGENTDIRECT_user_ids='';}
|
||||||
|
}
|
||||||
|
|
||||||
|
### find number of inbound calls from in-groups that READY agents are able to take calls from are waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and ( ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($READY_agent_closer_camps)) ) $AGENTDIRECT_user_ids );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01073'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITIN = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# if ($AGILOG) {$agi_string = "COUNT DEBUG: |$concurrent_transfers|$rec_countWAITOUT|$rec_countWAITIN|$rec_countWAITINallowed|$agentdirect_count|$READY_users_count|$closer_campaigns|$READY_agent_closer_camps|$READY_users|$AGENTDIRECT_user_ids|"; &agi_output;}
|
||||||
|
|
||||||
|
$rec_countWAIT = ($rec_countWAITOUT + $rec_countWAITIN);
|
||||||
if ($rec_countWAIT < $concurrent_transfers)
|
if ($rec_countWAIT < $concurrent_transfers)
|
||||||
{
|
{
|
||||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||||
@@ -1566,22 +1669,6 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
{
|
{
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
##### Attempt to send call to an agent on any server #####
|
##### Attempt to send call to an agent on any server #####
|
||||||
$cbc=0;
|
|
||||||
$rec_countWAITrem=0;
|
|
||||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$CIDlead_id' and ( ( (campaign_id = '$VDADcampaign') and (call_time < \"$VDADcall_time\") ) or ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) ) );";
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
|
||||||
$sthArows=$sthA->rows;
|
|
||||||
$dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
|
||||||
$rec_count=0;
|
|
||||||
while ($sthArows > $rec_count)
|
|
||||||
{
|
|
||||||
@aryA = $sthA->fetchrow_array;
|
|
||||||
$rec_countWAITrem = $aryA[0];
|
|
||||||
$rec_count++;
|
|
||||||
}
|
|
||||||
$sthA->finish();
|
|
||||||
if ($DBconcurrent_transfers =~ /AUTO/)
|
if ($DBconcurrent_transfers =~ /AUTO/)
|
||||||
{
|
{
|
||||||
$active_agents=1;
|
$active_agents=1;
|
||||||
@@ -1606,6 +1693,122 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
}
|
}
|
||||||
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
|
$cbc=0;
|
||||||
|
$rec_countWAITremOUT=0;
|
||||||
|
$rec_countWAITremIN=0;
|
||||||
|
$rec_countWAITremINallowed=0;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
$READY_agent_closer_camps='';
|
||||||
|
$READY_users='';
|
||||||
|
$READY_users_count=0;
|
||||||
|
$AGENTDIRECT_user_ids='';
|
||||||
|
### find number of outbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$CIDlead_id' and campaign_id = '$VDADcampaign' and call_time < \"$VDADcall_time\";";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITremOUT = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
if (length($closer_campaigns) > 3)
|
||||||
|
{
|
||||||
|
### find number of inbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01074'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITremIN = $aryA[0];
|
||||||
|
$rec_countWAITremINallowed = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
### if there are inbound calls waiting, see if any READY agents are able to take them
|
||||||
|
if ($rec_countWAITremIN > 0)
|
||||||
|
{
|
||||||
|
### get a list of the in-groups that the READY agents are able to take calls from
|
||||||
|
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01075'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$READY_users_count=0;
|
||||||
|
while ($sthArows > $READY_users_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$READY_users .= "'$aryA[1]',";
|
||||||
|
@VLagent_camps = split(/ /,$aryA[0]);
|
||||||
|
$ki=0;
|
||||||
|
foreach(@VLagent_camps)
|
||||||
|
{
|
||||||
|
if ( ($VLagent_camps[$ki] !~ /AGENTDIRECT/) && (length($VLagent_camps[$ki]) > 1) && ($READY_agent_closer_camps !~ /'$VLagent_camps[$ki]'/) )
|
||||||
|
{$READY_agent_closer_camps .= "'$VLagent_camps[$ki]',";}
|
||||||
|
$ki++;
|
||||||
|
}
|
||||||
|
$READY_users_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$READY_agent_closer_camps =~ s/.$//gi;
|
||||||
|
$READY_users =~ s/.$//gi;
|
||||||
|
|
||||||
|
if (length($READY_users)>2)
|
||||||
|
{
|
||||||
|
if ($closer_campaigns =~ /AGENTDIRECT/)
|
||||||
|
{
|
||||||
|
### get a list of the users that have AGENTDIRECT calls waiting for them
|
||||||
|
$stmtA = "SELECT agent_only FROM vicidial_auto_calls where status = 'LIVE' and campaign_id LIKE \"%AGENTDIRECT%\" and last_update_time > '$BDtsSQLdate' and agent_only IN($READY_users) and agent_only != '';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01076'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
while ($sthArows > $agentdirect_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$AGENTDIRECT_user_ids .= "'$aryA[0]',";
|
||||||
|
$agentdirect_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$AGENTDIRECT_user_ids =~ s/.$//gi;
|
||||||
|
if (length($AGENTDIRECT_user_ids)>2)
|
||||||
|
{$AGENTDIRECT_user_ids = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only IN($AGENTDIRECT_user_ids)) )";}
|
||||||
|
else
|
||||||
|
{$AGENTDIRECT_user_ids='';}
|
||||||
|
}
|
||||||
|
|
||||||
|
### find number of inbound calls from in-groups that READY agents are able to take calls from are waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and ( ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($READY_agent_closer_camps)) ) $AGENTDIRECT_user_ids );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01077'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITremIN = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# if ($AGILOG) {$agi_string = "COUNT DEBUG: |$concurrent_transfers|$rec_countWAITremOUT|$rec_countWAITremIN|$rec_countWAITremINallowed|$agentdirect_count|$READY_users_count|$closer_campaigns|$READY_agent_closer_camps|$READY_users|$AGENTDIRECT_user_ids|"; &agi_output;}
|
||||||
|
|
||||||
|
$rec_countWAITrem = ($rec_countWAITremOUT + $rec_countWAITremIN);
|
||||||
if ($rec_countWAITrem < $concurrent_transfers)
|
if ($rec_countWAITrem < $concurrent_transfers)
|
||||||
{
|
{
|
||||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||||
@@ -1762,7 +1965,7 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($AGILOG) {$agi_string = "WWWWWWWW VDAD XFER BALANCE WAIT: |$rec_countWAIT|$VDADcampaign|$channel|$callerid|$uniqueid|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "WWWWWWWW VDAD XFER BALANCE WAIT: |$rec_countWAITrem|$VDADcampaign|$channel|$callerid|$uniqueid|"; &agi_output;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ OTHER CHANGES:
|
|||||||
cpan> install Spreadsheet::XLSX
|
cpan> install Spreadsheet::XLSX
|
||||||
cpan> install Spreadsheet::Read
|
cpan> install Spreadsheet::Read
|
||||||
To get to the new lead loader, click to:
|
To get to the new lead loader, click to:
|
||||||
Lists -> Load New Leads -> 3rd Gen Lead Loader
|
Lists -> Load New Leads
|
||||||
Here is a list of the file formats(by file extension) that are now
|
Here is a list of the file formats(by file extension) that are now
|
||||||
supported by the third generation web lead loader:
|
supported by the third generation web lead loader:
|
||||||
TXT - tab or pipe delimited
|
TXT - tab or pipe delimited
|
||||||
@@ -229,6 +229,10 @@ OTHER CHANGES:
|
|||||||
Also, second and third options were added for both allow the offering of
|
Also, second and third options were added for both allow the offering of
|
||||||
a press 1, 2 and 3 option in the wait/hold time option features.
|
a press 1, 2 and 3 option in the wait/hold time option features.
|
||||||
|
|
||||||
|
50. Added timer action methods HANGUP, EXTENSION, CALLMENU and IN_GROUP. These
|
||||||
|
allow you to hangup or transfer the call at a set number of seconds
|
||||||
|
from start time or triggered from an outside process.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@
|
|||||||
# 100414-2156 - Added extension_appended_cidname option
|
# 100414-2156 - Added extension_appended_cidname option
|
||||||
# 100424-1341 - Added extended logging
|
# 100424-1341 - Added extended logging
|
||||||
# 100623-1310 - Added queue_priority to queue processing
|
# 100623-1310 - Added queue_priority to queue processing
|
||||||
|
# 100727-1653 - Fixes for queue priority feature
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||||
@@ -1394,30 +1395,16 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
{
|
{
|
||||||
if ($agent_search_method =~ /^SO/)
|
if ($agent_search_method =~ /^SO/)
|
||||||
{$agent_search_method = 'LO';}
|
{$agent_search_method = 'LO';}
|
||||||
$rec_countWAIT=0;
|
|
||||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$CIDlead_id' and ( ( (campaign_id = '$VDADcampaign') and (call_time < \"$VDADcall_time\") ) or ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) ) );";
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
|
||||||
$sthArows=$sthA->rows;
|
|
||||||
$dbhP=$dbhA; $mysql_count='01033'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
|
||||||
$rec_count=0;
|
|
||||||
while ($sthArows > $rec_count)
|
|
||||||
{
|
|
||||||
@aryA = $sthA->fetchrow_array;
|
|
||||||
$rec_countWAIT = $aryA[0];
|
|
||||||
$rec_count++;
|
|
||||||
}
|
|
||||||
$sthA->finish();
|
|
||||||
if ($DBconcurrent_transfers =~ /AUTO/)
|
if ($DBconcurrent_transfers =~ /AUTO/)
|
||||||
{
|
{
|
||||||
$active_agents=1;
|
$active_agents=1;
|
||||||
$stmtA = "SELECT count(*) FROM vicidial_live_agents where server_ip='$VARserver_ip' and campaign_id = '$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
|
$stmtA = "SELECT count(*) FROM vicidial_live_agents where campaign_id = '$VDADcampaign' and server_ip='$VARserver_ip' and last_update_time > '$BDtsSQLdate';";
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
$dbhP=$dbhA; $mysql_count='01034'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='01041'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
$rec_count=0;
|
$rec_count=0;
|
||||||
while ($sthArows > $rec_count)
|
while ($sthArows > $rec_count)
|
||||||
{
|
{
|
||||||
@@ -1433,6 +1420,122 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
}
|
}
|
||||||
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
|
$cbc=0;
|
||||||
|
$rec_countWAITOUT=0;
|
||||||
|
$rec_countWAITIN=0;
|
||||||
|
$rec_countWAITINallowed=0;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
$READY_agent_closer_camps='';
|
||||||
|
$READY_users='';
|
||||||
|
$READY_users_count=0;
|
||||||
|
$AGENTDIRECT_user_ids='';
|
||||||
|
### find number of outbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$CIDlead_id' and campaign_id = '$VDADcampaign' and call_time < \"$VDADcall_time\";";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITOUT = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
if (length($closer_campaigns) > 3)
|
||||||
|
{
|
||||||
|
### find number of inbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01070'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITIN = $aryA[0];
|
||||||
|
$rec_countWAITINallowed = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
### if there are inbound calls waiting, see if any READY agents are able to take them
|
||||||
|
if ($rec_countWAITIN > 0)
|
||||||
|
{
|
||||||
|
### get a list of the in-groups that the READY agents are able to take calls from
|
||||||
|
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and server_ip='$VARserver_ip' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01071'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$READY_users_count=0;
|
||||||
|
while ($sthArows > $READY_users_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$READY_users .= "'$aryA[1]',";
|
||||||
|
@VLagent_camps = split(/ /,$aryA[0]);
|
||||||
|
$ki=0;
|
||||||
|
foreach(@VLagent_camps)
|
||||||
|
{
|
||||||
|
if ( ($VLagent_camps[$ki] !~ /AGENTDIRECT/) && (length($VLagent_camps[$ki]) > 1) && ($READY_agent_closer_camps !~ /'$VLagent_camps[$ki]'/) )
|
||||||
|
{$READY_agent_closer_camps .= "'$VLagent_camps[$ki]',";}
|
||||||
|
$ki++;
|
||||||
|
}
|
||||||
|
$READY_users_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$READY_agent_closer_camps =~ s/.$//gi;
|
||||||
|
$READY_users =~ s/.$//gi;
|
||||||
|
|
||||||
|
if (length($READY_users)>2)
|
||||||
|
{
|
||||||
|
if ($closer_campaigns =~ /AGENTDIRECT/)
|
||||||
|
{
|
||||||
|
### get a list of the users that have AGENTDIRECT calls waiting for them
|
||||||
|
$stmtA = "SELECT agent_only FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%AGENTDIRECT%\" and last_update_time > '$BDtsSQLdate' and agent_only IN($READY_users) and agent_only != '';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01072'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
while ($sthArows > $agentdirect_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$AGENTDIRECT_user_ids .= "'$aryA[0]',";
|
||||||
|
$agentdirect_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$AGENTDIRECT_user_ids =~ s/.$//gi;
|
||||||
|
if (length($AGENTDIRECT_user_ids)>2)
|
||||||
|
{$AGENTDIRECT_user_ids = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only IN($AGENTDIRECT_user_ids)) )";}
|
||||||
|
else
|
||||||
|
{$AGENTDIRECT_user_ids='';}
|
||||||
|
}
|
||||||
|
|
||||||
|
### find number of inbound calls from in-groups that READY agents are able to take calls from are waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and ( ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($READY_agent_closer_camps)) ) $AGENTDIRECT_user_ids );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01073'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITIN = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# if ($AGILOG) {$agi_string = "COUNT DEBUG: |$concurrent_transfers|$rec_countWAITOUT|$rec_countWAITIN|$rec_countWAITINallowed|$agentdirect_count|$READY_users_count|$closer_campaigns|$READY_agent_closer_camps|$READY_users|$AGENTDIRECT_user_ids|"; &agi_output;}
|
||||||
|
|
||||||
|
$rec_countWAIT = ($rec_countWAITOUT + $rec_countWAITIN);
|
||||||
if ($rec_countWAIT < $concurrent_transfers)
|
if ($rec_countWAIT < $concurrent_transfers)
|
||||||
{
|
{
|
||||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||||
@@ -1668,22 +1771,6 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
{
|
{
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
##### Attempt to send call to an agent on any server #####
|
##### Attempt to send call to an agent on any server #####
|
||||||
$cbc=0;
|
|
||||||
$rec_countWAITrem=0;
|
|
||||||
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$CIDlead_id' and ( ( (campaign_id = '$VDADcampaign') and (call_time < \"$VDADcall_time\") ) or ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) ) );";
|
|
||||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
|
||||||
$sthArows=$sthA->rows;
|
|
||||||
$dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
|
||||||
$rec_count=0;
|
|
||||||
while ($sthArows > $rec_count)
|
|
||||||
{
|
|
||||||
@aryA = $sthA->fetchrow_array;
|
|
||||||
$rec_countWAITrem = $aryA[0];
|
|
||||||
$rec_count++;
|
|
||||||
}
|
|
||||||
$sthA->finish();
|
|
||||||
if ($DBconcurrent_transfers =~ /AUTO/)
|
if ($DBconcurrent_transfers =~ /AUTO/)
|
||||||
{
|
{
|
||||||
$active_agents=1;
|
$active_agents=1;
|
||||||
@@ -1708,6 +1795,122 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
}
|
}
|
||||||
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
else {$concurrent_transfers = $DBconcurrent_transfers;}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
|
$cbc=0;
|
||||||
|
$rec_countWAITremOUT=0;
|
||||||
|
$rec_countWAITremIN=0;
|
||||||
|
$rec_countWAITremINallowed=0;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
$READY_agent_closer_camps='';
|
||||||
|
$READY_users='';
|
||||||
|
$READY_users_count=0;
|
||||||
|
$AGENTDIRECT_user_ids='';
|
||||||
|
### find number of outbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$CIDlead_id' and campaign_id = '$VDADcampaign' and call_time < \"$VDADcall_time\";";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITremOUT = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
if (length($closer_campaigns) > 3)
|
||||||
|
{
|
||||||
|
### find number of inbound calls waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01074'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITremIN = $aryA[0];
|
||||||
|
$rec_countWAITremINallowed = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
### if there are inbound calls waiting, see if any READY agents are able to take them
|
||||||
|
if ($rec_countWAITremIN > 0)
|
||||||
|
{
|
||||||
|
### get a list of the in-groups that the READY agents are able to take calls from
|
||||||
|
$stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01075'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$READY_users_count=0;
|
||||||
|
while ($sthArows > $READY_users_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$READY_users .= "'$aryA[1]',";
|
||||||
|
@VLagent_camps = split(/ /,$aryA[0]);
|
||||||
|
$ki=0;
|
||||||
|
foreach(@VLagent_camps)
|
||||||
|
{
|
||||||
|
if ( ($VLagent_camps[$ki] !~ /AGENTDIRECT/) && (length($VLagent_camps[$ki]) > 1) && ($READY_agent_closer_camps !~ /'$VLagent_camps[$ki]'/) )
|
||||||
|
{$READY_agent_closer_camps .= "'$VLagent_camps[$ki]',";}
|
||||||
|
$ki++;
|
||||||
|
}
|
||||||
|
$READY_users_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$READY_agent_closer_camps =~ s/.$//gi;
|
||||||
|
$READY_users =~ s/.$//gi;
|
||||||
|
|
||||||
|
if (length($READY_users)>2)
|
||||||
|
{
|
||||||
|
if ($closer_campaigns =~ /AGENTDIRECT/)
|
||||||
|
{
|
||||||
|
### get a list of the users that have AGENTDIRECT calls waiting for them
|
||||||
|
$stmtA = "SELECT agent_only FROM vicidial_auto_calls where status = 'LIVE' and campaign_id LIKE \"%AGENTDIRECT%\" and last_update_time > '$BDtsSQLdate' and agent_only IN($READY_users) and agent_only != '';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01076'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
$agentdirect_count=0;
|
||||||
|
while ($sthArows > $agentdirect_count)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$AGENTDIRECT_user_ids .= "'$aryA[0]',";
|
||||||
|
$agentdirect_count++;
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
$AGENTDIRECT_user_ids =~ s/.$//gi;
|
||||||
|
if (length($AGENTDIRECT_user_ids)>2)
|
||||||
|
{$AGENTDIRECT_user_ids = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only IN($AGENTDIRECT_user_ids)) )";}
|
||||||
|
else
|
||||||
|
{$AGENTDIRECT_user_ids='';}
|
||||||
|
}
|
||||||
|
|
||||||
|
### find number of inbound calls from in-groups that READY agents are able to take calls from are waiting in line in front of this call
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and ( ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($READY_agent_closer_camps)) ) $AGENTDIRECT_user_ids );";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
$dbhP=$dbhA; $mysql_count='01077'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$rec_countWAITremIN = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# if ($AGILOG) {$agi_string = "COUNT DEBUG: |$concurrent_transfers|$rec_countWAITremOUT|$rec_countWAITremIN|$rec_countWAITremINallowed|$agentdirect_count|$READY_users_count|$closer_campaigns|$READY_agent_closer_camps|$READY_users|$AGENTDIRECT_user_ids|"; &agi_output;}
|
||||||
|
|
||||||
|
$rec_countWAITrem = ($rec_countWAITremOUT + $rec_countWAITremIN);
|
||||||
if ($rec_countWAITrem < $concurrent_transfers)
|
if ($rec_countWAITrem < $concurrent_transfers)
|
||||||
{
|
{
|
||||||
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
$stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;";
|
||||||
@@ -1951,7 +2154,7 @@ while ($drop_timer <= $DROP_TIME)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($AGILOG) {$agi_string = "WWWWWWWW VDAD XFER BALANCE WAIT: |$rec_countWAIT|$VDADcampaign|$channel|$callerid|$uniqueid|"; &agi_output;}
|
if ($AGILOG) {$agi_string = "WWWWWWWW VDAD XFER BALANCE WAIT: |$rec_countWAITrem|$VDADcampaign|$channel|$callerid|$uniqueid|"; &agi_output;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ Changes:
|
|||||||
100704-1148 - Added custom fields inserts to the add_lead function
|
100704-1148 - Added custom fields inserts to the add_lead function
|
||||||
100718-0245 - Added update_lead function to update existing leads
|
100718-0245 - Added update_lead function to update existing leads
|
||||||
100723-1333 - Added no_update option to the update_lead function
|
100723-1333 - Added no_update option to the update_lead function
|
||||||
|
100728-1952 - Added delete_lead option to the update_lead function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -335,6 +336,7 @@ custom_fields - Y or N, default is N. Defines whether the API will accept custo
|
|||||||
For example, if the field_label is "favorite_color" you would add "&favorite_color=blue"
|
For example, if the field_label is "favorite_color" you would add "&favorite_color=blue"
|
||||||
no_update - Y or N, Setting this to Y will not perform any updates, but will instead only tell
|
no_update - Y or N, Setting this to Y will not perform any updates, but will instead only tell
|
||||||
you if a lead exists that matches the search criteria, default is N.
|
you if a lead exists that matches the search criteria, default is N.
|
||||||
|
delete_lead - Y or N, Setting this to Y will delete the lead from the vicidial_list table, default is N.
|
||||||
|
|
||||||
EDITABLE FIELDS-
|
EDITABLE FIELDS-
|
||||||
user_field - 1-20 characters, this updates the 'user' field in the vicidial_list table
|
user_field - 1-20 characters, this updates the 'user' field in the vicidial_list table
|
||||||
@@ -384,6 +386,8 @@ http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&functio
|
|||||||
|
|
||||||
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_lead&lead_id=27&no_update=Y
|
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_lead&lead_id=27&no_update=Y
|
||||||
|
|
||||||
|
http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_lead&lead_id=27&delete_lead=Y
|
||||||
|
|
||||||
Example responses:
|
Example responses:
|
||||||
SUCCESS: update_lead LEAD HAS BEEN UPDATED - 6666|193716
|
SUCCESS: update_lead LEAD HAS BEEN UPDATED - 6666|193716
|
||||||
NOTICE: update_lead CUSTOM FIELDS VALUES UPDATED - 7275551111|1234|101
|
NOTICE: update_lead CUSTOM FIELDS VALUES UPDATED - 7275551111|1234|101
|
||||||
@@ -394,6 +398,8 @@ NOTICE: update_lead CUSTOM FIELDS NOT UPDATED, NO FIELDS DEFINED - 7275551111|12
|
|||||||
NOTICE: update_lead NO MATCHES FOUND IN THE SYSTEM - 6666|4567|897654327|7275551212
|
NOTICE: update_lead NO MATCHES FOUND IN THE SYSTEM - 6666|4567|897654327|7275551212
|
||||||
SUCCESS: update_lead LEAD HAS BEEN ADDED - 7275551111|6666|999|193716|-4
|
SUCCESS: update_lead LEAD HAS BEEN ADDED - 7275551111|6666|999|193716|-4
|
||||||
|
|
||||||
|
SUCCESS: update_lead LEAD HAS BEEN DELETED - 7275551111|6666|999|193716|-4
|
||||||
|
|
||||||
NOTICE: update_lead LEADS FOUND IN THE SYSTEM - 6666|4567|897654327|7275551212
|
NOTICE: update_lead LEADS FOUND IN THE SYSTEM - 6666|4567|897654327|7275551212
|
||||||
|
|
||||||
ERROR: update_lead INVALID DATA FOR LEAD INSERTION - 6666|||
|
ERROR: update_lead INVALID DATA FOR LEAD INSERTION - 6666|||
|
||||||
|
|||||||
@@ -377,6 +377,7 @@ ra_extension VARCHAR(100) default '',
|
|||||||
external_dtmf VARCHAR(100) default '',
|
external_dtmf VARCHAR(100) default '',
|
||||||
external_transferconf VARCHAR(100) default '',
|
external_transferconf VARCHAR(100) default '',
|
||||||
external_park VARCHAR(40) default '',
|
external_park VARCHAR(40) default '',
|
||||||
|
external_timer_action_destination VARCHAR(100) default '',
|
||||||
index (random_id),
|
index (random_id),
|
||||||
index (last_call_time),
|
index (last_call_time),
|
||||||
index (last_update_time),
|
index (last_update_time),
|
||||||
@@ -734,7 +735,7 @@ agent_select_territories ENUM('Y','N') default 'N',
|
|||||||
campaign_calldate DATETIME,
|
campaign_calldate DATETIME,
|
||||||
crm_popup_login ENUM('Y','N') default 'N',
|
crm_popup_login ENUM('Y','N') default 'N',
|
||||||
crm_login_address TEXT,
|
crm_login_address TEXT,
|
||||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE',
|
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE',
|
||||||
timer_action_message VARCHAR(255) default '',
|
timer_action_message VARCHAR(255) default '',
|
||||||
timer_action_seconds MEDIUMINT(7) default '-1',
|
timer_action_seconds MEDIUMINT(7) default '-1',
|
||||||
start_call_url TEXT,
|
start_call_url TEXT,
|
||||||
@@ -751,7 +752,8 @@ manual_dial_override ENUM('NONE','ALLOW_ALL','DISABLE_ALL') default 'NONE',
|
|||||||
blind_monitor_warning ENUM('DISABLED','ALERT','NOTICE','AUDIO','ALERT_NOTICE','ALERT_AUDIO','NOTICE_AUDIO','ALL') default 'DISABLED',
|
blind_monitor_warning ENUM('DISABLED','ALERT','NOTICE','AUDIO','ALERT_NOTICE','ALERT_AUDIO','NOTICE_AUDIO','ALL') default 'DISABLED',
|
||||||
blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your session',
|
blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your session',
|
||||||
blind_monitor_filename VARCHAR(100) default '',
|
blind_monitor_filename VARCHAR(100) default '',
|
||||||
inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED'
|
inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED',
|
||||||
|
timer_action_destination VARCHAR(30) default ''
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE vicidial_lists (
|
CREATE TABLE vicidial_lists (
|
||||||
@@ -893,7 +895,7 @@ no_agent_no_queue ENUM('N','Y','NO_PAUSED') default 'N',
|
|||||||
no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE',
|
no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE',
|
||||||
no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye',
|
no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye',
|
||||||
web_form_address_two TEXT,
|
web_form_address_two TEXT,
|
||||||
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE',
|
timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE',
|
||||||
timer_action_message VARCHAR(255) default '',
|
timer_action_message VARCHAR(255) default '',
|
||||||
timer_action_seconds MEDIUMINT(7) default '-1',
|
timer_action_seconds MEDIUMINT(7) default '-1',
|
||||||
start_call_url TEXT,
|
start_call_url TEXT,
|
||||||
@@ -927,7 +929,8 @@ wait_time_option_callback_filename VARCHAR(255) default 'vm-hangup',
|
|||||||
wait_time_option_callback_list_id BIGINT(14) UNSIGNED default '999',
|
wait_time_option_callback_list_id BIGINT(14) UNSIGNED default '999',
|
||||||
wait_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1',
|
wait_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1',
|
||||||
wait_time_option_no_block ENUM('N','Y') default 'N',
|
wait_time_option_no_block ENUM('N','Y') default 'N',
|
||||||
wait_time_option_prompt_seconds SMALLINT(5) default '10'
|
wait_time_option_prompt_seconds SMALLINT(5) default '10',
|
||||||
|
timer_action_destination VARCHAR(30) default ''
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE vicidial_stations (
|
CREATE TABLE vicidial_stations (
|
||||||
@@ -2292,7 +2295,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
|
|||||||
|
|
||||||
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
|
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1236',db_schema_update_date=NOW();
|
UPDATE system_settings SET db_schema_version='1237',db_schema_update_date=NOW();
|
||||||
|
|
||||||
GRANT RELOAD ON *.* TO cron@'%';
|
GRANT RELOAD ON *.* TO cron@'%';
|
||||||
GRANT RELOAD ON *.* TO cron@localhost;
|
GRANT RELOAD ON *.* TO cron@localhost;
|
||||||
|
|||||||
@@ -437,3 +437,13 @@ UPDATE system_settings SET db_schema_version='1235',db_schema_update_date=NOW();
|
|||||||
ALTER TABLE vicidial_campaigns MODIFY quick_transfer_button VARCHAR(20) default 'N';
|
ALTER TABLE vicidial_campaigns MODIFY quick_transfer_button VARCHAR(20) default 'N';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1236',db_schema_update_date=NOW();
|
UPDATE system_settings SET db_schema_version='1236',db_schema_update_date=NOW();
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_campaigns MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE';
|
||||||
|
ALTER TABLE vicidial_campaigns ADD timer_action_destination VARCHAR(30) default '';
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_inbound_groups MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE';
|
||||||
|
ALTER TABLE vicidial_inbound_groups ADD timer_action_destination VARCHAR(30) default '';
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_live_agents ADD external_timer_action_destination VARCHAR(100) default '';
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1237',db_schema_update_date=NOW();
|
||||||
|
|||||||
@@ -287,6 +287,11 @@ If Wait Time Option is set to PRESS_CID_CALLBACK, this is the List ID the call i
|
|||||||
Wait Hold Option Priority||
|
Wait Hold Option Priority||
|
||||||
If both Estimated Hold Time options and Wait Time options are active, this setting will define whether one, the other or both of these features are active. For example, if the Estimated Hold Time Option is set to 360, the Wait Time option is set to 120 and the customer has been waiting for 120 seconds and there are still 400 seconds estimated hold time, then they are both active at the same time and this setting will be checked to see what options will be offered. Default is WAIT only||
|
If both Estimated Hold Time options and Wait Time options are active, this setting will define whether one, the other or both of these features are active. For example, if the Estimated Hold Time Option is set to 360, the Wait Time option is set to 120 and the customer has been waiting for 120 seconds and there are still 400 seconds estimated hold time, then they are both active at the same time and this setting will be checked to see what options will be offered. Default is WAIT only||
|
||||||
The LOCKED options are used to lock the value to the Quick Transfer Button even if the agent uses the transfer conference features during a cacll before using the Quick Transfer Button||
|
The LOCKED options are used to lock the value to the Quick Transfer Button even if the agent uses the transfer conference features during a cacll before using the Quick Transfer Button||
|
||||||
|
HANGUP will hang up the call when the timer is triggered, CALLMENU will send the call to the Call Menu specified in the Timer Action Destination field, EXTENSION will send the call to the Extension that is specified in the Timer Action Destination field, IN_GROUP will send the call to the In-Group specified in the Timer Action Destination field||
|
||||||
|
Timer Action Destination||
|
||||||
|
This field is where you specify the Call Menu, Extension or In-Group that you want the cacll sent to if the Time Action is set to CALLMENU, EXTENSION or IN_GROUP. Default is empty||
|
||||||
|
You must enter field options when adding a||
|
||||||
|
You must enter field options when updating a||
|
||||||
|
|
||||||
|
|
||||||
AST_VICIDIAL_ingrouplist.php
|
AST_VICIDIAL_ingrouplist.php
|
||||||
|
|||||||
@@ -51,10 +51,11 @@
|
|||||||
# 91228-1341 - Added API fields update functions
|
# 91228-1341 - Added API fields update functions
|
||||||
# 100109-1337 - Fixed Manual dial live call detection
|
# 100109-1337 - Fixed Manual dial live call detection
|
||||||
# 100527-0957 - Added send_dtmf, transfer_conference and park_call API functions
|
# 100527-0957 - Added send_dtmf, transfer_conference and park_call API functions
|
||||||
|
# 100727-2209 - Added timer actions for hangup, extension, callmenu and ingroup as well as destination
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.4-26';
|
$version = '2.4-27';
|
||||||
$build = '100527-0957';
|
$build = '100727-2209';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=32;
|
$mysql_log_count=32;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
@@ -388,7 +389,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
|||||||
}
|
}
|
||||||
|
|
||||||
### grab the API hangup and API dispo fields in vicidial_live_agents
|
### grab the API hangup and API dispo fields in vicidial_live_agents
|
||||||
$stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds,external_dtmf,external_transferconf,external_park from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
$stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds,external_dtmf,external_transferconf,external_park,external_timer_action_destination from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03010',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03010',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -405,6 +406,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
|||||||
$external_dtmf = $row[9];
|
$external_dtmf = $row[9];
|
||||||
$external_transferconf = $row[10];
|
$external_transferconf = $row[10];
|
||||||
$external_park = $row[11];
|
$external_park = $row[11];
|
||||||
|
$timer_action_destination = $row[12];
|
||||||
|
|
||||||
if (strlen($external_status)<1) {$external_status = '::::::::::';}
|
if (strlen($external_status)<1) {$external_status = '::::::::::';}
|
||||||
|
|
||||||
@@ -574,7 +576,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
|||||||
if ($Ashift_logout > 0)
|
if ($Ashift_logout > 0)
|
||||||
{$Alogin='SHIFT_LOGOUT';}
|
{$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 . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . "\n";
|
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 . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . "\n";
|
||||||
|
|
||||||
if (strlen($timer_action) > 3)
|
if (strlen($timer_action) > 3)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4169,7 +4169,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$script_recording_delay = $row[0];
|
$script_recording_delay = $row[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign';";
|
$stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action,timer_action_message,timer_action_seconds,timer_action_destination from vicidial_campaigns where campaign_id='$campaign';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00114',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00114',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -4190,10 +4190,10 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$VDCL_xferconf_c_number = $row[9];
|
$VDCL_xferconf_c_number = $row[9];
|
||||||
$VDCL_xferconf_d_number = $row[10];
|
$VDCL_xferconf_d_number = $row[10];
|
||||||
$VDCL_xferconf_e_number = $row[11];
|
$VDCL_xferconf_e_number = $row[11];
|
||||||
$VDCL_timer_action = $row[11];
|
$VDCL_timer_action = $row[12];
|
||||||
$VDCL_timer_action_message = $row[11];
|
$VDCL_timer_action_message = $row[13];
|
||||||
$VDCL_timer_action_seconds = $row[11];
|
$VDCL_timer_action_seconds = $row[14];
|
||||||
|
$VDCL_timer_action_destination = $row[15];
|
||||||
}
|
}
|
||||||
|
|
||||||
### Check for List ID override settings
|
### Check for List ID override settings
|
||||||
@@ -4220,7 +4220,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number||||\n|\n";
|
echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number||||$VDCL_timer_action_destination|\n|\n";
|
||||||
|
|
||||||
if (ereg('X',$dialed_label))
|
if (ereg('X',$dialed_label))
|
||||||
{
|
{
|
||||||
@@ -4281,7 +4281,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$script_recording_delay = $row[0];
|
$script_recording_delay = $row[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
$stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix,timer_action_destination from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -4314,8 +4314,9 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$VDCL_xferconf_e_number = $row[22];
|
$VDCL_xferconf_e_number = $row[22];
|
||||||
$VDCL_uniqueid_status_display = $row[23];
|
$VDCL_uniqueid_status_display = $row[23];
|
||||||
$VDCL_uniqueid_status_prefix = $row[24];
|
$VDCL_uniqueid_status_prefix = $row[24];
|
||||||
|
$VDCL_timer_action_destination = $row[25];
|
||||||
|
|
||||||
$stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';";
|
$stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action_destination from vicidial_campaigns where campaign_id='$campaign';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -4349,6 +4350,8 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
{$VDCL_xferconf_d_number = $row[12];}
|
{$VDCL_xferconf_d_number = $row[12];}
|
||||||
if (strlen($VDCL_xferconf_e_number) < 1)
|
if (strlen($VDCL_xferconf_e_number) < 1)
|
||||||
{$VDCL_xferconf_e_number = $row[13];}
|
{$VDCL_xferconf_e_number = $row[13];}
|
||||||
|
if (strlen($VDCL_timer_action_destination) < 1)
|
||||||
|
{$VDCL_timer_action_destination = $row[14];}
|
||||||
|
|
||||||
if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) )
|
if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) )
|
||||||
{
|
{
|
||||||
@@ -4403,7 +4406,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$VDADchannel_group';";
|
$stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action_destination from vicidial_campaigns where campaign_id='$VDADchannel_group';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -4426,6 +4429,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$VDCL_xferconf_c_number = $row[12];
|
$VDCL_xferconf_c_number = $row[12];
|
||||||
$VDCL_xferconf_d_number = $row[13];
|
$VDCL_xferconf_d_number = $row[13];
|
||||||
$VDCL_xferconf_e_number = $row[14];
|
$VDCL_xferconf_e_number = $row[14];
|
||||||
|
$VDCL_timer_action_destination = $row[15];
|
||||||
}
|
}
|
||||||
|
|
||||||
$script_recording_delay=0;
|
$script_recording_delay=0;
|
||||||
@@ -4493,8 +4497,8 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
}
|
}
|
||||||
|
|
||||||
### if web form is set then send on to vicidial.php for override of WEB_FORM address
|
### if web form is set then send on to vicidial.php for override of WEB_FORM address
|
||||||
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|\n";}
|
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|\n";}
|
||||||
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|\n";}
|
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|\n";}
|
||||||
|
|
||||||
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
|
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -4772,10 +4776,24 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$durationLimit = preg_replace('/\D/','',$SCUresponse[1]);
|
$durationLimit = preg_replace('/\D/','',$SCUresponse[1]);
|
||||||
}
|
}
|
||||||
if (strlen($durationLimit) < 1) {$durationLimit = 0;}
|
if (strlen($durationLimit) < 1) {$durationLimit = 0;}
|
||||||
|
$durationLimitSECnext = ( ($minuteswarning + 0) * 60);
|
||||||
$durationLimitSEC = ( ( ($durationLimit + 0) - $minuteswarning) * 60); # minutes - 3 for 3-minute-warning
|
$durationLimitSEC = ( ( ($durationLimit + 0) - $minuteswarning) * 60); # minutes - 3 for 3-minute-warning
|
||||||
if ($durationLimitSEC < 5) {$durationLimitSEC = 5;}
|
if ($durationLimitSEC < 5) {$durationLimitSEC = 5;}
|
||||||
|
if ( ($durationLimitSECnext < 30) or (strlen($durationLimitSECnext)<1) ) {$durationLimitSECnext = 30;}
|
||||||
|
|
||||||
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='$minuteswarning minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';";
|
$timer_action_destination='';
|
||||||
|
if (preg_match("/nextstep=/",$VDCL_start_call_url))
|
||||||
|
{
|
||||||
|
$nextstepARY = explode('nextstep=',$VDCL_start_call_url);
|
||||||
|
$nextstep = preg_replace("/&.*/",'',$nextstepARY[1]);
|
||||||
|
$nextmessageARY = explode('nextmessage=',$VDCL_start_call_url);
|
||||||
|
$nextmessage = preg_replace("/&.*/",'',$nextmessageARY[1]);
|
||||||
|
$destinationARY = explode('destination=',$VDCL_start_call_url);
|
||||||
|
$destination = preg_replace("/&.*/",'',$destinationARY[1]);
|
||||||
|
$timer_action_destination = "nextstep---$nextstep--$durationLimitSECnext--$destination--$nextmessage--";
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='$minuteswarning minute warning for customer',external_timer_action_seconds='$durationLimitSEC',external_timer_action_destination='$timer_action_destination' where user='$user';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$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);}
|
||||||
@@ -6359,7 +6377,10 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') )
|
|||||||
|
|
||||||
if ($comments != 'NO_STATUS_CHANGE')
|
if ($comments != 'NO_STATUS_CHANGE')
|
||||||
{
|
{
|
||||||
$stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';";
|
$vla_lead_wipeSQL='';
|
||||||
|
if ($ACTION == 'VDADready')
|
||||||
|
{$vla_lead_wipeSQL = ",lead_id=0";}
|
||||||
|
$stmt="UPDATE vicidial_live_agents set status='$stage' $vla_lead_wipeSQL where user='$user' and server_ip='$server_ip';";
|
||||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00166',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00166',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
|
|||||||
@@ -302,10 +302,11 @@
|
|||||||
# 100702-1315 - Custom List Fields functionality enabled
|
# 100702-1315 - Custom List Fields functionality enabled
|
||||||
# 100712-1441 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
|
# 100712-1441 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
|
||||||
# 100723-1522 - Added LOCKED options for quick transfer button feature
|
# 100723-1522 - Added LOCKED options for quick transfer button feature
|
||||||
|
# 100726-1233 - Added HANGUP, CALLMENU, EXTENSION, IN_GROUP timer actions
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.4-280';
|
$version = '2.4-281';
|
||||||
$build = '100723-1522';
|
$build = '100726-1233';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=66;
|
$mysql_log_count=66;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
@@ -1246,7 +1247,7 @@ else
|
|||||||
$HKstatusnames = substr("$HKstatusnames", 0, -1);
|
$HKstatusnames = substr("$HKstatusnames", 0, -1);
|
||||||
|
|
||||||
##### grab the campaign settings
|
##### grab the campaign settings
|
||||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
@@ -1324,6 +1325,7 @@ else
|
|||||||
$blind_monitor_warning = $row[70];
|
$blind_monitor_warning = $row[70];
|
||||||
$blind_monitor_message = $row[71];
|
$blind_monitor_message = $row[71];
|
||||||
$blind_monitor_filename = $row[72];
|
$blind_monitor_filename = $row[72];
|
||||||
|
$timer_action_destination = $row[73];
|
||||||
|
|
||||||
if ($manual_dial_override == 'ALLOW_ALL')
|
if ($manual_dial_override == 'ALLOW_ALL')
|
||||||
{$agentcall_manual = 1;}
|
{$agentcall_manual = 1;}
|
||||||
@@ -2952,9 +2954,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
var campaign_timer_action = '<?php echo $timer_action ?>';
|
var campaign_timer_action = '<?php echo $timer_action ?>';
|
||||||
var campaign_timer_action_message = '<?php echo $timer_action_message ?>';
|
var campaign_timer_action_message = '<?php echo $timer_action_message ?>';
|
||||||
var campaign_timer_action_seconds = '<?php echo $timer_action_seconds ?>';
|
var campaign_timer_action_seconds = '<?php echo $timer_action_seconds ?>';
|
||||||
|
var campaign_timer_action_destination = '<?php echo $timer_action_destination ?>';
|
||||||
var timer_action='';
|
var timer_action='';
|
||||||
var timer_action_message='';
|
var timer_action_message='';
|
||||||
var timer_action_seconds='';
|
var timer_action_seconds='';
|
||||||
|
var timer_action_destination = '';
|
||||||
var is_webphone='<?php echo $is_webphone ?>';
|
var is_webphone='<?php echo $is_webphone ?>';
|
||||||
var WebPhonEurl='<?php echo $WebPhonEurl ?>';
|
var WebPhonEurl='<?php echo $WebPhonEurl ?>';
|
||||||
var pause_code_counter=1;
|
var pause_code_counter=1;
|
||||||
@@ -2992,6 +2996,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
var api_transferconf_override='';
|
var api_transferconf_override='';
|
||||||
var api_parkcustomer='';
|
var api_parkcustomer='';
|
||||||
var API_selected_xfergroup='';
|
var API_selected_xfergroup='';
|
||||||
|
var API_selected_callmenu=''
|
||||||
var custom_fields_enabled='<?php echo $custom_fields_enabled ?>';
|
var custom_fields_enabled='<?php echo $custom_fields_enabled ?>';
|
||||||
var form_contents_loaded=0;
|
var form_contents_loaded=0;
|
||||||
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
|
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
|
||||||
@@ -3677,6 +3682,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
api_timer_action_message = APITimerMessage_array[1];
|
api_timer_action_message = APITimerMessage_array[1];
|
||||||
var APITimerSeconds_array = check_time_array[19].split("APITimerSeconds: ");
|
var APITimerSeconds_array = check_time_array[19].split("APITimerSeconds: ");
|
||||||
api_timer_action_seconds = APITimerSeconds_array[1];
|
api_timer_action_seconds = APITimerSeconds_array[1];
|
||||||
|
var APITimerDestination_array = check_time_array[23].split("APITimerDestination: ");
|
||||||
|
api_timer_action_destination = APITimerDestination_array[1];
|
||||||
var APIdtmf_array = check_time_array[20].split("APIdtmf: ");
|
var APIdtmf_array = check_time_array[20].split("APIdtmf: ");
|
||||||
api_dtmf = APIdtmf_array[1];
|
api_dtmf = APIdtmf_array[1];
|
||||||
var APItransfercond_array = check_time_array[21].split("APItransferconf: ");
|
var APItransfercond_array = check_time_array[21].split("APItransferconf: ");
|
||||||
@@ -3757,6 +3764,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
timer_action = api_timer_action;
|
timer_action = api_timer_action;
|
||||||
timer_action_message = api_timer_action_message;
|
timer_action_message = api_timer_action_message;
|
||||||
timer_action_seconds = api_timer_action_seconds;
|
timer_action_seconds = api_timer_action_seconds;
|
||||||
|
timer_action_destination = api_timer_action_destination;
|
||||||
|
// alert("TIMER_API:" + timer_action + '|' + timer_action_message + '|' + timer_action_seconds + '|' + timer_action_destination + '|');
|
||||||
}
|
}
|
||||||
if ( (APIHanguP==1) && (VD_live_customer_call==1) )
|
if ( (APIHanguP==1) && (VD_live_customer_call==1) )
|
||||||
{
|
{
|
||||||
@@ -3864,8 +3873,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
{VICIDiaL_closer_blended = '0';}
|
{VICIDiaL_closer_blended = '0';}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ above section working on API functions
|
|
||||||
var check_conf_array=check_ALL_array[1].split("|");
|
var check_conf_array=check_ALL_array[1].split("|");
|
||||||
var live_conf_calls = check_conf_array[0];
|
var live_conf_calls = check_conf_array[0];
|
||||||
var conf_chan_array = check_conf_array[1].split(" ~");
|
var conf_chan_array = check_conf_array[1].split(" ~");
|
||||||
@@ -4266,21 +4273,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
{blindxferdialstring = temp_dial_prefix + "" + temp_phone_code + "" + blindxferdialstring;}
|
{blindxferdialstring = temp_dial_prefix + "" + temp_phone_code + "" + blindxferdialstring;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (API_selected_callmenu.length > 0)
|
||||||
|
{
|
||||||
|
var blindxferdialstring = 's';
|
||||||
|
var blindxfercontext = document.vicidial_form.xfernumber.value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{var blindxfercontext = ext_context;}
|
||||||
no_delete_VDAC=0;
|
no_delete_VDAC=0;
|
||||||
if (taskvar == 'XfeRVMAIL')
|
if (taskvar == 'XfeRVMAIL')
|
||||||
{
|
{
|
||||||
var blindxferdialstring = campaign_am_message_exten + '*' + campaign + '*' + document.vicidial_form.phone_code.value + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value;
|
var blindxferdialstring = campaign_am_message_exten + '*' + campaign + '*' + document.vicidial_form.phone_code.value + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value;
|
||||||
no_delete_VDAC=1;
|
no_delete_VDAC=1;
|
||||||
}
|
}
|
||||||
if (blindxferdialstring.length<'2')
|
if (blindxferdialstring.length<'1')
|
||||||
{
|
{
|
||||||
xferredirect_query='';
|
xferredirect_query='';
|
||||||
taskvar = 'NOTHING';
|
taskvar = 'NOTHING';
|
||||||
alert("Transfer number must have more than 1 digit:" + blindxferdialstring);
|
alert("Transfer number must have at least 1 digit:" + blindxferdialstring);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id + "&nodeletevdac=" + no_delete_VDAC;
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + blindxfercontext + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id + "&nodeletevdac=" + no_delete_VDAC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (taskvar == 'XfeRINTERNAL')
|
if (taskvar == 'XfeRINTERNAL')
|
||||||
@@ -5762,6 +5776,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
timer_action = campaign_timer_action;
|
timer_action = campaign_timer_action;
|
||||||
timer_action_message = campaign_timer_action_message;
|
timer_action_message = campaign_timer_action_message;
|
||||||
timer_action_seconds = campaign_timer_action_seconds;
|
timer_action_seconds = campaign_timer_action_seconds;
|
||||||
|
timer_action_destination = campaign_timer_action_destination;
|
||||||
|
|
||||||
lead_dial_number = document.vicidial_form.phone_number.value;
|
lead_dial_number = document.vicidial_form.phone_number.value;
|
||||||
var dispnum = document.vicidial_form.phone_number.value;
|
var dispnum = document.vicidial_form.phone_number.value;
|
||||||
@@ -6100,10 +6115,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
load_script_contents();
|
load_script_contents();
|
||||||
FormContentsLoad();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (custom_fields_enabled > 0)
|
||||||
|
{
|
||||||
|
FormContentsLoad();
|
||||||
|
}
|
||||||
if (get_call_launch == 'SCRIPT')
|
if (get_call_launch == 'SCRIPT')
|
||||||
{
|
{
|
||||||
if (delayed_script_load == 'YES')
|
if (delayed_script_load == 'YES')
|
||||||
@@ -6495,10 +6513,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
load_script_contents();
|
load_script_contents();
|
||||||
FormContentsLoad();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (custom_fields_enabled > 0)
|
||||||
|
{
|
||||||
|
FormContentsLoad();
|
||||||
|
}
|
||||||
if (get_call_launch == 'SCRIPT')
|
if (get_call_launch == 'SCRIPT')
|
||||||
{
|
{
|
||||||
if (delayed_script_load == 'YES')
|
if (delayed_script_load == 'YES')
|
||||||
@@ -6888,14 +6909,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
timer_action = campaign_timer_action;
|
timer_action = campaign_timer_action;
|
||||||
timer_action_message = campaign_timer_action_message;
|
timer_action_message = campaign_timer_action_message;
|
||||||
timer_action_seconds = campaign_timer_action_seconds;
|
timer_action_seconds = campaign_timer_action_seconds;
|
||||||
|
timer_action_destination = campaign_timer_action_destination;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var call_timer_action_message = VDIC_data_VDIG[19];
|
var call_timer_action_message = VDIC_data_VDIG[19];
|
||||||
var call_timer_action_seconds = VDIC_data_VDIG[20];
|
var call_timer_action_seconds = VDIC_data_VDIG[20];
|
||||||
|
var call_timer_action_destination = VDIC_data_VDIG[27];
|
||||||
timer_action = call_timer_action;
|
timer_action = call_timer_action;
|
||||||
timer_action_message = call_timer_action_message;
|
timer_action_message = call_timer_action_message;
|
||||||
timer_action_seconds = call_timer_action_seconds;
|
timer_action_seconds = call_timer_action_seconds;
|
||||||
|
timer_action_destination = call_timer_action_destination;
|
||||||
}
|
}
|
||||||
|
|
||||||
CalL_XC_c_NuMber = VDIC_data_VDIG[21];
|
CalL_XC_c_NuMber = VDIC_data_VDIG[21];
|
||||||
@@ -7453,10 +7477,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
load_script_contents();
|
load_script_contents();
|
||||||
FormContentsLoad();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (custom_fields_enabled > 0)
|
||||||
|
{
|
||||||
|
FormContentsLoad();
|
||||||
|
}
|
||||||
if (CalL_AutO_LauncH == 'SCRIPT')
|
if (CalL_AutO_LauncH == 'SCRIPT')
|
||||||
{
|
{
|
||||||
if (delayed_script_load == 'YES')
|
if (delayed_script_load == 'YES')
|
||||||
@@ -8562,6 +8589,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
uniqueid_status_prefix='';
|
uniqueid_status_prefix='';
|
||||||
custom_call_id='';
|
custom_call_id='';
|
||||||
API_selected_xfergroup='';
|
API_selected_xfergroup='';
|
||||||
|
API_selected_callmenu='';
|
||||||
|
timer_action='';
|
||||||
|
timer_action_seconds='';
|
||||||
|
timer_action_mesage='';
|
||||||
|
timer_action_destination='';
|
||||||
|
|
||||||
if (manual_dial_in_progress==1)
|
if (manual_dial_in_progress==1)
|
||||||
{
|
{
|
||||||
@@ -8752,6 +8784,31 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;
|
document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;
|
||||||
basic_originate_call(CalL_XC_e_NuMber,'NO','YES',session_id,'YES','','1','0');
|
basic_originate_call(CalL_XC_e_NuMber,'NO','YES',session_id,'YES','','1','0');
|
||||||
}
|
}
|
||||||
|
function hangup_timer_xfer()
|
||||||
|
{
|
||||||
|
hideDiv('CustomerGoneBox');
|
||||||
|
WaitingForNextStep=0;
|
||||||
|
custchannellive=0;
|
||||||
|
|
||||||
|
dialedcall_send_hangup();
|
||||||
|
}
|
||||||
|
function extension_timer_xfer()
|
||||||
|
{
|
||||||
|
document.vicidial_form.xfernumber.value = timer_action_destination;
|
||||||
|
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||||
|
}
|
||||||
|
function callmenu_timer_xfer()
|
||||||
|
{
|
||||||
|
API_selected_callmenu = timer_action_destination;
|
||||||
|
document.vicidial_form.xfernumber.value = timer_action_destination;
|
||||||
|
mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip);
|
||||||
|
}
|
||||||
|
function ingroup_timer_xfer()
|
||||||
|
{
|
||||||
|
API_selected_xfergroup = timer_action_destination;
|
||||||
|
document.vicidial_form.xfernumber.value = timer_action_destination;
|
||||||
|
mainxfer_send_redirect('XfeRLOCAL',lastcustchannel,lastcustserverip);
|
||||||
|
}
|
||||||
|
|
||||||
// ################################################################################
|
// ################################################################################
|
||||||
// Show message that customer has hungup the call before agent has
|
// Show message that customer has hungup the call before agent has
|
||||||
@@ -10417,6 +10474,7 @@ else
|
|||||||
// Finish the wrapup timer early
|
// Finish the wrapup timer early
|
||||||
function TimerActionRun(taskaction,taskdialalert)
|
function TimerActionRun(taskaction,taskdialalert)
|
||||||
{
|
{
|
||||||
|
var next_action=0;
|
||||||
if (taskaction == 'DiaLAlerT')
|
if (taskaction == 'DiaLAlerT')
|
||||||
{
|
{
|
||||||
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert.replace("\n","<BR>") + "</b>";
|
document.getElementById("TimerContentSpan").innerHTML = "<b>DIAL ALERT:<BR><BR>" + taskdialalert.replace("\n","<BR>") + "</b>";
|
||||||
@@ -10462,8 +10520,43 @@ else
|
|||||||
{
|
{
|
||||||
DtMf_PreSet_e_DiaL();
|
DtMf_PreSet_e_DiaL();
|
||||||
}
|
}
|
||||||
|
if ( (timer_action == 'HANGUP') && (VD_live_customer_call==1) )
|
||||||
|
{
|
||||||
|
hangup_timer_xfer();
|
||||||
|
}
|
||||||
|
if ( (timer_action == 'EXTENSION') && (VD_live_customer_call==1) && (timer_action_destination.length > 0) )
|
||||||
|
{
|
||||||
|
extension_timer_xfer();
|
||||||
|
}
|
||||||
|
if ( (timer_action == 'CALLMENU') && (VD_live_customer_call==1) && (timer_action_destination.length > 0) )
|
||||||
|
{
|
||||||
|
callmenu_timer_xfer();
|
||||||
|
}
|
||||||
|
if ( (timer_action == 'IN_GROUP') && (VD_live_customer_call==1) && (timer_action_destination.length > 0) )
|
||||||
|
{
|
||||||
|
ingroup_timer_xfer();
|
||||||
|
}
|
||||||
|
if (timer_action_destination.length > 0)
|
||||||
|
{
|
||||||
|
var regNS = new RegExp("nextstep---","ig");
|
||||||
|
if (timer_action_destination.match(regNS))
|
||||||
|
{
|
||||||
|
next_action=1;
|
||||||
|
timer_action = 'NONE';
|
||||||
|
var next_action_array=timer_action_destination.split("nextstep---");
|
||||||
|
var next_action_details_array=next_action_array[1].split("--");
|
||||||
|
timer_action = next_action_details_array[0];
|
||||||
|
timer_action_seconds = parseInt(next_action_details_array[1]);
|
||||||
|
timer_action_seconds = (timer_action_seconds + VD_live_call_secondS);
|
||||||
|
timer_action_destination = next_action_details_array[2];
|
||||||
|
timer_action_message = next_action_details_array[3];
|
||||||
|
// alert("NEXT: " + timer_action + '|' + timer_action_message + '|' + timer_action_seconds + '|' + timer_action_destination + '|');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
timer_action = 'NONE';
|
|
||||||
|
if (next_action < 1)
|
||||||
|
{timer_action = 'NONE';}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -22,6 +22,7 @@
|
|||||||
# 100428-1039 - Added custom fields display
|
# 100428-1039 - Added custom fields display
|
||||||
# 100507-1339 - Added copy carrier submenu
|
# 100507-1339 - Added copy carrier submenu
|
||||||
# 100616-2350 - Added VIDPROMPT call menu options
|
# 100616-2350 - Added VIDPROMPT call menu options
|
||||||
|
# 100728-0904 - Changed Lead Loader link to the new 3rd gen lead loader
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -1036,7 +1037,7 @@ $SScustom_fields_enabled = $row[3];
|
|||||||
</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="<?php echo $ADMIN ?>?ADD=121"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> <?php echo $DNClink ?> </a>
|
<a href="<?php echo $ADMIN ?>?ADD=121"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> <?php echo $DNClink ?> </a>
|
||||||
</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="./new_listloader_superL.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Load New Leads </a>
|
<a href="./admin_listloader_third_gen.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Load New Leads </a>
|
||||||
<?php
|
<?php
|
||||||
if ($SScustom_fields_enabled > 0)
|
if ($SScustom_fields_enabled > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,10 +39,11 @@
|
|||||||
# 100707-1040 - Converted List Id Override and Phone Code Override to drop downs <mikec>
|
# 100707-1040 - Converted List Id Override and Phone Code Override to drop downs <mikec>
|
||||||
# 100707-1156 - Made it so you cannot submit with no lead file selected. Also fixed Start Over Link <mikec>
|
# 100707-1156 - Made it so you cannot submit with no lead file selected. Also fixed Start Over Link <mikec>
|
||||||
# 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
|
# 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
|
||||||
|
# 100728-0900 - Filtered uploaded filenames for unsupported characters
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.4-38';
|
$version = '2.4-39';
|
||||||
$build = '100712-1416';
|
$build = '100728-0900';
|
||||||
|
|
||||||
|
|
||||||
require("dbconnect.php");
|
require("dbconnect.php");
|
||||||
@@ -443,7 +444,7 @@ if ( (!$OK_to_process) or ( ($leadfile) and ($file_layout!="standard") ) )
|
|||||||
<tr>
|
<tr>
|
||||||
<td align=center colspan=2><input type=submit value="SUBMIT" name='submit_file'> <input type=button onClick="javascript:document.location='admin_listloader_third_gen.php'" value="START OVER" name='reload_page'></td>
|
<td align=center colspan=2><input type=submit value="SUBMIT" name='submit_file'> <input type=button onClick="javascript:document.location='admin_listloader_third_gen.php'" value="START OVER" name='reload_page'></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td align=left><font size=1> <a href="admin.php?ADD=100" target="_parent">BACK TO ADMIN</a></font></td><td align=right><font size=1>LIST LOADER 3rd Gen- VERSION: <?php echo $version ?> BUILD: <?php echo $build ?> </td></tr>
|
<tr><td align=left><font size=1> <a href="admin.php?ADD=100" target="_parent">BACK TO ADMIN</a> <a href="./new_listloader_superL.php">Old Lead Loader</a> </font></td><td align=right><font size=1>LIST LOADER 3rd Gen- VERSION: <?php echo $version ?> BUILD: <?php echo $build ?> </td></tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -931,6 +932,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
# csv xls xlsx ods sxc conversion
|
# csv xls xlsx ods sxc conversion
|
||||||
if (preg_match("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", $leadfile_name))
|
if (preg_match("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", $leadfile_name))
|
||||||
{
|
{
|
||||||
|
$leadfile_name = ereg_replace("[^-\.\_0-9a-zA-Z]","_",$leadfile_name);
|
||||||
copy($LF_path, "/tmp/$leadfile_name");
|
copy($LF_path, "/tmp/$leadfile_name");
|
||||||
$new_filename = preg_replace("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", '.txt', $leadfile_name);
|
$new_filename = preg_replace("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", '.txt', $leadfile_name);
|
||||||
$convert_command = "$WeBServeRRooT/$admin_web_directory/sheet2tab.pl /tmp/$leadfile_name /tmp/$new_filename";
|
$convert_command = "$WeBServeRRooT/$admin_web_directory/sheet2tab.pl /tmp/$leadfile_name /tmp/$new_filename";
|
||||||
@@ -1337,6 +1339,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
$delim_set=0;
|
$delim_set=0;
|
||||||
if (preg_match("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", $leadfile_name))
|
if (preg_match("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", $leadfile_name))
|
||||||
{
|
{
|
||||||
|
$leadfile_name = ereg_replace("[^-\.\_0-9a-zA-Z]","_",$leadfile_name);
|
||||||
copy($LF_path, "/tmp/$leadfile_name");
|
copy($LF_path, "/tmp/$leadfile_name");
|
||||||
$new_filename = preg_replace("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", '.txt', $leadfile_name);
|
$new_filename = preg_replace("/\.csv$|\.xls$|\.xlsx$|\.ods$|\.sxc$/i", '.txt', $leadfile_name);
|
||||||
$convert_command = "$WeBServeRRooT/$admin_web_directory/sheet2tab.pl /tmp/$leadfile_name /tmp/$new_filename";
|
$convert_command = "$WeBServeRRooT/$admin_web_directory/sheet2tab.pl /tmp/$leadfile_name /tmp/$new_filename";
|
||||||
|
|||||||
@@ -12,10 +12,12 @@
|
|||||||
# 100509-0922 - Added copy fields options
|
# 100509-0922 - Added copy fields options
|
||||||
# 100510-1130 - Added DISPLAY field type option
|
# 100510-1130 - Added DISPLAY field type option
|
||||||
# 100629-0200 - Added SCRIPT field type option
|
# 100629-0200 - Added SCRIPT field type option
|
||||||
# 100722-1313 - Added field validation
|
# 100722-1313 - Added field validation for label and name
|
||||||
|
# 100728-1724 - Added field validation for select lists and checkbox/radio buttons
|
||||||
|
#
|
||||||
|
|
||||||
$admin_version = '2.4-7';
|
$admin_version = '2.4-8';
|
||||||
$build = '100722-1313';
|
$build = '100728-1724';
|
||||||
|
|
||||||
|
|
||||||
require("dbconnect.php");
|
require("dbconnect.php");
|
||||||
@@ -732,26 +734,50 @@ if ( ($action == "ADD_CUSTOM_FIELD") and ($list_id > 99) )
|
|||||||
{echo "ERROR: You must enter a field label, field name and field size - $list_id|$field_label|$field_name|$field_size\n<BR>";}
|
{echo "ERROR: You must enter a field label, field name and field size - $list_id|$field_label|$field_name|$field_size\n<BR>";}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($field_exists > 0)
|
$TEST_valid_options=0;
|
||||||
{echo "ERROR: Field already exists for this list - $list_id|$field_label\n<BR>";}
|
if ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') )
|
||||||
|
{
|
||||||
|
$TESTfield_options_array = explode("\n",$field_options);
|
||||||
|
$TESTfield_options_count = count($TESTfield_options_array);
|
||||||
|
$te=0;
|
||||||
|
while ($te < $TESTfield_options_count)
|
||||||
|
{
|
||||||
|
if (preg_match("/,/",$TESTfield_options_array[$te]))
|
||||||
|
{
|
||||||
|
$TESTfield_options_value_array = explode(",",$TESTfield_options_array[$te]);
|
||||||
|
if ( (strlen($TESTfield_options_value_array[0]) > 0) and (strlen($TESTfield_options_value_array[1]) > 0) )
|
||||||
|
{$TEST_valid_options++;}
|
||||||
|
}
|
||||||
|
$te++;
|
||||||
|
}
|
||||||
|
$field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') ) and ( (!preg_match("/,/",$field_options)) or (!preg_match("/\n/",$field_options)) or (strlen($field_options)<6) or ($TEST_valid_options < 1) ) )
|
||||||
|
{echo "ERROR: You must enter field options when adding a SELECT, MULTI, RADIO or CHECKBOX field type - $list_id|$field_label|$field_type|$field_options\n<BR>";}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$table_exists=0;
|
if ($field_exists > 0)
|
||||||
$linkCUSTOM=mysql_connect("$VARDB_server:$VARDB_port", "$VARDB_custom_user","$VARDB_custom_pass");
|
{echo "ERROR: Field already exists for this list - $list_id|$field_label\n<BR>";}
|
||||||
if (!$linkCUSTOM) {die("Could not connect: $VARDB_server|$VARDB_port|$VARDB_database|$VARDB_custom_user|$VARDB_custom_pass" . mysql_error());}
|
else
|
||||||
mysql_select_db("$VARDB_database", $linkCUSTOM);
|
{
|
||||||
|
$table_exists=0;
|
||||||
|
$linkCUSTOM=mysql_connect("$VARDB_server:$VARDB_port", "$VARDB_custom_user","$VARDB_custom_pass");
|
||||||
|
if (!$linkCUSTOM) {die("Could not connect: $VARDB_server|$VARDB_port|$VARDB_database|$VARDB_custom_user|$VARDB_custom_pass" . mysql_error());}
|
||||||
|
mysql_select_db("$VARDB_database", $linkCUSTOM);
|
||||||
|
|
||||||
$stmt="SHOW TABLES LIKE \"custom_$list_id\";";
|
$stmt="SHOW TABLES LIKE \"custom_$list_id\";";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
$tablecount_to_print = mysql_num_rows($rslt);
|
$tablecount_to_print = mysql_num_rows($rslt);
|
||||||
if ($tablecount_to_print > 0)
|
if ($tablecount_to_print > 0)
|
||||||
{$table_exists = 1;}
|
{$table_exists = 1;}
|
||||||
if ($DB>0) {echo "$stmt|$tablecount_to_print|$table_exists";}
|
if ($DB>0) {echo "$stmt|$tablecount_to_print|$table_exists";}
|
||||||
|
|
||||||
### add field function
|
### add field function
|
||||||
add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields);
|
add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields);
|
||||||
|
|
||||||
echo "SUCCESS: Custom Field Added - $list_id|$field_label\n<BR>";
|
echo "SUCCESS: Custom Field Added - $list_id|$field_label\n<BR>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -796,10 +822,34 @@ if ( ($action == "MODIFY_CUSTOM_FIELD_SUBMIT") and ($list_id > 99) and ($field_i
|
|||||||
{echo "ERROR: Table does not exist\n<BR>";}
|
{echo "ERROR: Table does not exist\n<BR>";}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
### modify field function
|
$TEST_valid_options=0;
|
||||||
modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields);
|
if ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') )
|
||||||
|
{
|
||||||
|
$TESTfield_options_array = explode("\n",$field_options);
|
||||||
|
$TESTfield_options_count = count($TESTfield_options_array);
|
||||||
|
$te=0;
|
||||||
|
while ($te < $TESTfield_options_count)
|
||||||
|
{
|
||||||
|
if (preg_match("/,/",$TESTfield_options_array[$te]))
|
||||||
|
{
|
||||||
|
$TESTfield_options_value_array = explode(",",$TESTfield_options_array[$te]);
|
||||||
|
if ( (strlen($TESTfield_options_value_array[0]) > 0) and (strlen($TESTfield_options_value_array[1]) > 0) )
|
||||||
|
{$TEST_valid_options++;}
|
||||||
|
}
|
||||||
|
$te++;
|
||||||
|
}
|
||||||
|
$field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM);
|
||||||
|
}
|
||||||
|
|
||||||
echo "SUCCESS: Custom Field Modified - $list_id|$field_label\n<BR>";
|
if ( ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') ) and ( (!preg_match("/,/",$field_options)) or (!preg_match("/\n/",$field_options)) or (strlen($field_options)<6) or ($TEST_valid_options < 1) ) )
|
||||||
|
{echo "ERROR: You must enter field options when updating a SELECT, MULTI, RADIO or CHECKBOX field type - $list_id|$field_label|$field_type|$field_options\n<BR>";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
### modify field function
|
||||||
|
modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields);
|
||||||
|
|
||||||
|
echo "SUCCESS: Custom Field Modified - $list_id|$field_label\n<BR>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1466,10 +1516,12 @@ function add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field
|
|||||||
}
|
}
|
||||||
$field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM);
|
$field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM);
|
||||||
$field_cost = strlen($field_options_ENUM);
|
$field_cost = strlen($field_options_ENUM);
|
||||||
|
if ($field_cost < 1) {$field_cost=1;};
|
||||||
$field_sql .= "VARCHAR($field_cost) ";
|
$field_sql .= "VARCHAR($field_cost) ";
|
||||||
}
|
}
|
||||||
if ($field_type=='TEXT')
|
if ($field_type=='TEXT')
|
||||||
{
|
{
|
||||||
|
if ($field_max < 1) {$field_max=1;};
|
||||||
$field_sql .= "VARCHAR($field_max) ";
|
$field_sql .= "VARCHAR($field_max) ";
|
||||||
$field_cost = ($field_max + $field_cost);
|
$field_cost = ($field_max + $field_cost);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,10 +35,11 @@
|
|||||||
# 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
|
# 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any
|
||||||
# 100718-0245 - Added update_lead function to update existing leads
|
# 100718-0245 - Added update_lead function to update existing leads
|
||||||
# 100723-1333 - Added no_update option to the update_lead function
|
# 100723-1333 - Added no_update option to the update_lead function
|
||||||
|
# 100728-1952 - Added delete_lead option to the update_lead function
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.4-21';
|
$version = '2.4-22';
|
||||||
$build = '100723-1333';
|
$build = '100728-1952';
|
||||||
|
|
||||||
require("dbconnect.php");
|
require("dbconnect.php");
|
||||||
|
|
||||||
@@ -153,6 +154,9 @@ if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
|
|||||||
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
||||||
if (isset($_GET["no_update"])) {$no_update=$_GET["no_update"];}
|
if (isset($_GET["no_update"])) {$no_update=$_GET["no_update"];}
|
||||||
elseif (isset($_POST["no_update"])) {$no_update=$_POST["no_update"];}
|
elseif (isset($_POST["no_update"])) {$no_update=$_POST["no_update"];}
|
||||||
|
if (isset($_GET["delete_lead"])) {$delete_lead=$_GET["delete_lead"];}
|
||||||
|
elseif (isset($_POST["delete_lead"])) {$delete_lead=$_POST["delete_lead"];}
|
||||||
|
|
||||||
|
|
||||||
header ("Content-type: text/html; charset=utf-8");
|
header ("Content-type: text/html; charset=utf-8");
|
||||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
@@ -242,6 +246,7 @@ if ($non_latin < 1)
|
|||||||
$list_id_field = ereg_replace("[^0-9]","",$list_id_field);
|
$list_id_field = ereg_replace("[^0-9]","",$list_id_field);
|
||||||
$lead_id = ereg_replace("[^0-9]","",$lead_id);
|
$lead_id = ereg_replace("[^0-9]","",$lead_id);
|
||||||
$no_update = ereg_replace("[^A-Z]","",$no_update);
|
$no_update = ereg_replace("[^A-Z]","",$no_update);
|
||||||
|
$delete_lead = ereg_replace("[^A-Z]","",$delete_lead);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1906,15 +1911,23 @@ if ($function == 'update_lead')
|
|||||||
{
|
{
|
||||||
$VLaffected_rows=0;
|
$VLaffected_rows=0;
|
||||||
$CFaffected_rows=0;
|
$CFaffected_rows=0;
|
||||||
if (strlen($VL_update_SQL)>6)
|
if ( (strlen($VL_update_SQL)>6) or ($delete_lead=='Y') )
|
||||||
{
|
{
|
||||||
$stmt = "UPDATE vicidial_list SET $VL_update_SQL where lead_id='$search_lead_id[$n]';";
|
if ($delete_lead=='Y')
|
||||||
|
{
|
||||||
|
$stmt = "DELETE from vicidial_list where lead_id='$search_lead_id[$n]';";
|
||||||
|
$result_reason = "update_lead LEAD HAS BEEN DELETED";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt = "UPDATE vicidial_list SET $VL_update_SQL where lead_id='$search_lead_id[$n]';";
|
||||||
|
$result_reason = "update_lead LEAD HAS BEEN UPDATED";
|
||||||
|
}
|
||||||
if ($DB>0) {echo "DEBUG: update_lead query - $stmt\n";}
|
if ($DB>0) {echo "DEBUG: update_lead query - $stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
$VLaffected_rows = mysql_affected_rows($link);
|
$VLaffected_rows = mysql_affected_rows($link);
|
||||||
|
|
||||||
$result = 'SUCCESS';
|
$result = 'SUCCESS';
|
||||||
$result_reason = "update_lead LEAD HAS BEEN UPDATED";
|
|
||||||
echo "$result: $result_reason - $user|$search_lead_id[$n]\n";
|
echo "$result: $result_reason - $user|$search_lead_id[$n]\n";
|
||||||
$data = "$phone_number|$list_id|$lead_id|$gmt_offset";
|
$data = "$phone_number|$list_id|$lead_id|$gmt_offset";
|
||||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||||
|
|||||||
Reference in New Issue
Block a user