From 87895e6d7addc287034cffffcdea5187add1fff5 Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 15 Jan 2007 17:39:31 +0000 Subject: [PATCH] added options for using BLEND INBND _I _B _C to denote CLOSER campaigns git-svn-id: svn://192.168.202.10@461 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/agi/agi-VDAD_LB_closer.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDAD_LB_closer_inbound.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDAD_LB_closer_inboundCID.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDAD_LO_closer.agi | 9 +++++---- agc_2-X/trunk/agi/agi-VDAD_LO_closer_inbound.agi | 9 +++++---- agc_2-X/trunk/agi/agi-VDADcloser.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_PHONE.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_inbound.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_inboundANI.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_inboundCID.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_inboundCIDlookup.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_inbound_5ID.agi | 5 +++-- agc_2-X/trunk/agi/agi-VDADcloser_inbound_NOCID.agi | 5 +++-- agc_2-X/trunk/bin/AST_VDadapt.pl | 5 +++-- agc_2-X/trunk/bin/AST_VDauto_dial.pl | 3 ++- agc_2-X/trunk/www/agc/manager_send.php | 3 ++- agc_2-X/trunk/www/agc/vdc_db_query.php | 7 ++++--- agc_2-X/trunk/www/agc/vicidial.php | 9 +++++---- agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php | 5 +++-- agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php | 5 +++-- agc_2-X/trunk/www/vicidial/admin.php | 3 ++- 21 files changed, 67 insertions(+), 46 deletions(-) diff --git a/agc_2-X/trunk/agi/agi-VDAD_LB_closer.agi b/agc_2-X/trunk/agi/agi-VDAD_LB_closer.agi index 78ac08fd..f8b10321 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_LB_closer.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_LB_closer.agi @@ -26,6 +26,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDAD_LB_closer.agi'; @@ -383,13 +384,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $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', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $VDADcampaign %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$VDADcampaign|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inbound.agi index bb9486e1..ce822c9a 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inbound.agi @@ -35,6 +35,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDAD_LB_closer_inbound.agi'; @@ -426,13 +427,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inboundCID.agi b/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inboundCID.agi index fe5e37ca..2005c56c 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inboundCID.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_LB_closer_inboundCID.agi @@ -35,6 +35,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDAD_LB_closer_inboundCID.agi'; @@ -425,13 +426,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDAD_LO_closer.agi b/agc_2-X/trunk/agi/agi-VDAD_LO_closer.agi index 7221b118..574b8555 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_LO_closer.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_LO_closer.agi @@ -27,6 +27,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDAD_LO_closer.agi'; @@ -384,13 +385,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $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', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $VDADcampaign %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$VDADcampaign|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -473,13 +474,13 @@ if ($channel_status < 1) if ($rec_countWAITrem < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and server_ip!='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $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', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and server_ip!='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $VDADcampaign %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$affected_rows|update of vla table: $channel_group|\n|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and server_ip!='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and server_ip!='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDAD_LO_closer_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_LO_closer_inbound.agi index bd001b25..a19e6587 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_LO_closer_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_LO_closer_inbound.agi @@ -36,6 +36,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDAD_LO_closer_inbound.agi'; @@ -428,13 +429,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -522,13 +523,13 @@ if ($channel_status < 1) if ($rec_countWAITrem < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and server_ip!='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid', call_server_ip='$VARserver_ip' where status IN('CLOSER','READY') and server_ip!='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$affected_rows|update of vla table: $channel_group|\n|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and server_ip!='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension,server_ip FROM vicidial_live_agents where status = 'QUEUE' and server_ip!='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser.agi b/agc_2-X/trunk/agi/agi-VDADcloser.agi index 28f569f4..7c6d51c8 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser.agi @@ -24,6 +24,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser.agi'; @@ -378,12 +379,12 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $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', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $VDADcampaign %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$VDADcampaign|$stmtA|"; &agi_output;} if ($affected_rows > 0) { - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_PHONE.agi b/agc_2-X/trunk/agi/agi-VDADcloser_PHONE.agi index b271f66d..6994e1a6 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_PHONE.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_PHONE.agi @@ -43,6 +43,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_PHONE.agi'; @@ -420,13 +421,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $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', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $VDADcampaign %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$VDADcampaign|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_inbound.agi b/agc_2-X/trunk/agi/agi-VDADcloser_inbound.agi index d56a3492..604a0f53 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_inbound.agi @@ -34,6 +34,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_inbound.agi'; @@ -426,13 +427,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_inboundANI.agi b/agc_2-X/trunk/agi/agi-VDADcloser_inboundANI.agi index 3c3f5740..2f8a544c 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_inboundANI.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_inboundANI.agi @@ -33,6 +33,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_inboundANI.agi'; @@ -415,13 +416,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_inboundCID.agi b/agc_2-X/trunk/agi/agi-VDADcloser_inboundCID.agi index b2a9961e..8e1f4225 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_inboundCID.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_inboundCID.agi @@ -35,6 +35,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_inboundCID.agi'; @@ -431,13 +432,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_inboundCIDlookup.agi b/agc_2-X/trunk/agi/agi-VDADcloser_inboundCIDlookup.agi index f8ea922d..99964135 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_inboundCIDlookup.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_inboundCIDlookup.agi @@ -34,6 +34,7 @@ # 60811-1145 - changed to use /etc/astguiclient.conf for configs # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_inboundCIDlookup.agi'; @@ -452,13 +453,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_inbound_5ID.agi b/agc_2-X/trunk/agi/agi-VDADcloser_inbound_5ID.agi index 4a02d49b..204d56e5 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_inbound_5ID.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_inbound_5ID.agi @@ -34,6 +34,7 @@ # 60821-1021 - added output options check from database # - changed look for agent every 0.5 second for first 4 sec on hold # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_inbound_5ID.agi'; @@ -424,13 +425,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/agi/agi-VDADcloser_inbound_NOCID.agi b/agc_2-X/trunk/agi/agi-VDADcloser_inbound_NOCID.agi index 8f58aa6d..9a3459d4 100644 --- a/agc_2-X/trunk/agi/agi-VDADcloser_inbound_NOCID.agi +++ b/agc_2-X/trunk/agi/agi-VDADcloser_inbound_NOCID.agi @@ -33,6 +33,7 @@ # 60811-1145 - changed to use /etc/astguiclient.conf for configs # 60821-1021 - added output options check from database # 60905-1047 - changed look for agent every 0.25 second for first 4 sec on hold +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $script = 'agi-VDADcloser_inbound_NOCID.agi'; @@ -423,13 +424,13 @@ if ($channel_status < 1) if ($rec_countWAIT < 1) { - $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; + $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$new_lead_id',uniqueid='$unique_id', channel='$channel', callerid='$callerid' where status IN('CLOSER','READY') and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and closer_campaigns LIKE \"% $channel_group %\" and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; my $affected_rows = $dbhA->do($stmtA); if ($AGILOG) {$agi_string = "-- VDAD get agent: |$affected_rows|$channel_group|$stmtA|"; &agi_output;} if ($affected_rows > 0) { $cbc=0; - $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%CLOSER%\" and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; + $stmtA = "SELECT conf_exten,user,extension FROM vicidial_live_agents where status = 'QUEUE' and server_ip='$VARserver_ip' and campaign_id REGEXP '(CLOSER|BLEND|INBND|_C\$|_B\$|_I\$)' and callerid='$callerid' and channel='$channel' order by last_call_time limit 1;"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; diff --git a/agc_2-X/trunk/bin/AST_VDadapt.pl b/agc_2-X/trunk/bin/AST_VDadapt.pl index c3076783..2efe201d 100644 --- a/agc_2-X/trunk/bin/AST_VDadapt.pl +++ b/agc_2-X/trunk/bin/AST_VDadapt.pl @@ -15,6 +15,7 @@ # 60828-1149 - add field for target dial_level difference, -1 would target one agent waiting, +1 would target 1 customer waiting # 60919-1243 - changed variables to use arrays for all campaign-specific values # 61215-1110 - added answered calls stats and use drops as percentage of answered for today +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # # constants @@ -373,7 +374,7 @@ foreach(@campaign_id) $agents_average_onemin[$i]=0; ### Grab the count of agents and lines - if ($campaign_id[$i] !~ /CLOSER/) + if ($campaign_id[$i] !~ /(CLOSER|BLEND|INBND|_C$|_B$|_I$)/) { &count_agents_lines; } @@ -917,7 +918,7 @@ $VCSagents_active[$i] = ($VCSINCALL[$i] + $VCSREADY[$i] + $VCSCLOSER[$i]); ### END - GATHER STATS FOR THE vicidial_campaign_stats TABLE ### -if ($campaign_id[$i] =~ /CLOSER/) +if ($campaign_id[$i] =~ /(CLOSER|BLEND|INBND|_C$|_B$|_I$)/) { # GET AVERAGES FROM THIS CAMPAIGN $stmtA = "SELECT differential_onemin,agents_average_onemin from vicidial_campaign_stats where campaign_id='$campaign_id[$i]';"; diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl index 75b1eb6b..063279c2 100644 --- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl +++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl @@ -53,6 +53,7 @@ # 61003-1353 - added restrictions for server trunks # 61113-1625 - added code for clearing VDAC LIVE jams # 61115-1725 - added OUTBALANCE to call calculation for call_type for balance dialing +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # @@ -433,7 +434,7 @@ while($one_day_interval > 0) ### see how many calls are alrady active per campaign per server and ### subtract that number from goalcalls to determine how many new ### calls need to be placed in this loop - if ($DBIPcampaign[$user_CIPct] =~ /CLOSER/) + if ($DBIPcampaign[$user_CIPct] =~ /(CLOSER|BLEND|INBND|_C$|_B$|_I$)/) { if (length($DBIPclosercamp[$user_CIPct]) > 2) { diff --git a/agc_2-X/trunk/www/agc/manager_send.php b/agc_2-X/trunk/www/agc/manager_send.php index d8434635..4a10e33b 100644 --- a/agc_2-X/trunk/www/agc/manager_send.php +++ b/agc_2-X/trunk/www/agc/manager_send.php @@ -64,6 +64,7 @@ # 61004-1526 - Added parsing of volume control command and lookup or number # 61130-1617 - Added lead_id to MonitorConf for recording_log # 61201-1115 - Added user to MonitorConf for recording_log +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # require("dbconnect.php"); @@ -430,7 +431,7 @@ if ($ACTION=="RedirectVD") else { if (strlen($call_server_ip)>6) {$server_ip = $call_server_ip;} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) { $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$secondS',status='XFER' where lead_id='$lead_id' order by start_epoch desc limit 1;"; if ($format=='debug') {echo "\n";} diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 061ed61c..cbbdac7e 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -110,6 +110,7 @@ # 60821-1647 - Added ability to not delete sessions at logout # 60906-1124 - Added lookup and sending of callback data for CALLBK calls # 61128-2229 - Added vicidial_live_agents and vicidial_auto_calls manual dial entries +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # $version = '2.0.38'; @@ -844,7 +845,7 @@ if ($stage == "end") { if ($start_epoch < 1000) { - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) { ##### look for the channel in the UPDATED vicidial_manager record of the call initiation $stmt="SELECT start_epoch FROM vicidial_closer_log where phone_number='$phone_number' and lead_id='$lead_id' and user='$user';"; @@ -870,7 +871,7 @@ if ($stage == "end") } else {$length_in_sec = ($StarTtime - $start_epoch);} - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) { $stmt = "UPDATE vicidial_closer_log set end_epoch='$StarTtime', length_in_sec='$length_in_sec',status='DONE' where lead_id='$lead_id' order by start_epoch desc limit 1;"; if ($DB) {echo "$stmt\n";} @@ -1167,7 +1168,7 @@ if ($ACTION == 'VDADcheckINCOMING') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); - if (eregi("CLOSER",$campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$campaign)) { ### update the vicidial_closer_log user to INCALL $stmt = "UPDATE vicidial_closer_log set user='$user', comments='AUTO', list_id='$list_id', status='INCALL' where lead_id='$lead_id' order by closecallid desc limit 1;"; diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index bea279ad..1f2b1cca 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -135,6 +135,7 @@ # 70109-1128 - Fixed wrapup timer bug # 70109-1635 - Added option for HotKeys automatically dialing next number in manual mode # - Added option for alternate number dialing with hotkeys +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # require("dbconnect.php"); @@ -175,7 +176,7 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];} $phone_pass=ereg_replace("[^0-9a-zA-Z]","",$phone_pass); $VD_login=ereg_replace("[^0-9a-zA-Z]","",$VD_login); $VD_pass=ereg_replace("[^0-9a-zA-Z]","",$VD_pass); - $VD_campaign=ereg_replace("[^0-9a-zA-Z]","",$VD_campaign); + $VD_campaign=ereg_replace("[^0-9a-zA-Z_]","",$VD_campaign); $forever_stop=0; @@ -631,7 +632,7 @@ $VDloginDISPLAY=0; ##### grab the inbound groups to choose from if campaign contains CLOSER $VARingroups="''"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) { $VARingroups=''; $stmt="select group_id from vicidial_inbound_groups where active = 'Y' and group_id IN($closer_campaigns) order by group_id limit 20;"; @@ -884,7 +885,7 @@ else if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - if ( (eregi("CLOSER", $VD_campaign)) || ($campaign_leads_to_call > 0) ) + if ( (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) || ($campaign_leads_to_call > 0) ) { ### insert an entry into the user log for the login event $stmt = "INSERT INTO vicidial_user_log values('','$VD_login','LOGIN','$VD_campaign','$NOW_TIME','$StarTtimE')"; @@ -966,7 +967,7 @@ else $affected_rows = mysql_affected_rows($link); print "\n"; - if (eregi("CLOSER", $VD_campaign)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $VD_campaign)) { print "\n"; } diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index bdbba110..02ca13ee 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -23,6 +23,7 @@ # 61101-1647 - Added Usergroup column and user name option as well as sorting # 61102-1155 - made display of columns more modular, added ability to hide server info # 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -402,7 +403,7 @@ echo "\n\n"; ################################################################################### ###### OUTBOUND CALLS ################################################################################### -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -451,7 +452,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php index d31c80fd..47b4f009 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php @@ -10,6 +10,7 @@ # changes: # 61102-1616 - first build # 61215-1131 - added answered calls and drop percent taken from answered calls +# 70111-1600 - added ability to use BLEND/INBND/*_C/*_B/*_I as closer campaigns # header ("Content-type: text/html; charset=utf-8"); @@ -241,7 +242,7 @@ echo ""; ################################################################################ ###### OUTBOUND CALLS ################################################################################ -if (eregi("CLOSER",$group)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) { $stmt="select closer_campaigns from vicidial_campaigns where campaign_id='" . mysql_real_escape_string($group) . "';"; $rslt=mysql_query($stmt, $link); @@ -290,7 +291,7 @@ $parked_to_print = mysql_num_rows($rslt); if ($out_live > 9) {$F=''; $FG='';} if ($out_live > 14) {$F=''; $FG='';} - if (eregi("CLOSER",$group)) + if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)",$group)) {echo "$NFB$out_total$NFE current active calls      \n";} else {echo "$NFB$out_total$NFE calls being placed       \n";} diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 3ac60efc..fda133ce 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -806,6 +806,7 @@ $lead_filter_sql = ereg_replace(";","",$lead_filter_sql); # - Screen width definable at top of script, merged server_stats into this script # 70109-1638 - Added ALTPH2 and ADDR3 hotkey options for alt number dialing with HotKeys # 70109-1716 - Added concurrent_transfers option to vicidial_campaigns +# 70115-1152 - Aded (CLOSER|BLEND|INBND|_C$|_B$|_I$) options for CLOSER-type campaigns # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time @@ -6317,7 +6318,7 @@ echo "Wrapup Message: Use Internal DNC List: $NWB#vicidial_campaigns-use_internal_dnc$NWE\n"; -if (eregi("CLOSER", $campaign_id)) +if (eregi("(CLOSER|BLEND|INBND|_C$|_B$|_I$)", $campaign_id)) { echo "Allowed Inbound Groups:
"; echo " $NWB#vicidial_campaigns-closer_campaigns$NWE\n";