Added ability to search by callerid number when calls come into a DID and send matches to a different route
Added ability to clean up callerid numbers when calls come into a DID Renamed "In-Groups" header in admin.php to "Inbound" to reflect that it is not just for In-groups, but includes DIDs and Call Menus as well Added ability to download DNC numbers from the internal and campaign-specific DNC lists git-svn-id: svn://192.168.202.10@1494 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -241,6 +241,23 @@ OTHER CHANGES:
|
|||||||
listing of Phones, also forced level 7 users to the reports links page
|
listing of Phones, also forced level 7 users to the reports links page
|
||||||
if they try going anywhere in admin.php
|
if they try going anywhere in admin.php
|
||||||
|
|
||||||
|
53. Renamed "In-Groups" header in admin.php to "Inbound" to reflect that it is
|
||||||
|
not just for In-groups, but includes DIDs and Call Menus as well
|
||||||
|
|
||||||
|
54. Added Filter Phone Groups to allow calls coming into DIDs to be filtered
|
||||||
|
and sent to a different route if the caller ID number matches one in
|
||||||
|
the selected Filter Phone Group, or the search can be done by a web GET
|
||||||
|
to a URL that you define.
|
||||||
|
|
||||||
|
55. Added method to clean caller ID number when calls come into DIDs, either by
|
||||||
|
stripping specific digits from the front of a number if they are there
|
||||||
|
or taking only the right X numbers, i.e. R10 will take only the 10
|
||||||
|
digits on the right of a number, and L1 will remove only a 1 from the
|
||||||
|
left side of the number.
|
||||||
|
|
||||||
|
56. Added ability to download DNC numbers from the internal and campaign-
|
||||||
|
specific DNC lists, as well as the Filter Phone Groups
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+158
-6
@@ -25,6 +25,7 @@
|
|||||||
# 91122-0743 - Added QueueMetrics logging as DID INFO entries
|
# 91122-0743 - Added QueueMetrics logging as DID INFO entries
|
||||||
# 100116-0631 - Logging bug fixes
|
# 100116-0631 - Logging bug fixes
|
||||||
# 100123-1423 - Added record call DID option
|
# 100123-1423 - Added record call DID option
|
||||||
|
# 100805-0943 - Added Filter Phone Group alternate routing feature and CID number cleanup
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-DID_route.agi';
|
$script = 'agi-DID_route.agi';
|
||||||
@@ -32,7 +33,7 @@ $dtmf_silent_prefix = '7';
|
|||||||
$at='@';
|
$at='@';
|
||||||
$S='*';
|
$S='*';
|
||||||
$US='_';
|
$US='_';
|
||||||
|
$route_type='DID';
|
||||||
|
|
||||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||||
$year = ($year + 1900);
|
$year = ($year + 1900);
|
||||||
@@ -181,7 +182,7 @@ if ( (!$callerid) or ($callerid =~ /unknown/) )
|
|||||||
|
|
||||||
### Grab DID values from the database
|
### Grab DID values from the database
|
||||||
$DIDs_in_system=0;
|
$DIDs_in_system=0;
|
||||||
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call FROM vicidial_inbound_dids where did_pattern = '$extension' and did_active='Y';";
|
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number FROM vicidial_inbound_dids where did_pattern = '$extension' and did_active='Y';";
|
||||||
$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;
|
||||||
@@ -203,6 +204,26 @@ if ($sthArows > 0)
|
|||||||
$user_route_settings_ingroup = $aryA[12];
|
$user_route_settings_ingroup = $aryA[12];
|
||||||
$menu_id = $aryA[13];
|
$menu_id = $aryA[13];
|
||||||
$record_call = $aryA[14];
|
$record_call = $aryA[14];
|
||||||
|
$filter_inbound_number = $aryA[15];
|
||||||
|
$filter_phone_group_id = $aryA[16];
|
||||||
|
$filter_url = $aryA[17];
|
||||||
|
$filter_action = $aryA[18];
|
||||||
|
$filter_extension = $aryA[19];
|
||||||
|
$filter_exten_context = $aryA[20];
|
||||||
|
$filter_voicemail_ext = $aryA[21];
|
||||||
|
$filter_phone = $aryA[22];
|
||||||
|
$filter_server_ip = $aryA[23];
|
||||||
|
$filter_user = $aryA[24];
|
||||||
|
$filter_user_unavailable_action = $aryA[25];
|
||||||
|
$filter_user_route_settings_ingroup = $aryA[26];
|
||||||
|
$filter_group_id = $aryA[27];
|
||||||
|
$filter_call_handle_method = $aryA[28];
|
||||||
|
$filter_agent_search_method = $aryA[29];
|
||||||
|
$filter_list_id = $aryA[30];
|
||||||
|
$filter_campaign_id = $aryA[31];
|
||||||
|
$filter_phone_code = $aryA[32];
|
||||||
|
$filter_menu_id = $aryA[33];
|
||||||
|
$filter_clean_cid_number = $aryA[34];
|
||||||
|
|
||||||
$DIDs_in_system++;
|
$DIDs_in_system++;
|
||||||
}
|
}
|
||||||
@@ -211,7 +232,7 @@ $sthA->finish();
|
|||||||
if ($sthArows < 1)
|
if ($sthArows < 1)
|
||||||
{
|
{
|
||||||
### Grab DID values from the database for a default DID pattern if there is one
|
### Grab DID values from the database for a default DID pattern if there is one
|
||||||
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call FROM vicidial_inbound_dids where did_pattern = 'default' and did_active='Y';";
|
$stmtA = "SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number FROM vicidial_inbound_dids where did_pattern = 'default' and did_active='Y';";
|
||||||
$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;
|
||||||
$DIDs_in_system=$sthA->rows;
|
$DIDs_in_system=$sthA->rows;
|
||||||
@@ -233,6 +254,26 @@ if ($sthArows < 1)
|
|||||||
$user_route_settings_ingroup = $aryA[12];
|
$user_route_settings_ingroup = $aryA[12];
|
||||||
$menu_id = $aryA[13];
|
$menu_id = $aryA[13];
|
||||||
$record_call = $aryA[14];
|
$record_call = $aryA[14];
|
||||||
|
$filter_inbound_number = $aryA[15];
|
||||||
|
$filter_phone_group_id = $aryA[16];
|
||||||
|
$filter_url = $aryA[17];
|
||||||
|
$filter_action = $aryA[18];
|
||||||
|
$filter_extension = $aryA[19];
|
||||||
|
$filter_exten_context = $aryA[20];
|
||||||
|
$filter_voicemail_ext = $aryA[21];
|
||||||
|
$filter_phone = $aryA[22];
|
||||||
|
$filter_server_ip = $aryA[23];
|
||||||
|
$filter_user = $aryA[24];
|
||||||
|
$filter_user_unavailable_action = $aryA[25];
|
||||||
|
$filter_user_route_settings_ingroup = $aryA[26];
|
||||||
|
$filter_group_id = $aryA[27];
|
||||||
|
$filter_call_handle_method = $aryA[28];
|
||||||
|
$filter_agent_search_method = $aryA[29];
|
||||||
|
$filter_list_id = $aryA[30];
|
||||||
|
$filter_campaign_id = $aryA[31];
|
||||||
|
$filter_phone_code = $aryA[32];
|
||||||
|
$filter_menu_id = $aryA[33];
|
||||||
|
$filter_clean_cid_number = $aryA[34];
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
}
|
}
|
||||||
@@ -313,13 +354,124 @@ while ($sthArows > $cbc)
|
|||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
|
|
||||||
|
### BEGIN clean caller id number ###
|
||||||
|
if (length($filter_clean_cid_number) > 1)
|
||||||
|
{
|
||||||
|
$original_callerid = $callerid;
|
||||||
|
$filter_number_altered=0;
|
||||||
|
if ($filter_clean_cid_number =~ /^R\d/)
|
||||||
|
{
|
||||||
|
@filter_rule = split(/R/,$filter_clean_cid_number);
|
||||||
|
$filter_rule[1] =~ s/ .*//gi;
|
||||||
|
while (length($callerid) > $filter_rule[1])
|
||||||
|
{$callerid =~ s/^.//gi;}
|
||||||
|
if (length($callerid) != length($original_callerid))
|
||||||
|
{$filter_number_altered++;}
|
||||||
|
}
|
||||||
|
if ($filter_clean_cid_number =~ /^L\d/)
|
||||||
|
{
|
||||||
|
@filter_rule = split(/L/,$filter_clean_cid_number);
|
||||||
|
$filter_rule[1] =~ s/ .*//gi;
|
||||||
|
$filter_rule_reg = $filter_rule[1];
|
||||||
|
$callerid =~ s/^$filter_rule_reg//gi;
|
||||||
|
if (length($callerid) != length($original_callerid))
|
||||||
|
{$filter_number_altered++;}
|
||||||
|
}
|
||||||
|
if ($filter_number_altered > 0)
|
||||||
|
{
|
||||||
|
$newcallerid = "\"$calleridname <$callerid>\"";
|
||||||
|
$AGI->set_callerid($newcallerid);
|
||||||
|
if ($AGILOG) {$agi_string = "filter clean callerid, setting new CID: |$callerid|$calleridname|$newcallerid|$filter_clean_cid_number| Old: |$original_callerid|"; &agi_output;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
### END clean caller id number ###
|
||||||
|
|
||||||
|
|
||||||
|
##### BEGIN filtering process #####
|
||||||
|
if ($filter_inbound_number =~ /GROUP|URL/)
|
||||||
|
{
|
||||||
|
$filter_match_found=0;
|
||||||
|
if ($AGILOG) {$agi_string = "filtering active: |$extension|$filter_inbound_number|$filter_phone_group_id|$filter_url|$filter_action|$filter_clean_cid_number|"; &agi_output;}
|
||||||
|
if ($filter_inbound_number =~ /GROUP/)
|
||||||
|
{
|
||||||
|
$stmtA = "SELECT count(*) FROM vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id' and phone_number='$callerid';";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$filter_match_found = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
### first, find curl binary
|
||||||
|
$curlbin = '';
|
||||||
|
if ( -e ('/bin/curl')) {$curlbin = '/bin/curl';}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( -e ('/usr/bin/curl')) {$curlbin = '/usr/bin/curl';}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( -e ('/usr/local/bin/curl')) {$curlbin = '/usr/local/bin/curl';}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($AGILOG) {$agi_string = "ERROR: cannot filter by URL, curl binary not found"; &agi_output;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( (length($curlbin) > 4) && ($filter_url =~ /http/i) && (length($filter_url) > 8) )
|
||||||
|
{
|
||||||
|
$filter_url =~ s/--A--phone_number--B--/$callerid/gi;
|
||||||
|
$filter_url =~ s/--A--did_pattern--B--/$callerid/gi;
|
||||||
|
$filter_url =~ s/&/\\&/gi;
|
||||||
|
$filter_url =~ s/ /+/gi;
|
||||||
|
|
||||||
|
@curl_output = `$curlbin $filter_url`;
|
||||||
|
|
||||||
|
$k=0;
|
||||||
|
$full_output='';
|
||||||
|
foreach (@curl_output)
|
||||||
|
{
|
||||||
|
$full_output .= $curl_output[$k];
|
||||||
|
$k++;
|
||||||
|
}
|
||||||
|
$full_output =~ s/\D//gi;
|
||||||
|
if ($full_output > 0)
|
||||||
|
{
|
||||||
|
$filter_match_found = $full_output;
|
||||||
|
}
|
||||||
|
if ($AGILOG) {$agi_string = "URL filter search response: |$filter_match_found|$full_output|$filter_url|"; &agi_output;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($filter_match_found > 0)
|
||||||
|
{
|
||||||
|
$did_route = $filter_action;
|
||||||
|
$did_extension = $filter_extension;
|
||||||
|
$exten_context = $filter_exten_context;
|
||||||
|
$voicemail_ext = $filter_voicemail_ext;
|
||||||
|
$phone = $filter_phone;
|
||||||
|
$did_server_ip = $filter_server_ip;
|
||||||
|
$user = $filter_user;
|
||||||
|
$user_unavailable_action = $filter_user_unavailable_action;
|
||||||
|
$user_route_settings_ingroup = $filter_user_route_settings_ingroup;
|
||||||
|
$menu_id = $filter_menu_id;
|
||||||
|
$route_type = 'FILTER';
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "Filter match found: |$filter_match_found|$filter_action|$did_route|"; &agi_output;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
##### END filtering process #####
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Route call to a VICIDIAL-defined phone
|
### Route call to a VICIDIAL-defined phone
|
||||||
if ($did_route =~ /PHONE/)
|
if ($did_route =~ /PHONE/)
|
||||||
{
|
{
|
||||||
$stmtA = "SELECT dialplan_number,voicemail_id,protocol,ext_context FROM phones where server_ip = '$did_server_ip' and extension='$phone';";
|
$stmtA = "SELECT dialplan_number,voicemail_id,protocol,ext_context FROM phones where server_ip='$did_server_ip' and extension='$phone';";
|
||||||
$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;
|
||||||
@@ -368,7 +520,7 @@ if ($did_route =~ /VOICEMAIL/)
|
|||||||
### Route call to a VICIDIAL Inbound Group
|
### Route call to a VICIDIAL Inbound Group
|
||||||
if ($did_route =~ /IN_GROUP/)
|
if ($did_route =~ /IN_GROUP/)
|
||||||
{
|
{
|
||||||
$did_extension = "99909$S$did_id$S";
|
$did_extension = "99909$S$did_id$S$S$S$route_type";
|
||||||
$exten_context = $ext_context;
|
$exten_context = $ext_context;
|
||||||
$did_route = 'EXTEN';
|
$did_route = 'EXTEN';
|
||||||
}
|
}
|
||||||
@@ -377,7 +529,7 @@ if ($did_route =~ /IN_GROUP/)
|
|||||||
### Route call to a logged-in VICIDIAL agent
|
### Route call to a logged-in VICIDIAL agent
|
||||||
if ($did_route =~ /AGENT/)
|
if ($did_route =~ /AGENT/)
|
||||||
{
|
{
|
||||||
$did_extension = "99909$S$did_id$S";
|
$did_extension = "99909$S$did_id$S$S$S$route_type";
|
||||||
$exten_context = $ext_context;
|
$exten_context = $ext_context;
|
||||||
$did_route = 'EXTEN';
|
$did_route = 'EXTEN';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,6 +137,7 @@
|
|||||||
# 100527-0111 - Added on-hold and hold-time-option no-block options and message seconds, NA CID cleaning
|
# 100527-0111 - Added on-hold and hold-time-option no-block options and message seconds, NA CID cleaning
|
||||||
# 100616-1600 - Added VID filename and digit validation options
|
# 100616-1600 - Added VID filename and digit validation options
|
||||||
# 100718-1822 - Added second hold time option and wait time options
|
# 100718-1822 - Added second hold time option and wait time options
|
||||||
|
# 100805-1530 - Added FILTER from-did-route feature, changed active=n to go to after hours action
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||||
@@ -341,7 +342,7 @@ if ($sthArows > 0)
|
|||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
$user_unavailable_action='';
|
$user_unavailable_action='';
|
||||||
##### special processing for DID forwarded calls "99909*1*"
|
##### special processing for DID forwarded calls "99909*1***DID"
|
||||||
if ($extension =~ /^999\d\d\*/)
|
if ($extension =~ /^999\d\d\*/)
|
||||||
{
|
{
|
||||||
@EXT_vars = split(/\*/, $extension);
|
@EXT_vars = split(/\*/, $extension);
|
||||||
@@ -350,9 +351,17 @@ if ($extension =~ /^999\d\d\*/)
|
|||||||
$did_id = $EXT_vars[1]; # the DID ID to grab settings from
|
$did_id = $EXT_vars[1]; # the DID ID to grab settings from
|
||||||
$in_group_override = $EXT_vars[2]; # the in-group override, if set
|
$in_group_override = $EXT_vars[2]; # the in-group override, if set
|
||||||
$agentdirect_override = $EXT_vars[3]; # the agentdirect override, if set
|
$agentdirect_override = $EXT_vars[3]; # the agentdirect override, if set
|
||||||
|
$route_type = $EXT_vars[4]; # DID or FILTER from the did, if set
|
||||||
|
|
||||||
### Grab DID values from the database
|
### Grab DID values from the database
|
||||||
$stmtA = "SELECT call_handle_method,agent_search_method,group_id,did_pattern,list_id,phone_code,campaign_id,user,user_unavailable_action,user_route_settings_ingroup,did_route,voicemail_ext,extension,exten_context,phone,server_ip FROM vicidial_inbound_dids where did_id = '$did_id';";
|
if ($route_type =~ /FILTER/)
|
||||||
|
{
|
||||||
|
$stmtA = "SELECT filter_call_handle_method,filter_agent_search_method,filter_group_id,did_pattern,filter_list_id,filter_phone_code,filter_campaign_id,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_action,filter_voicemail_ext,filter_extension,filter_exten_context,filter_phone,filter_server_ip FROM vicidial_inbound_dids where did_id = '$did_id';";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmtA = "SELECT call_handle_method,agent_search_method,group_id,did_pattern,list_id,phone_code,campaign_id,user,user_unavailable_action,user_route_settings_ingroup,did_route,voicemail_ext,extension,exten_context,phone,server_ip FROM vicidial_inbound_dids where did_id = '$did_id';";
|
||||||
|
}
|
||||||
$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;
|
||||||
@@ -568,7 +577,7 @@ $sthA->finish();
|
|||||||
|
|
||||||
### Grab inbound groups values from the database
|
### Grab inbound groups values from the database
|
||||||
$cbc=0;
|
$cbc=0;
|
||||||
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
||||||
$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;
|
||||||
@@ -643,6 +652,7 @@ while ($sthArows > $cbc)
|
|||||||
$wait_time_option_press_filename = $aryA[57];
|
$wait_time_option_press_filename = $aryA[57];
|
||||||
$wait_time_option_no_block = $aryA[58];
|
$wait_time_option_no_block = $aryA[58];
|
||||||
$wait_time_option_prompt_seconds = $aryA[59];
|
$wait_time_option_prompt_seconds = $aryA[59];
|
||||||
|
$ingroup_active = $aryA[60];
|
||||||
|
|
||||||
$custom_call_id='';
|
$custom_call_id='';
|
||||||
if ($uniqueid_status_display =~ /ENABLED/)
|
if ($uniqueid_status_display =~ /ENABLED/)
|
||||||
@@ -687,6 +697,14 @@ if ( (length($deafult_afterhours_filename_override) > 0) && ($deafult_afterhours
|
|||||||
if ( (length($day_afterhours_filename_override) > 0) && ($day_afterhours_filename_override !~ /---NONE---/) )
|
if ( (length($day_afterhours_filename_override) > 0) && ($day_afterhours_filename_override !~ /---NONE---/) )
|
||||||
{$after_hours_message_filename = $day_afterhours_filename_override;}
|
{$after_hours_message_filename = $day_afterhours_filename_override;}
|
||||||
|
|
||||||
|
# send call to after hours action if in-group is set to inactive
|
||||||
|
if ($ingroup_active !~ /Y/)
|
||||||
|
{
|
||||||
|
$ct_default_start = 2400;
|
||||||
|
$ct_default_stop = 2400;
|
||||||
|
if ($AGILOG) {$agi_string = "IN-GROUP INACTIVE! Sending to After Hours Action: |$after_hours_action|$ingroup_active|"; &agi_output;}
|
||||||
|
}
|
||||||
|
|
||||||
$AGI->stream_file('sip-silence');
|
$AGI->stream_file('sip-silence');
|
||||||
$AGI->stream_file('sip-silence');
|
$AGI->stream_file('sip-silence');
|
||||||
|
|
||||||
|
|||||||
@@ -1577,6 +1577,26 @@ campaign_id VARCHAR(8),
|
|||||||
phone_code VARCHAR(10) default '1',
|
phone_code VARCHAR(10) default '1',
|
||||||
menu_id VARCHAR(50) default '',
|
menu_id VARCHAR(50) default '',
|
||||||
record_call ENUM('Y','N','Y_QUEUESTOP') default 'N',
|
record_call ENUM('Y','N','Y_QUEUESTOP') default 'N',
|
||||||
|
filter_inbound_number ENUM('DISABLED','GROUP','URL') default 'DISABLED',
|
||||||
|
filter_phone_group_id VARCHAR(20) default '',
|
||||||
|
filter_url VARCHAR(1000) default '',
|
||||||
|
filter_action ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP','CALLMENU') default 'EXTEN',
|
||||||
|
filter_extension VARCHAR(50) default '9998811112',
|
||||||
|
filter_exten_context VARCHAR(50) default 'default',
|
||||||
|
filter_voicemail_ext VARCHAR(10),
|
||||||
|
filter_phone VARCHAR(100),
|
||||||
|
filter_server_ip VARCHAR(15),
|
||||||
|
filter_user VARCHAR(20),
|
||||||
|
filter_user_unavailable_action ENUM('IN_GROUP','EXTEN','VOICEMAIL','PHONE') default 'VOICEMAIL',
|
||||||
|
filter_user_route_settings_ingroup VARCHAR(20) default 'AGENTDIRECT',
|
||||||
|
filter_group_id VARCHAR(20),
|
||||||
|
filter_call_handle_method VARCHAR(20) default 'CID',
|
||||||
|
filter_agent_search_method ENUM('LO','LB','SO') default 'LB',
|
||||||
|
filter_list_id BIGINT(14) UNSIGNED default '999',
|
||||||
|
filter_campaign_id VARCHAR(8),
|
||||||
|
filter_phone_code VARCHAR(10) default '1',
|
||||||
|
filter_menu_id VARCHAR(50) default '',
|
||||||
|
filter_clean_cid_number VARCHAR(20) default '',
|
||||||
unique index (did_pattern),
|
unique index (did_pattern),
|
||||||
index (group_id)
|
index (group_id)
|
||||||
);
|
);
|
||||||
@@ -2153,6 +2173,19 @@ field_order SMALLINT(5) default '1'
|
|||||||
|
|
||||||
CREATE UNIQUE INDEX listfield on vicidial_lists_fields (list_id, field_label);
|
CREATE UNIQUE INDEX listfield on vicidial_lists_fields (list_id, field_label);
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_filter_phone_groups (
|
||||||
|
filter_phone_group_id VARCHAR(20) NOT NULL,
|
||||||
|
filter_phone_group_name VARCHAR(40) NOT NULL,
|
||||||
|
filter_phone_group_description VARCHAR(100),
|
||||||
|
index (filter_phone_group_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_filter_phone_numbers (
|
||||||
|
phone_number VARCHAR(18) NOT NULL,
|
||||||
|
filter_phone_group_id VARCHAR(20) NOT NULL,
|
||||||
|
index (phone_number),
|
||||||
|
unique index phonefilter (phone_number, filter_phone_group_id)
|
||||||
|
);
|
||||||
|
|
||||||
ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY;
|
ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY;
|
||||||
|
|
||||||
@@ -2296,7 +2329,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='1238',db_schema_update_date=NOW();
|
UPDATE system_settings SET db_schema_version='1239',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;
|
||||||
|
|||||||
@@ -451,3 +451,40 @@ UPDATE system_settings SET db_schema_version='1237',db_schema_update_date=NOW();
|
|||||||
ALTER TABLE vicidial_user_groups ADD allowed_reports VARCHAR(2000) default 'ALL REPORTS';
|
ALTER TABLE vicidial_user_groups ADD allowed_reports VARCHAR(2000) default 'ALL REPORTS';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1238',db_schema_update_date=NOW();
|
UPDATE system_settings SET db_schema_version='1238',db_schema_update_date=NOW();
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_filter_phone_groups (
|
||||||
|
filter_phone_group_id VARCHAR(20) NOT NULL,
|
||||||
|
filter_phone_group_name VARCHAR(40) NOT NULL,
|
||||||
|
filter_phone_group_description VARCHAR(100),
|
||||||
|
index (filter_phone_group_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_filter_phone_numbers (
|
||||||
|
phone_number VARCHAR(18) NOT NULL,
|
||||||
|
filter_phone_group_id VARCHAR(20) NOT NULL,
|
||||||
|
index (phone_number),
|
||||||
|
unique index phonefilter (phone_number, filter_phone_group_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_inbound_number ENUM('DISABLED','GROUP','URL') default 'DISABLED';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_phone_group_id VARCHAR(20) default '';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_url VARCHAR(1000) default '';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_action ENUM('EXTEN','VOICEMAIL','AGENT','PHONE','IN_GROUP','CALLMENU') default 'EXTEN';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_extension VARCHAR(50) default '9998811112';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_exten_context VARCHAR(50) default 'default';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_voicemail_ext VARCHAR(10);
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_phone VARCHAR(100);
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_server_ip VARCHAR(15);
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_user VARCHAR(20);
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_user_unavailable_action ENUM('IN_GROUP','EXTEN','VOICEMAIL','PHONE') default 'VOICEMAIL';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_user_route_settings_ingroup VARCHAR(20) default 'AGENTDIRECT';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_group_id VARCHAR(20);
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_call_handle_method VARCHAR(20) default 'CID';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_agent_search_method ENUM('LO','LB','SO') default 'LB';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_list_id BIGINT(14) UNSIGNED default '999';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_campaign_id VARCHAR(8);
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_phone_code VARCHAR(10) default '1';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_menu_id VARCHAR(50) default '';
|
||||||
|
ALTER TABLE vicidial_inbound_dids ADD filter_clean_cid_number VARCHAR(20) default '';
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1239',db_schema_update_date=NOW();
|
||||||
|
|||||||
@@ -296,6 +296,57 @@ Allowed Reports||
|
|||||||
If a user in this group is set to user level 7 or higher, then this feature can be used to restrict the reports that the users can view. Default is ALL. If you want to select more than one report then press the Ctrl key on your keyboard as you select the reports||
|
If a user in this group is set to user level 7 or higher, then this feature can be used to restrict the reports that the users can view. Default is ALL. If you want to select more than one report then press the Ctrl key on your keyboard as you select the reports||
|
||||||
You are not allowed to view this report||
|
You are not allowed to view this report||
|
||||||
CAMPLISTS_ALL - will include inactive lists in the search for the number||
|
CAMPLISTS_ALL - will include inactive lists in the search for the number||
|
||||||
|
Add-Delete DNC Number||
|
||||||
|
Add DNC Number||
|
||||||
|
Copy Custom Fields||
|
||||||
|
Add Filter Phone Group||
|
||||||
|
New Filter Phone Group||
|
||||||
|
Modify Filter Phone Group||
|
||||||
|
Delete Phone Filter Group||
|
||||||
|
Filter Phone Groups||
|
||||||
|
Filter Phone Group ID||
|
||||||
|
Filter Phone Group Name||
|
||||||
|
Filter Phone Group Description||
|
||||||
|
PHONE FILTER GROUP NOT ADDED||
|
||||||
|
there is already a PHONE FILTER GROUP in the system with this ID||
|
||||||
|
Phone Filter Group ID must be between 2 and 20 characters in length and contain no||
|
||||||
|
PHONE FILTER GROUP ADDED||
|
||||||
|
Add Filter Phone Group||
|
||||||
|
Add-Delete FPG Number||
|
||||||
|
Add FPG Number||
|
||||||
|
FILTER PHONE GROUP NOT MODIFIED||
|
||||||
|
FILTER PHONE GROUP MODIFIED||
|
||||||
|
FILTER PHONE GROUP NOT DELETED||
|
||||||
|
Click here to delete FILTER PHONE GROUP||
|
||||||
|
FILTER PHONE GROUP DELETION CONFIRMATION||
|
||||||
|
FILTER PHONE GROUP DELETION COMPLETED||
|
||||||
|
Click here to see Admin chages to this filter phone group||
|
||||||
|
DELETE THIS FILTER PHONE GROUP||
|
||||||
|
FILTER PHONE GROUP LISTINGS||
|
||||||
|
Filter Phone Group Numbers||
|
||||||
|
This phone number is not in the Filter Phone Group List||
|
||||||
|
This phone number is already in the Filter Phone Group List||
|
||||||
|
FILTER PHONE GROUP NUMBER NOT DELETED||
|
||||||
|
FILTER PHONE GROUP NUMBER DELETED||
|
||||||
|
FILTER PHONE GROUP NUMBER NOT ADDED||
|
||||||
|
FILTER PHONE GROUP NUMBER ADDED||
|
||||||
|
Numbers in this Filter Phone Group||
|
||||||
|
There are no phone numbers in list||
|
||||||
|
There are no leads in Campaign DNC list||
|
||||||
|
There are no leads in this filter phone group||
|
||||||
|
Click here to download the numbers in this filter phone group||
|
||||||
|
Filter Inbound Number||
|
||||||
|
This option if enabled allows you to filter calls coming into this DID and send them to an alternative action if they match a phone number that is in the filter phone group or a URL response if you have configured one. Default is DISABLED. GROUP will search in a Filter Phone Group. URL will send a URL and will match if a 1 is sent back||
|
||||||
|
If the Filter Inbound Number field is set to GROUP then this is the ID of the Filter Phone Group that will have its numbers searched looking for a match to the caller ID number of the incoming call||
|
||||||
|
Filter URL||
|
||||||
|
If the Filter Inbound Number field is set to URL then this is the web address of a script that will search a remote system and return a 1 for a match and a 0 for no match. Only two variables are available in the address if you use the VAR prefix like with webform addresses in campaigns, --A--phone_number--B-- and --A--did_pattern--B-- can be used in the URL to indicate the caller ID of the caller and the DID that the customer caclled in on||
|
||||||
|
Filter Action||
|
||||||
|
If Filter Inbound Number is activated and a match is found then this is the action that is to be taken. This is the same as the Route that you select for a DID, and the settings below function just like they do for a standard routing||
|
||||||
|
This is the ID of the Filter Phone Group that is the container for a group of phone numbers that you can have automatically searched through when a call comes into a DID and send to an alternate route if there is a match. This field should be between 2 and 20 characters and have no punctuation except for underscore||
|
||||||
|
Filter Phone Group Description||
|
||||||
|
This is the description of the Filter Phone Group, it is purely for notation purposes only and is not a required field||
|
||||||
|
Clean CID Number||
|
||||||
|
This field allows you to specify a number of digits to restrict the incoming caller ID number to by putting an R in front of the number of digits, for example to restrict to the right 10 digits you would enter in R10. You can also use this feature to remove only a leading digit or digits by putting an L in front of the specific digits that you want to remove, for example to remove a 1 as the first digit you would enter in L1. Default is empty. If more than one rule is specified make sure you separate them with a space and the R will run before the L||
|
||||||
|
|
||||||
|
|
||||||
AST_VICIDIAL_ingrouplist.php
|
AST_VICIDIAL_ingrouplist.php
|
||||||
|
|||||||
+643
-24
@@ -1373,6 +1373,50 @@ if (isset($_GET["timer_action_destination"])) {$timer_action_destination=$_GET
|
|||||||
elseif (isset($_POST["timer_action_destination"])) {$timer_action_destination=$_POST["timer_action_destination"];}
|
elseif (isset($_POST["timer_action_destination"])) {$timer_action_destination=$_POST["timer_action_destination"];}
|
||||||
if (isset($_GET["allowed_reports"])) {$allowed_reports=$_GET["allowed_reports"];}
|
if (isset($_GET["allowed_reports"])) {$allowed_reports=$_GET["allowed_reports"];}
|
||||||
elseif (isset($_POST["allowed_reports"])) {$allowed_reports=$_POST["allowed_reports"];}
|
elseif (isset($_POST["allowed_reports"])) {$allowed_reports=$_POST["allowed_reports"];}
|
||||||
|
if (isset($_GET["filter_phone_group_id"])) {$filter_phone_group_id=$_GET["filter_phone_group_id"];}
|
||||||
|
elseif (isset($_POST["filter_phone_group_id"])) {$filter_phone_group_id=$_POST["filter_phone_group_id"];}
|
||||||
|
if (isset($_GET["filter_phone_group_name"])) {$filter_phone_group_name=$_GET["filter_phone_group_name"];}
|
||||||
|
elseif (isset($_POST["filter_phone_group_name"])) {$filter_phone_group_name=$_POST["filter_phone_group_name"];}
|
||||||
|
if (isset($_GET["filter_phone_group_description"])) {$filter_phone_group_description=$_GET["filter_phone_group_description"];}
|
||||||
|
elseif (isset($_POST["filter_phone_group_description"])) {$filter_phone_group_description=$_POST["filter_phone_group_description"];}
|
||||||
|
if (isset($_GET["filter_inbound_number"])) {$filter_inbound_number=$_GET["filter_inbound_number"];}
|
||||||
|
elseif (isset($_POST["filter_inbound_number"])) {$filter_inbound_number=$_POST["filter_inbound_number"];}
|
||||||
|
if (isset($_GET["filter_url"])) {$filter_url=$_GET["filter_url"];}
|
||||||
|
elseif (isset($_POST["filter_url"])) {$filter_url=$_POST["filter_url"];}
|
||||||
|
if (isset($_GET["filter_action"])) {$filter_action=$_GET["filter_action"];}
|
||||||
|
elseif (isset($_POST["filter_action"])) {$filter_action=$_POST["filter_action"];}
|
||||||
|
if (isset($_GET["filter_extension"])) {$filter_extension=$_GET["filter_extension"];}
|
||||||
|
elseif (isset($_POST["filter_extension"])) {$filter_extension=$_POST["filter_extension"];}
|
||||||
|
if (isset($_GET["filter_exten_context"])) {$filter_exten_context=$_GET["filter_exten_context"];}
|
||||||
|
elseif (isset($_POST["filter_exten_context"])) {$filter_exten_context=$_POST["filter_exten_context"];}
|
||||||
|
if (isset($_GET["filter_voicemail_ext"])) {$filter_voicemail_ext=$_GET["filter_voicemail_ext"];}
|
||||||
|
elseif (isset($_POST["filter_voicemail_ext"])) {$filter_voicemail_ext=$_POST["filter_voicemail_ext"];}
|
||||||
|
if (isset($_GET["filter_phone"])) {$filter_phone=$_GET["filter_phone"];}
|
||||||
|
elseif (isset($_POST["filter_phone"])) {$filter_phone=$_POST["filter_phone"];}
|
||||||
|
if (isset($_GET["filter_server_ip"])) {$filter_server_ip=$_GET["filter_server_ip"];}
|
||||||
|
elseif (isset($_POST["filter_server_ip"])) {$filter_server_ip=$_POST["filter_server_ip"];}
|
||||||
|
if (isset($_GET["filter_user"])) {$filter_user=$_GET["filter_user"];}
|
||||||
|
elseif (isset($_POST["filter_user"])) {$filter_user=$_POST["filter_user"];}
|
||||||
|
if (isset($_GET["filter_user_unavailable_action"])) {$filter_user_unavailable_action=$_GET["filter_user_unavailable_action"];}
|
||||||
|
elseif (isset($_POST["filter_user_unavailable_action"])) {$filter_user_unavailable_action=$_POST["filter_user_unavailable_action"];}
|
||||||
|
if (isset($_GET["filter_user_route_settings_ingroup"])) {$filter_user_route_settings_ingroup=$_GET["filter_user_route_settings_ingroup"];}
|
||||||
|
elseif (isset($_POST["filter_user_route_settings_ingroup"])) {$filter_user_route_settings_ingroup=$_POST["filter_user_route_settings_ingroup"];}
|
||||||
|
if (isset($_GET["filter_group_id"])) {$filter_group_id=$_GET["filter_group_id"];}
|
||||||
|
elseif (isset($_POST["filter_group_id"])) {$filter_group_id=$_POST["filter_group_id"];}
|
||||||
|
if (isset($_GET["filter_call_handle_method"])) {$filter_call_handle_method=$_GET["filter_call_handle_method"];}
|
||||||
|
elseif (isset($_POST["filter_call_handle_method"])) {$filter_call_handle_method=$_POST["filter_call_handle_method"];}
|
||||||
|
if (isset($_GET["filter_agent_search_method"])) {$filter_agent_search_method=$_GET["filter_agent_search_method"];}
|
||||||
|
elseif (isset($_POST["filter_agent_search_method"])) {$filter_agent_search_method=$_POST["filter_agent_search_method"];}
|
||||||
|
if (isset($_GET["filter_list_id"])) {$filter_list_id=$_GET["filter_list_id"];}
|
||||||
|
elseif (isset($_POST["filter_list_id"])) {$filter_list_id=$_POST["filter_list_id"];}
|
||||||
|
if (isset($_GET["filter_campaign_id"])) {$filter_campaign_id=$_GET["filter_campaign_id"];}
|
||||||
|
elseif (isset($_POST["filter_campaign_id"])) {$filter_campaign_id=$_POST["filter_campaign_id"];}
|
||||||
|
if (isset($_GET["filter_phone_code"])) {$filter_phone_code=$_GET["filter_phone_code"];}
|
||||||
|
elseif (isset($_POST["filter_phone_code"])) {$filter_phone_code=$_POST["filter_phone_code"];}
|
||||||
|
if (isset($_GET["filter_menu_id"])) {$filter_menu_id=$_GET["filter_menu_id"];}
|
||||||
|
elseif (isset($_POST["filter_menu_id"])) {$filter_menu_id=$_POST["filter_menu_id"];}
|
||||||
|
if (isset($_GET["filter_clean_cid_number"])) {$filter_clean_cid_number=$_GET["filter_clean_cid_number"];}
|
||||||
|
elseif (isset($_POST["filter_clean_cid_number"])) {$filter_clean_cid_number=$_POST["filter_clean_cid_number"];}
|
||||||
|
|
||||||
|
|
||||||
if (isset($script_id)) {$script_id= strtoupper($script_id);}
|
if (isset($script_id)) {$script_id= strtoupper($script_id);}
|
||||||
@@ -1592,6 +1636,7 @@ if ($non_latin < 1)
|
|||||||
$wait_time_option_seconds = ereg_replace("[^0-9]","",$wait_time_option_seconds);
|
$wait_time_option_seconds = ereg_replace("[^0-9]","",$wait_time_option_seconds);
|
||||||
$wait_time_option_callback_list_id = ereg_replace("[^0-9]","",$wait_time_option_callback_list_id);
|
$wait_time_option_callback_list_id = ereg_replace("[^0-9]","",$wait_time_option_callback_list_id);
|
||||||
$wait_time_option_prompt_seconds = ereg_replace("[^0-9]","",$wait_time_option_prompt_seconds);
|
$wait_time_option_prompt_seconds = ereg_replace("[^0-9]","",$wait_time_option_prompt_seconds);
|
||||||
|
$filter_list_id = ereg_replace("[^0-9]","",$filter_list_id);
|
||||||
|
|
||||||
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
|
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
|
||||||
|
|
||||||
@@ -1725,6 +1770,7 @@ if ($non_latin < 1)
|
|||||||
$agent_call_log_view_override = ereg_replace("[^0-9a-zA-Z]","",$agent_call_log_view_override);
|
$agent_call_log_view_override = ereg_replace("[^0-9a-zA-Z]","",$agent_call_log_view_override);
|
||||||
$queuemetrics_loginout = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_loginout);
|
$queuemetrics_loginout = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_loginout);
|
||||||
$queuemetrics_callstatus = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_callstatus);
|
$queuemetrics_callstatus = ereg_replace("[^0-9a-zA-Z]","",$queuemetrics_callstatus);
|
||||||
|
$filter_inbound_number = ereg_replace("[^0-9a-zA-Z]","",$filter_inbound_number);
|
||||||
|
|
||||||
### DIGITS and Dots
|
### DIGITS and Dots
|
||||||
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
|
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
|
||||||
@@ -1739,6 +1785,7 @@ if ($non_latin < 1)
|
|||||||
$auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit);
|
$auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit);
|
||||||
$adaptive_dropped_percentage = ereg_replace("[^\.0-9]","",$adaptive_dropped_percentage);
|
$adaptive_dropped_percentage = ereg_replace("[^\.0-9]","",$adaptive_dropped_percentage);
|
||||||
$drop_lockout_time = ereg_replace("[^\.0-9]","",$drop_lockout_time);
|
$drop_lockout_time = ereg_replace("[^\.0-9]","",$drop_lockout_time);
|
||||||
|
$filter_server_ip = ereg_replace("[^\.0-9]","",$filter_server_ip);
|
||||||
|
|
||||||
### ALPHA-NUMERIC and spaces and hash and star and comma
|
### ALPHA-NUMERIC and spaces and hash and star and comma
|
||||||
$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
|
$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
|
||||||
@@ -1897,6 +1944,17 @@ if ($non_latin < 1)
|
|||||||
$wait_time_option_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_xfer_group);
|
$wait_time_option_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_xfer_group);
|
||||||
$wait_time_option_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_callmenu);
|
$wait_time_option_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_callmenu);
|
||||||
$wait_time_option_voicemail = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_voicemail);
|
$wait_time_option_voicemail = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_voicemail);
|
||||||
|
$filter_phone_group_id = ereg_replace("[^-_0-9a-zA-Z]","",$filter_phone_group_id);
|
||||||
|
$filter_action = ereg_replace("[^-_0-9a-zA-Z]","",$filter_action);
|
||||||
|
$filter_user_unavailable_action = ereg_replace("[^-_0-9a-zA-Z]","",$filter_user_unavailable_action);
|
||||||
|
$filter_user_route_settings_ingroup = ereg_replace("[^-_0-9a-zA-Z]","",$filter_user_route_settings_ingroup);
|
||||||
|
$filter_agent_search_method = ereg_replace("[^-_0-9a-zA-Z]","",$filter_agent_search_method);
|
||||||
|
$filter_campaign_id = ereg_replace("[^-_0-9a-zA-Z]","",$filter_campaign_id);
|
||||||
|
$filter_group_id = ereg_replace("[^-_0-9a-zA-Z]","",$filter_group_id);
|
||||||
|
$filter_menu_id = ereg_replace("[^-_0-9a-zA-Z]","",$filter_menu_id);
|
||||||
|
$filter_call_handle_method = ereg_replace("[^-_0-9a-zA-Z]","",$filter_call_handle_method);
|
||||||
|
$filter_user = ereg_replace("[^-_0-9a-zA-Z]","",$filter_user);
|
||||||
|
$filter_exten_context = ereg_replace("[^-_0-9a-zA-Z]","",$filter_exten_context);
|
||||||
|
|
||||||
### ALPHA-NUMERIC and underscore and dash and slash and dot
|
### ALPHA-NUMERIC and underscore and dash and slash and dot
|
||||||
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
|
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
|
||||||
@@ -1944,6 +2002,9 @@ if ($non_latin < 1)
|
|||||||
$phone = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone);
|
$phone = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone);
|
||||||
$phone_code = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone_code);
|
$phone_code = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone_code);
|
||||||
$wait_time_option_exten = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$wait_time_option_exten);
|
$wait_time_option_exten = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$wait_time_option_exten);
|
||||||
|
$filter_voicemail_ext = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$filter_voicemail_ext);
|
||||||
|
$filter_phone_code = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$filter_phone_code);
|
||||||
|
$filter_phone = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$filter_phone);
|
||||||
|
|
||||||
### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores
|
### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores
|
||||||
$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
|
$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
|
||||||
@@ -2014,6 +2075,9 @@ if ($non_latin < 1)
|
|||||||
$label_email = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$label_email);
|
$label_email = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$label_email);
|
||||||
$label_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$label_comments);
|
$label_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$label_comments);
|
||||||
$slave_db_server = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$slave_db_server);
|
$slave_db_server = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$slave_db_server);
|
||||||
|
$filter_phone_group_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$filter_phone_group_name);
|
||||||
|
$filter_phone_group_description = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$filter_phone_group_description);
|
||||||
|
$filter_clean_cid_number = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$filter_clean_cid_number);
|
||||||
|
|
||||||
### ALPHA-NUMERIC and underscore and dash and slash and at and dot
|
### ALPHA-NUMERIC and underscore and dash and slash and at and dot
|
||||||
$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
|
$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
|
||||||
@@ -2040,6 +2104,7 @@ if ($non_latin < 1)
|
|||||||
### ALPHA-NUMERIC and underscore and dash and slash and at and dot and pound and star
|
### ALPHA-NUMERIC and underscore and dash and slash and at and dot and pound and star
|
||||||
$extension = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$extension);
|
$extension = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$extension);
|
||||||
$timer_action_destination = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$timer_action_destination);
|
$timer_action_destination = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$timer_action_destination);
|
||||||
|
$filter_extension = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$filter_extension);
|
||||||
|
|
||||||
### NUMERIC and comma and pipe
|
### NUMERIC and comma and pipe
|
||||||
$waitforsilence_options = ereg_replace("[^\|\,0-9]","",$waitforsilence_options);
|
$waitforsilence_options = ereg_replace("[^\|\,0-9]","",$waitforsilence_options);
|
||||||
@@ -2095,6 +2160,7 @@ if ($non_latin < 1)
|
|||||||
# $start_call_url
|
# $start_call_url
|
||||||
# $dispo_call_url
|
# $dispo_call_url
|
||||||
# $webphone_url
|
# $webphone_url
|
||||||
|
# $filter_url
|
||||||
|
|
||||||
### VARIABLES not filtered at all ###
|
### VARIABLES not filtered at all ###
|
||||||
# $script_text
|
# $script_text
|
||||||
@@ -2393,11 +2459,13 @@ else
|
|||||||
# 100802-2130 - Changed Admin links to point to links page instead of Phones listings, changed Remote Agents to allow 9-digit IDs
|
# 100802-2130 - Changed Admin links to point to links page instead of Phones listings, changed Remote Agents to allow 9-digit IDs
|
||||||
# 100803-1412 - Added allowed_reports option to User Groups, added CAMPLISTS_ALL for manual_dial_filter(issue #369)
|
# 100803-1412 - Added allowed_reports option to User Groups, added CAMPLISTS_ALL for manual_dial_filter(issue #369)
|
||||||
# - Added allowed_campaigns enforcement for Campaign listings
|
# - Added allowed_campaigns enforcement for Campaign listings
|
||||||
|
# 100804-2313 - Added filter phone groups section for inbound call filtering by incoming phone number when it comes into a DID
|
||||||
|
# 100805-1539 - Added option to clean up cid numbers when calls come into DIDs
|
||||||
#
|
#
|
||||||
# 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
|
# 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
|
||||||
|
|
||||||
$admin_version = '2.4-268';
|
$admin_version = '2.4-270';
|
||||||
$build = '100803-1412';
|
$build = '100805-1539';
|
||||||
|
|
||||||
$STARTtime = date("U");
|
$STARTtime = date("U");
|
||||||
$SQLdate = date("Y-m-d H:i:s");
|
$SQLdate = date("Y-m-d H:i:s");
|
||||||
@@ -2591,12 +2659,14 @@ if ($ADD==11) {$hh='campaigns'; $sh='basic'; echo "Add New Campaign";}
|
|||||||
if ($ADD==12) {$hh='campaigns'; $sh='basic'; echo "Copy Campaign";}
|
if ($ADD==12) {$hh='campaigns'; $sh='basic'; echo "Copy Campaign";}
|
||||||
if ($ADD==111) {$hh='lists'; echo "Add New List";}
|
if ($ADD==111) {$hh='lists'; echo "Add New List";}
|
||||||
if ($ADD==121) {$hh='lists'; echo "Add New DNC";}
|
if ($ADD==121) {$hh='lists'; echo "Add New DNC";}
|
||||||
|
if ($ADD==171) {$hh='ingroups'; echo "Filter Phone Group Numbers";}
|
||||||
if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";}
|
if ($ADD==1111) {$hh='ingroups'; echo "Add New In-Group";}
|
||||||
if ($ADD==1211) {$hh='ingroups'; echo "Copy In-Group";}
|
if ($ADD==1211) {$hh='ingroups'; echo "Copy In-Group";}
|
||||||
if ($ADD==1311) {$hh='ingroups'; echo "Add New DID";}
|
if ($ADD==1311) {$hh='ingroups'; echo "Add New DID";}
|
||||||
if ($ADD==1411) {$hh='ingroups'; echo "Copy DID";}
|
if ($ADD==1411) {$hh='ingroups'; echo "Copy DID";}
|
||||||
if ($ADD==1511) {$hh='ingroups'; echo "Add Call Menu";}
|
if ($ADD==1511) {$hh='ingroups'; echo "Add Call Menu";}
|
||||||
if ($ADD==1611) {$hh='ingroups'; echo "Copy Call Menu";}
|
if ($ADD==1611) {$hh='ingroups'; echo "Copy Call Menu";}
|
||||||
|
if ($ADD==1711) {$hh='ingroups'; echo "Add Filter Phone Group";}
|
||||||
if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";}
|
if ($ADD==11111) {$hh='remoteagent'; echo "Add New Remote Agents";}
|
||||||
if ($ADD==12111) {$hh='remoteagent'; echo "Add Extension Group";}
|
if ($ADD==12111) {$hh='remoteagent'; echo "Add Extension Group";}
|
||||||
if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";}
|
if ($ADD==111111) {$hh='usergroups'; echo "Add New Users Group";}
|
||||||
@@ -2635,6 +2705,7 @@ if ($ADD==2311) {$hh='ingroups'; echo "New DID Addition";}
|
|||||||
if ($ADD==2411) {$hh='ingroups'; echo "New Copied DID Addition";}
|
if ($ADD==2411) {$hh='ingroups'; echo "New Copied DID Addition";}
|
||||||
if ($ADD==2511) {$hh='ingroups'; echo "New Call Menu";}
|
if ($ADD==2511) {$hh='ingroups'; echo "New Call Menu";}
|
||||||
if ($ADD==2611) {$hh='ingroups'; echo "New Call Menu";}
|
if ($ADD==2611) {$hh='ingroups'; echo "New Call Menu";}
|
||||||
|
if ($ADD==2711) {$hh='ingroups'; echo "New Filter Phone Group";}
|
||||||
if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";}
|
if ($ADD==21111) {$hh='remoteagent'; echo "New Remote Agents Addition";}
|
||||||
if ($ADD==22111) {$hh='remoteagent'; echo "New Group Extension Addition";}
|
if ($ADD==22111) {$hh='remoteagent'; echo "New Group Extension Addition";}
|
||||||
if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";}
|
if ($ADD==211111) {$hh='usergroups'; echo "New Users Group Addition";}
|
||||||
@@ -2696,6 +2767,7 @@ if ($ADD==311) {$hh='lists'; echo "Modify List";}
|
|||||||
if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";}
|
if ($ADD==3111) {$hh='ingroups'; echo "Modify In-Group";}
|
||||||
if ($ADD==3311) {$hh='ingroups'; echo "Modify DID";}
|
if ($ADD==3311) {$hh='ingroups'; echo "Modify DID";}
|
||||||
if ($ADD==3511) {$hh='ingroups'; echo "Modify Call Menu";}
|
if ($ADD==3511) {$hh='ingroups'; echo "Modify Call Menu";}
|
||||||
|
if ($ADD==3711) {$hh='ingroups'; echo "Modify Filter Phone Group";}
|
||||||
if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";}
|
if ($ADD==31111) {$hh='remoteagent'; echo "Modify Remote Agents";}
|
||||||
if ($ADD==32111) {$hh='remoteagent'; echo "Modify Extension Group";}
|
if ($ADD==32111) {$hh='remoteagent'; echo "Modify Extension Group";}
|
||||||
if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";}
|
if ($ADD==311111) {$hh='usergroups'; echo "Modify Users Groups";}
|
||||||
@@ -2736,6 +2808,7 @@ if ($ADD==411) {$hh='lists'; echo "Modify List";}
|
|||||||
if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";}
|
if ($ADD==4111) {$hh='ingroups'; echo "Modify In-Group";}
|
||||||
if ($ADD==4311) {$hh='ingroups'; echo "Modify DID";}
|
if ($ADD==4311) {$hh='ingroups'; echo "Modify DID";}
|
||||||
if ($ADD==4511) {$hh='ingroups'; echo "Modify Call Menu";}
|
if ($ADD==4511) {$hh='ingroups'; echo "Modify Call Menu";}
|
||||||
|
if ($ADD==4711) {$hh='ingroups'; echo "Modify Filter Phone Group";}
|
||||||
if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";}
|
if ($ADD==41111) {$hh='remoteagent'; echo "Modify Remote Agents";}
|
||||||
if ($ADD==42111) {$hh='remoteagent'; echo "Modify Extension Group";}
|
if ($ADD==42111) {$hh='remoteagent'; echo "Modify Extension Group";}
|
||||||
if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";}
|
if ($ADD==411111) {$hh='usergroups'; echo "Modify Users Groups";}
|
||||||
@@ -2768,6 +2841,7 @@ if ($ADD==511) {$hh='lists'; echo "Delete List";}
|
|||||||
if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";}
|
if ($ADD==5111) {$hh='ingroups'; echo "Delete In-Group";}
|
||||||
if ($ADD==5311) {$hh='ingroups'; echo "Delete DID";}
|
if ($ADD==5311) {$hh='ingroups'; echo "Delete DID";}
|
||||||
if ($ADD==5511) {$hh='ingroups'; echo "Delete Call Menu";}
|
if ($ADD==5511) {$hh='ingroups'; echo "Delete Call Menu";}
|
||||||
|
if ($ADD==5711) {$hh='ingroups'; echo "Delete Phone Filter Group";}
|
||||||
if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";}
|
if ($ADD==51111) {$hh='remoteagent'; echo "Delete Remote Agents";}
|
||||||
if ($ADD==52111) {$hh='remoteagent'; echo "Delete Extension Group";}
|
if ($ADD==52111) {$hh='remoteagent'; echo "Delete Extension Group";}
|
||||||
if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";}
|
if ($ADD==511111) {$hh='usergroups'; echo "Delete Users Group";}
|
||||||
@@ -2800,6 +2874,7 @@ if ($ADD==611) {$hh='lists'; echo "Delete List";}
|
|||||||
if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";}
|
if ($ADD==6111) {$hh='ingroups'; echo "Delete In-Group";}
|
||||||
if ($ADD==6311) {$hh='ingroups'; echo "Delete DID";}
|
if ($ADD==6311) {$hh='ingroups'; echo "Delete DID";}
|
||||||
if ($ADD==6511) {$hh='ingroups'; echo "Delete Call Menu";}
|
if ($ADD==6511) {$hh='ingroups'; echo "Delete Call Menu";}
|
||||||
|
if ($ADD==6711) {$hh='ingroups'; echo "Delete Phone Filter Group";}
|
||||||
if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";}
|
if ($ADD==61111) {$hh='remoteagent'; echo "Delete Remote Agents";}
|
||||||
if ($ADD==62111) {$hh='remoteagent'; echo "Delete Extension Group";}
|
if ($ADD==62111) {$hh='remoteagent'; echo "Delete Extension Group";}
|
||||||
if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";}
|
if ($ADD==611111) {$hh='usergroups'; echo "Delete Users Group";}
|
||||||
@@ -2836,6 +2911,7 @@ if ($ADD==100) {$hh='lists'; echo "Lists";}
|
|||||||
if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";}
|
if ($ADD==1000) {$hh='ingroups'; echo "In-Groups";}
|
||||||
if ($ADD==1300) {$hh='ingroups'; echo "DIDs";}
|
if ($ADD==1300) {$hh='ingroups'; echo "DIDs";}
|
||||||
if ($ADD==1500) {$hh='ingroups'; echo "Call Menus";}
|
if ($ADD==1500) {$hh='ingroups'; echo "Call Menus";}
|
||||||
|
if ($ADD==1700) {$hh='ingroups'; echo "Filter Phone Groups";}
|
||||||
if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";}
|
if ($ADD==10000) {$hh='remoteagent'; echo "Remote Agents";}
|
||||||
if ($ADD==12000) {$hh='remoteagent'; echo "Extension Groups";}
|
if ($ADD==12000) {$hh='remoteagent'; echo "Extension Groups";}
|
||||||
if ($ADD==100000) {$hh='usergroups'; echo "User Groups";}
|
if ($ADD==100000) {$hh='usergroups'; echo "User Groups";}
|
||||||
@@ -5145,6 +5221,32 @@ if ($ADD==99999)
|
|||||||
<BR>
|
<BR>
|
||||||
<B>In-Group Phone Code -</B> If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created.
|
<B>In-Group Phone Code -</B> If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_inbound_dids-filter_clean_cid_number">
|
||||||
|
<BR>
|
||||||
|
<B>Clean CID Number -</B> This field allows you to specify a number of digits to restrict the incoming caller ID number to by putting an R in front of the number of digits, for example to restrict to the right 10 digits you would enter in R10. You can also use this feature to remove only a leading digit or digits by putting an L in front of the specific digits that you want to remove, for example to remove a 1 as the first digit you would enter in L1. Default is empty. If more than one rule is specified make sure you separate them with a space and the R will run before the L.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_inbound_dids-filter_inbound_number">
|
||||||
|
<BR>
|
||||||
|
<B>Filter Inbound Number -</B> This option if enabled allows you to filter calls coming into this DID and send them to an alternative action if they match a phone number that is in the filter phone group or a URL response if you have configured one. Default is DISABLED. GROUP will search in a Filter Phone Group. URL will send a URL and will match if a 1 is sent back.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_inbound_dids-filter_phone_group_id">
|
||||||
|
<BR>
|
||||||
|
<B>Filter Phone Group ID -</B> If the Filter Inbound Number field is set to GROUP then this is the ID of the Filter Phone Group that will have its numbers searched looking for a match to the caller ID number of the incoming call.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_inbound_dids-filter_url">
|
||||||
|
<BR>
|
||||||
|
<B>Filter URL -</B> If the Filter Inbound Number field is set to URL then this is the web address of a script that will search a remote system and return a 1 for a match and a 0 for no match. Only two variables are available in the address if you use the VAR prefix like with webform addresses in campaigns, --A--phone_number--B-- and --A--did_pattern--B-- can be used in the URL to indicate the caller ID of the caller and the DID that the customer caclled in on.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_inbound_dids-filter_action">
|
||||||
|
<BR>
|
||||||
|
<B>Filter Action -</B> If Filter Inbound Number is activated and a match is found then this is the action that is to be taken. This is the same as the Route that you select for a DID, and the settings below function just like they do for a standard routing.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5244,6 +5346,26 @@ if ($ADD==99999)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<BR><BR><BR><BR>
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_filter_phone_groups-filter_phone_group_id">
|
||||||
|
<BR>
|
||||||
|
<B>Filter Phone Group ID -</B> This is the ID of the Filter Phone Group that is the container for a group of phone numbers that you can have automatically searched through when a call comes into a DID and send to an alternate route if there is a match. This field should be between 2 and 20 characters and have no punctuation except for underscore.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_filter_phone_groups-filter_phone_group_name">
|
||||||
|
<BR>
|
||||||
|
<B>Filter Phone Group Name -</B> This is the name of the Filter Phone Group and is displayed with the ID in select lists where this feature is used. This field should be between 2 and 40 characters.
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="vicidial_filter_phone_groups-filter_phone_group_description">
|
||||||
|
<BR>
|
||||||
|
<B>Filter Phone Group Description -</B> This is the description of the Filter Phone Group, it is purely for notation purposes only and is not a required field.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<BR><BR><BR><BR>
|
<BR><BR><BR><BR>
|
||||||
|
|
||||||
<B><FONT SIZE=3>VICIDIAL_REMOTE_AGENTS TABLE</FONT></B><BR><BR>
|
<B><FONT SIZE=3>VICIDIAL_REMOTE_AGENTS TABLE</FONT></B><BR><BR>
|
||||||
@@ -7687,7 +7809,123 @@ if ($ADD==121)
|
|||||||
echo "<tr bgcolor=#B6D3FC><td align=right>Add or Delete: </td><td align=left><select size=1 name=stage><option SELECTED>add</option><option>delete</option></select></td></tr>\n";
|
echo "<tr bgcolor=#B6D3FC><td align=right>Add or Delete: </td><td align=left><select size=1 name=stage><option SELECTED>add</option><option>delete</option></select></td></tr>\n";
|
||||||
}
|
}
|
||||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
||||||
echo "</TABLE></center>\n";
|
echo "</FORM></TABLE></center>\n";
|
||||||
|
|
||||||
|
if ($LOGuser_level >= 9)
|
||||||
|
{
|
||||||
|
echo "<br>Download numbers in this list to a file: <form action=\"list_download.php\" method=POST>\n";
|
||||||
|
echo "<input type=hidden name=download_type value=dnc>\n";
|
||||||
|
echo "<select size=1 name=group_id>\n";
|
||||||
|
echo "$campaigns_list";
|
||||||
|
echo "</select><input type=submit name=SUBMIT value=SUBMIT></FORM>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=171 display the ADD NUMBER TO Filter Phone Group FORM SCREEN and add a new number
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==171)
|
||||||
|
{
|
||||||
|
echo "<TABLE><TR><TD>\n";
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
$stmt="SELECT filter_phone_group_id,filter_phone_group_name from vicidial_filter_phone_groups order by filter_phone_group_id";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$vfpg_to_print = mysql_num_rows($rslt);
|
||||||
|
|
||||||
|
$o=0;
|
||||||
|
while ($vfpg_to_print > $o)
|
||||||
|
{
|
||||||
|
$rowx=mysql_fetch_row($rslt);
|
||||||
|
$vfpg_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||||
|
$o++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($phone_numbers) > 2)
|
||||||
|
{
|
||||||
|
$PN = explode("\n",$phone_numbers);
|
||||||
|
$PNct = count($PN);
|
||||||
|
$p=0;
|
||||||
|
while ($p < $PNct)
|
||||||
|
{
|
||||||
|
if ( (ereg('delete',$stage)) and ($LOGdelete_from_dnc > 0) )
|
||||||
|
{
|
||||||
|
$stmt="SELECT count(*) from vicidial_filter_phone_numbers where phone_number='$PN[$p]' and filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
if ($row[0] < 1)
|
||||||
|
{echo "<br>FILTER PHONE GROUP NUMBER NOT DELETED - This phone number is not in the Filter Phone Group List: $PN[$p] $filter_phone_group_id\n";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt="DELETE FROM vicidial_filter_phone_numbers where phone_number='$PN[$p]' and filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
echo "<br><B>FILTER PHONE GROUP NUMBER DELETED: $PN[$p] $filter_phone_group_id</B>\n";
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$SQL_log = "$stmt|";
|
||||||
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
||||||
|
$SQL_log = addslashes($SQL_log);
|
||||||
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERPHONEGROUPS', event_type='DELETE', record_id='$PN[$p]', event_code='ADMIN DELETE NUMBER FROM FILTER PHONE GROUP $filter_phone_group_id', event_sql=\"$SQL_log\", event_notes='';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt="SELECT count(*) from vicidial_filter_phone_numbers where phone_number='$PN[$p]' and filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
if ($row[0] > 0)
|
||||||
|
{echo "<br>FILTER PHONE GROUP NUMBER NOT ADDED - This phone number is already in the Filter Phone Group List: $PN[$p] $filter_phone_group_id\n";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt="INSERT INTO vicidial_filter_phone_numbers (phone_number,filter_phone_group_id) values('$PN[$p]','$filter_phone_group_id');";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
echo "<br><B>FILTER PHONE GROUP NUMBER ADDED: $PN[$p] $filter_phone_group_id</B>\n";
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$SQL_log = "$stmt|";
|
||||||
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
||||||
|
$SQL_log = addslashes($SQL_log);
|
||||||
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERPHONEGROUPS', event_type='ADD', record_id='$PN[$p]', event_code='ADMIN ADD NUMBER TO FILTER PHONE GROUP $filter_phone_group_id', event_sql=\"$SQL_log\", event_notes='';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$p++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($LOGdelete_from_dnc > 0)
|
||||||
|
{echo "<br>ADD OR DELETE NUMBERS FROM THE FILTER PHONE GROUP LIST<form action=$PHP_SELF method=POST>\n";}
|
||||||
|
else
|
||||||
|
{echo "<br>ADD NUMBERS TO THE FILTER PHONE GROUP LIST<form action=$PHP_SELF method=POST>\n";}
|
||||||
|
echo "<input type=hidden name=ADD value=171>\n";
|
||||||
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group: </td><td align=left><select size=1 name=filter_phone_group_id>\n";
|
||||||
|
echo "$vfpg_list";
|
||||||
|
echo "</select></td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Phone Numbers: <BR><BR> (one phone number per line only)<BR>$NWB#vicidial_list-dnc$NWE</td><td align=left><TEXTAREA name=phone_numbers ROWS=20 COLS=20></TEXTAREA></td></tr>\n";
|
||||||
|
if ($LOGdelete_from_dnc > 0)
|
||||||
|
{
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Add or Delete: </td><td align=left><select size=1 name=stage><option SELECTED>add</option><option>delete</option></select></td></tr>\n";
|
||||||
|
}
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
||||||
|
echo "</FORM></TABLE></center>\n";
|
||||||
|
|
||||||
|
if ($LOGuser_level >= 9)
|
||||||
|
{
|
||||||
|
echo "<br>Download numbers in this list to a file: <form action=\"list_download.php\" method=POST>\n";
|
||||||
|
echo "<input type=hidden name=download_type value=fpgn>\n";
|
||||||
|
echo "<select size=1 name=group_id>\n";
|
||||||
|
echo "$vfpg_list";
|
||||||
|
echo "</select><input type=submit name=SUBMIT value=SUBMIT></FORM>\n";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -7994,6 +8232,34 @@ if ($ADD==1611)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=1711 display the ADD NEW FILTER PHONE GROUP SCREEN
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==1711)
|
||||||
|
{
|
||||||
|
if ($LOGmodify_dids==1)
|
||||||
|
{
|
||||||
|
echo "<TABLE><TR><TD>\n";
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
echo "<br>Add Filter Phone Group<form action=$PHP_SELF method=POST>\n";
|
||||||
|
echo "<input type=hidden name=ADD value=2711>\n";
|
||||||
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group ID: </td><td align=left><input type=text name=filter_phone_group_id size=20 maxlength=20> (no spaces or special characters)$NWB#vicidial_filter_phone_groups-filter_phone_group_id$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group Name: </td><td align=left><input type=text name=filter_phone_group_name size=40 maxlength=40>$NWB#vicidial_filter_phone_groups-filter_phone_group_name$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group Description: </td><td align=left><input type=text name=filter_phone_group_description size=60 maxlength=100>$NWB#vicidial_filter_phone_groups-filter_phone_group_description$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
||||||
|
echo "</TABLE></center>\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "You do not have permission to view this page\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN
|
# ADD=11111 display the ADD NEW REMOTE AGENTS SCREEN
|
||||||
######################
|
######################
|
||||||
@@ -10093,7 +10359,7 @@ if ($ADD==2411)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id,record_call) SELECT \"$did_pattern\",\"$did_description\",did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id,record_call from vicidial_inbound_dids where did_id=\"$source_did\";";
|
$stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number) SELECT \"$did_pattern\",\"$did_description\",did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number from vicidial_inbound_dids where did_id=\"$source_did\";";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
$stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
$stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$did_pattern';";
|
||||||
@@ -10225,6 +10491,45 @@ if ($ADD==2611)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=2711 adds the new filter phone group to the system
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==2711)
|
||||||
|
{
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
$stmt="SELECT count(*) from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
if ($row[0] > 0)
|
||||||
|
{echo "<br>PHONE FILTER GROUP NOT ADDED - there is already a PHONE FILTER GROUP in the system with this ID\n";}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( (strlen($filter_phone_group_id) < 2) or (strlen($filter_phone_group_id) > 20) or (eregi(' ',$filter_phone_group_id)) )
|
||||||
|
{
|
||||||
|
echo "<br>PHONE FILTER GROUP NOT ADDED - Please go back and look at the data you entered\n";
|
||||||
|
echo "<br>Phone Filter Group ID must be between 2 and 20 characters in length and contain no ' '.\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt="INSERT INTO vicidial_filter_phone_groups (filter_phone_group_id,filter_phone_group_name,filter_phone_group_description) values('$filter_phone_group_id','$filter_phone_group_name','$filter_phone_group_description');";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
echo "<br><B>PHONE FILTER GROUP ADDED: $filter_phone_group_id $filter_phone_group_name</B>\n";
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$SQL_log = "$stmt|";
|
||||||
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
||||||
|
$SQL_log = addslashes($SQL_log);
|
||||||
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERPHONEGROUPS', event_type='ADD', record_id='$filter_phone_group_id', event_code='ADMIN ADD FILTER PHONE GROUP', event_sql=\"$SQL_log\", event_notes='$filter_phone_group_name';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$ADD=3711;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=21111 adds new remote agents to the system
|
# ADD=21111 adds new remote agents to the system
|
||||||
######################
|
######################
|
||||||
@@ -13153,7 +13458,7 @@ if ($ADD==4311)
|
|||||||
{
|
{
|
||||||
echo "<br><B>DID MODIFIED: $did_pattern</B>\n";
|
echo "<br><B>DID MODIFIED: $did_pattern</B>\n";
|
||||||
|
|
||||||
$stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension',exten_context='$exten_context',voicemail_ext='$voicemail_ext',phone='$phone',server_ip='$server_ip',user='$user',user_unavailable_action='$user_unavailable_action',user_route_settings_ingroup='$user_route_settings_ingroup',group_id='$group_id',call_handle_method='$call_handle_method',agent_search_method='$agent_search_method',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code',menu_id='$menu_id',record_call='$record_call' where did_id='$did_id';";
|
$stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension',exten_context='$exten_context',voicemail_ext='$voicemail_ext',phone='$phone',server_ip='$server_ip',user='$user',user_unavailable_action='$user_unavailable_action',user_route_settings_ingroup='$user_route_settings_ingroup',group_id='$group_id',call_handle_method='$call_handle_method',agent_search_method='$agent_search_method',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code',menu_id='$menu_id',record_call='$record_call',filter_inbound_number='$filter_inbound_number',filter_phone_group_id='$filter_phone_group_id',filter_url='$filter_url',filter_action='$filter_action',filter_extension='$filter_extension',filter_exten_context='$filter_exten_context',filter_voicemail_ext='$filter_voicemail_ext',filter_phone='$filter_phone',filter_server_ip='$filter_server_ip',filter_user='$filter_user',filter_user_unavailable_action='$filter_user_unavailable_action',filter_user_route_settings_ingroup='$filter_user_route_settings_ingroup',filter_group_id='$filter_group_id',filter_call_handle_method='$filter_call_handle_method',filter_agent_search_method='$filter_agent_search_method',filter_list_id='$filter_list_id',filter_campaign_id='$filter_campaign_id',filter_phone_code='$filter_phone_code',filter_menu_id='$filter_menu_id',filter_clean_cid_number='$filter_clean_cid_number' where did_id='$did_id';";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
### LOG INSERTION Admin Log Table ###
|
### LOG INSERTION Admin Log Table ###
|
||||||
@@ -13325,6 +13630,46 @@ if ($ADD==4511)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=4711 modify filter phone group info in the system
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==4711)
|
||||||
|
{
|
||||||
|
if ($LOGmodify_dids==1)
|
||||||
|
{
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
if ( (strlen($filter_phone_group_id) < 2) or (strlen($filter_phone_group_name) < 2) or (strlen($filter_phone_group_name) > 40) )
|
||||||
|
{
|
||||||
|
echo "<br>FILTER PHONE GROUP NOT MODIFIED - Please go back and look at the data you entered\n";
|
||||||
|
echo "<br>Filter Phone Group Name and ID must be at least 2 characters in length\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt="UPDATE vicidial_filter_phone_groups set filter_phone_group_name='$filter_phone_group_name', filter_phone_group_description='$filter_phone_group_description' where filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
echo "<br><B>FILTER PHONE GROUP MODIFIED</B>\n";
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$SQL_log = "$stmt|";
|
||||||
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
||||||
|
$SQL_log = addslashes($SQL_log);
|
||||||
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERPHONEGROUPS', event_type='MODIFY', record_id='$filter_phone_group_id', event_code='ADMIN FILTER PHONE GROUP', event_sql=\"$SQL_log\", event_notes='';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "You do not have permission to view this page\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$ADD=3711; # go to filter phone group modification form below
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=41111 modify remote agents info in the system
|
# ADD=41111 modify remote agents info in the system
|
||||||
######################
|
######################
|
||||||
@@ -14821,6 +15166,28 @@ if ($ADD==5511)
|
|||||||
$ADD='3511'; # go to call menu modification below
|
$ADD='3511'; # go to call menu modification below
|
||||||
}
|
}
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=5711 confirmation before deletion of filter phone group
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==5711)
|
||||||
|
{
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
if ( (strlen($filter_phone_group_id) < 2) or ($LOGdelete_dids < 1) )
|
||||||
|
{
|
||||||
|
echo "<br>FILTER PHONE GROUP NOT DELETED - Please go back and look at the data you entered\n";
|
||||||
|
echo "<br>filter_phone_group_id be at least 2 characters in length\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "<br><B>FILTER PHONE GROUP DELETION CONFIRMATION: $filter_phone_group_id</B>\n";
|
||||||
|
echo "<br><br><a href=\"$PHP_SELF?ADD=6711&filter_phone_group_id=$filter_phone_group_id&CoNfIrM=YES\">Click here to delete FILTER PHONE GROUP $filter_phone_group_id</a><br><br><br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ADD='3711'; # go to filter phone group modification below
|
||||||
|
}
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=51111 confirmation before deletion of remote agent record
|
# ADD=51111 confirmation before deletion of remote agent record
|
||||||
######################
|
######################
|
||||||
@@ -15963,6 +16330,42 @@ if ($ADD==6511)
|
|||||||
$ADD='1500'; # go to call menu list
|
$ADD='1500'; # go to call menu list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=6711 delete filter phone group record
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==6711)
|
||||||
|
{
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
if ( (strlen($filter_phone_group_id) < 1) or ($CoNfIrM != 'YES') or ($LOGdelete_dids < 1) )
|
||||||
|
{
|
||||||
|
echo "<br>FILTER PHONE GROUP NOT DELETED - Please go back and look at the data you entered\n";
|
||||||
|
echo "<br>filter_phone_group_id be at least 1 characters in length\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$stmt="DELETE from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id' limit 1;";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
$stmtA="DELETE from vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmtA, $link);
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$SQL_log = "$stmt|$stmtA";
|
||||||
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
||||||
|
$SQL_log = addslashes($SQL_log);
|
||||||
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERPHONEGROUPS', event_type='DELETE', record_id='$filter_phone_group_id', event_code='ADMIN DELETE FILTER PHONE GROUP', event_sql=\"$SQL_log\", event_notes='';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
echo "<br><B>FILTER PHONE GROUP DELETION COMPLETED: $filter_phone_group_id</B>\n";
|
||||||
|
echo "<br><br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ADD='1700'; # go to filter phone group list
|
||||||
|
}
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=61111 delete remote agent record
|
# ADD=61111 delete remote agent record
|
||||||
######################
|
######################
|
||||||
@@ -21184,7 +21587,7 @@ if ($ADD==3311)
|
|||||||
$didSQL = "did_id='$did_id'";
|
$didSQL = "did_id='$did_id'";
|
||||||
if ( (strlen($did_id)<1) and (strlen($did_pattern)>0) )
|
if ( (strlen($did_id)<1) and (strlen($did_pattern)>0) )
|
||||||
{$didSQL = "did_pattern='$did_pattern'";}
|
{$didSQL = "did_pattern='$did_pattern'";}
|
||||||
$stmt="SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id,record_call from vicidial_inbound_dids where $didSQL;";
|
$stmt="SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id,record_call,filter_inbound_number,filter_phone_group_id,filter_url,filter_action,filter_extension,filter_exten_context,filter_voicemail_ext,filter_phone,filter_server_ip,filter_user,filter_user_unavailable_action,filter_user_route_settings_ingroup,filter_group_id,filter_call_handle_method,filter_agent_search_method,filter_list_id,filter_campaign_id,filter_phone_code,filter_menu_id,filter_clean_cid_number from vicidial_inbound_dids where $didSQL;";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
@@ -21209,6 +21612,26 @@ if ($ADD==3311)
|
|||||||
$phone_code = $row[18];
|
$phone_code = $row[18];
|
||||||
$menu_id = $row[19];
|
$menu_id = $row[19];
|
||||||
$record_call = $row[20];
|
$record_call = $row[20];
|
||||||
|
$filter_inbound_number = $row[21];
|
||||||
|
$filter_phone_group_id = $row[22];
|
||||||
|
$filter_url = $row[23];
|
||||||
|
$filter_action = $row[24];
|
||||||
|
$filter_extension = $row[25];
|
||||||
|
$filter_exten_context = $row[26];
|
||||||
|
$filter_voicemail_ext = $row[27];
|
||||||
|
$filter_phone = $row[28];
|
||||||
|
$filter_server_ip = $row[29];
|
||||||
|
$filter_user = $row[30];
|
||||||
|
$filter_user_unavailable_action = $row[31];
|
||||||
|
$filter_user_route_settings_ingroup = $row[32];
|
||||||
|
$filter_group_id = $row[33];
|
||||||
|
$filter_call_handle_method = $row[34];
|
||||||
|
$filter_agent_search_method = $row[35];
|
||||||
|
$filter_list_id = $row[36];
|
||||||
|
$filter_campaign_id = $row[37];
|
||||||
|
$filter_phone_code = $row[38];
|
||||||
|
$filter_menu_id = $row[39];
|
||||||
|
$filter_clean_cid_number = $row[40];
|
||||||
|
|
||||||
|
|
||||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id";
|
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id";
|
||||||
@@ -21229,23 +21652,36 @@ if ($ADD==3311)
|
|||||||
$Xgroups_to_print = mysql_num_rows($rslt);
|
$Xgroups_to_print = mysql_num_rows($rslt);
|
||||||
$Xgroups_menu='';
|
$Xgroups_menu='';
|
||||||
$Xgroups_selected=0;
|
$Xgroups_selected=0;
|
||||||
|
$FXgroups_menu='';
|
||||||
|
$FXgroups_selected=0;
|
||||||
$o=0;
|
$o=0;
|
||||||
while ($Xgroups_to_print > $o)
|
while ($Xgroups_to_print > $o)
|
||||||
{
|
{
|
||||||
$rowx=mysql_fetch_row($rslt);
|
$rowx=mysql_fetch_row($rslt);
|
||||||
$Xgroups_menu .= "<option ";
|
$Xgroups_menu .= "<option ";
|
||||||
|
$FXgroups_menu .= "<option ";
|
||||||
if ($user_route_settings_ingroup == "$rowx[0]")
|
if ($user_route_settings_ingroup == "$rowx[0]")
|
||||||
{
|
{
|
||||||
$Xgroups_menu .= "SELECTED ";
|
$Xgroups_menu .= "SELECTED ";
|
||||||
$Xgroups_selected++;
|
$Xgroups_selected++;
|
||||||
}
|
}
|
||||||
|
if ($filter_user_route_settings_ingroup == "$rowx[0]")
|
||||||
|
{
|
||||||
|
$FXgroups_menu .= "SELECTED ";
|
||||||
|
$FXgroups_selected++;
|
||||||
|
}
|
||||||
$Xgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
$Xgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||||
|
$FXgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||||
$o++;
|
$o++;
|
||||||
}
|
}
|
||||||
if ($Xgroups_selected < 1)
|
if ($Xgroups_selected < 1)
|
||||||
{$Xgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
{$Xgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
else
|
else
|
||||||
{$Xgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
{$Xgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
|
if ($FXgroups_selected < 1)
|
||||||
|
{$FXgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
|
else
|
||||||
|
{$FXgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
|
|
||||||
|
|
||||||
##### get in-groups listings for dynamic pulldown
|
##### get in-groups listings for dynamic pulldown
|
||||||
@@ -21254,23 +21690,36 @@ if ($ADD==3311)
|
|||||||
$Dgroups_to_print = mysql_num_rows($rslt);
|
$Dgroups_to_print = mysql_num_rows($rslt);
|
||||||
$Dgroups_menu='';
|
$Dgroups_menu='';
|
||||||
$Dgroups_selected=0;
|
$Dgroups_selected=0;
|
||||||
|
$FDgroups_menu='';
|
||||||
|
$FDgroups_selected=0;
|
||||||
$o=0;
|
$o=0;
|
||||||
while ($Dgroups_to_print > $o)
|
while ($Dgroups_to_print > $o)
|
||||||
{
|
{
|
||||||
$rowx=mysql_fetch_row($rslt);
|
$rowx=mysql_fetch_row($rslt);
|
||||||
$Dgroups_menu .= "<option ";
|
$Dgroups_menu .= "<option ";
|
||||||
|
$FDgroups_menu .= "<option ";
|
||||||
if ($group_id == "$rowx[0]")
|
if ($group_id == "$rowx[0]")
|
||||||
{
|
{
|
||||||
$Dgroups_menu .= "SELECTED ";
|
$Dgroups_menu .= "SELECTED ";
|
||||||
$Dgroups_selected++;
|
$Dgroups_selected++;
|
||||||
}
|
}
|
||||||
|
if ($filter_group_id == "$rowx[0]")
|
||||||
|
{
|
||||||
|
$FDgroups_menu .= "SELECTED ";
|
||||||
|
$FDgroups_selected++;
|
||||||
|
}
|
||||||
$Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
$Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||||
|
$FDgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||||
$o++;
|
$o++;
|
||||||
}
|
}
|
||||||
if ($Dgroups_selected < 1)
|
if ($Dgroups_selected < 1)
|
||||||
{$Dgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
{$Dgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
else
|
else
|
||||||
{$Dgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
{$Dgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
|
if ($FDgroups_selected < 1)
|
||||||
|
{$FDgroups_menu .= "<option SELECTED value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
|
else
|
||||||
|
{$FDgroups_menu .= "<option value=\"---NONE---\">---NONE---</option>\n";}
|
||||||
|
|
||||||
|
|
||||||
echo "<br>MODIFY A DID RECORD: $row[0]<form action=$PHP_SELF method=POST>\n";
|
echo "<br>MODIFY A DID RECORD: $row[0]<form action=$PHP_SELF method=POST>\n";
|
||||||
@@ -21322,6 +21771,61 @@ if ($ADD==3311)
|
|||||||
echo "</select>$NWB#vicidial_inbound_dids-campaign_id$NWE</td></tr>\n";
|
echo "</select>$NWB#vicidial_inbound_dids-campaign_id$NWE</td></tr>\n";
|
||||||
echo "<tr bgcolor=#B6D3FC><td align=right>In-Group Phone Code: </td><td align=left><input type=text name=phone_code size=14 maxlength=14 value=\"$phone_code\">$NWB#vicidial_inbound_dids-phone_code$NWE</td></tr>\n";
|
echo "<tr bgcolor=#B6D3FC><td align=right>In-Group Phone Code: </td><td align=left><input type=text name=phone_code size=14 maxlength=14 value=\"$phone_code\">$NWB#vicidial_inbound_dids-phone_code$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#99FFCC><td align=right>Clean CID Number: </td><td align=left><input type=text name=filter_clean_cid_number size=20 maxlength=20 value=\"$filter_clean_cid_number\">$NWB#vicidial_inbound_dids-filter_clean_cid_number$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Inbound Number: </td><td align=left><select size=1 name=filter_inbound_number><option value=\"DISABLED\">DISABLED</option><option value=\"GROUP\">GROUP</option><option value=\"URL\">URL</option><option SELECTED>$filter_inbound_number</option></select>$NWB#vicidial_inbound_dids-filter_inbound_number$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
$stmt="select filter_phone_group_id,filter_phone_group_name from vicidial_filter_phone_groups order by filter_phone_group_id;";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$Fgroups_to_print = mysql_num_rows($rslt);
|
||||||
|
$Fgroups_list='';
|
||||||
|
$i=0;
|
||||||
|
while ($i < $Fgroups_to_print)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$Fgroups_list .= "<option value=\"$row[0]\">$row[0] - $row[1] - $row[2]</option>";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$filter_phone_group_id\">Filter Phone Group ID:</a> </td><td align=left><select size=1 name=filter_phone_group_id>$Fgroups_list<option SELECTED>$filter_phone_group_id</option></select>$NWB#vicidial_inbound_dids-filter_phone_group_id$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter URL: </td><td align=left><input type=text name=filter_url size=60 maxlength=1000 value=\"$filter_url\">$NWB#vicidial_inbound_dids-filter_url$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Action: </td><td align=left><select size=1 name=filter_action><option>AGENT</option><option>EXTEN</option><option>VOICEMAIL</option><option>PHONE</option><option>IN_GROUP</option><option>CALLMENU</option><option SELECTED>$filter_action</option></select>$NWB#vicidial_inbound_dids-filter_action$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Extension: </td><td align=left><input type=text name=filter_extension size=40 maxlength=50 value=\"$filter_extension\">$NWB#vicidial_inbound_dids-extension$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Extension Context: </td><td align=left><input type=text name=filter_exten_context size=40 maxlength=50 value=\"$filter_exten_context\">$NWB#vicidial_inbound_dids-exten_context$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Voicemail Box: </td><td align=left><input type=text name=filter_voicemail_ext id=voicemail_ext size=12 maxlength=10 value=\"$filter_voicemail_ext\"> <a href=\"javascript:launch_vm_chooser('voicemail_ext','vm',100);\">voicemail chooser</a>$NWB#vicidial_inbound_dids-voicemail_ext$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Phone Extension: </td><td align=left><input type=text name=filter_phone size=20 maxlength=100 value=\"$filter_phone\">$NWB#vicidial_inbound_dids-phone$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter Server IP: </td><td align=left><select size=1 name=filter_server_ip>\n";
|
||||||
|
echo "$servers_list";
|
||||||
|
echo "<option SELECTED>$filter_server_ip</option>\n";
|
||||||
|
echo "</select>$NWB#vicidial_inbound_dids-server_ip$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3511&menu_id=$menu_id\">Filter Call Menu:</a> </td><td align=left><select size=1 name=filter_menu_id>$menu_list<option SELECTED>$filter_menu_id</option></select>$NWB#vicidial_inbound_dids-menu_id$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter User Agent: </td><td align=left><input type=text name=filter_user size=20 maxlength=20 value=\"$filter_user\">$NWB#vicidial_inbound_dids-user$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter User Unavailable Action: </td><td align=left><select size=1 name=filter_user_unavailable_action><option>EXTEN</option><option>VOICEMAIL</option><option>PHONE</option><option>IN_GROUP</option><option SELECTED>$filter_user_unavailable_action</option></select>$NWB#vicidial_inbound_dids-user_unavailable_action$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter User Route Settings In-Group: </td><td align=left><select size=1 name=filter_user_route_settings_ingroup>";
|
||||||
|
echo "$FXgroups_menu";
|
||||||
|
echo "</select>$NWB#vicidial_inbound_dids-user_route_settings_ingroup$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right><a href=\"$PHP_SELF?ADD=3111&group_id=$group_id\">Filter In-Group ID</a>: </td><td align=left><select size=1 name=filter_group_id>";
|
||||||
|
echo "$FDgroups_menu";
|
||||||
|
echo "</select>$NWB#vicidial_inbound_dids-group_id$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter In-Group Call Handle Method: </td><td align=left><select size=1 name=filter_call_handle_method><option>CID</option><option>CIDLOOKUP</option><option>CIDLOOKUPRL</option><option>CIDLOOKUPRC</option><option>ANI</option><option>ANILOOKUP</option><option>ANILOOKUPRL</option><option>VIDPROMPT</option><option>VIDPROMPTLOOKUP</option><option>VIDPROMPTLOOKUPRL</option><option>VIDPROMPTLOOKUPRC</option><option>CLOSER</option><option>3DIGITID</option><option>4DIGITID</option><option>5DIGITID</option><option>10DIGITID</option><option SELECTED>$filter_call_handle_method</option></select>$NWB#vicidial_inbound_dids-call_handle_method$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter In-Group Agent Search Method: </td><td align=left><select size=1 name=filter_agent_search_method><option value=\"LB\">LB - Load Balanced</option><option value=\"LO\">LO - Load Balanced Overflow</option><option value=\"SO\">SO - Server Only</option><option SELECTED>$filter_agent_search_method</option></select>$NWB#vicidial_inbound_dids-agent_search_method$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter In-Group List ID: </td><td align=left><input type=text name=filter_list_id size=14 maxlength=14 value=\"$filter_list_id\">$NWB#vicidial_inbound_dids-list_id$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter In-Group Campaign ID: </td><td align=left><select size=1 name=filter_campaign_id>\n";
|
||||||
|
echo "$campaigns_list";
|
||||||
|
echo "<option SELECTED>$filter_campaign_id</option>\n";
|
||||||
|
echo "</select>$NWB#vicidial_inbound_dids-campaign_id$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#CCFFFF><td align=right>Filter In-Group Phone Code: </td><td align=left><input type=text name=filter_phone_code size=14 maxlength=14 value=\"$filter_phone_code\">$NWB#vicidial_inbound_dids-phone_code$NWE</td></tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<BR></center></FORM><br>\n";
|
echo "<BR></center></FORM><br>\n";
|
||||||
@@ -21744,6 +22248,58 @@ if ($ADD==31111)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=3711 modify filter phone group info in the system
|
||||||
|
######################
|
||||||
|
|
||||||
|
if ($ADD==3711)
|
||||||
|
{
|
||||||
|
if ($LOGmodify_dids==1)
|
||||||
|
{
|
||||||
|
echo "<TABLE><TR><TD>\n";
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
$stmt="SELECT filter_phone_group_id,filter_phone_group_name,filter_phone_group_description from vicidial_filter_phone_groups where filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$filter_phone_group_id = $row[0];
|
||||||
|
$filter_phone_group_name = $row[1];
|
||||||
|
$filter_phone_group_description = $row[2];
|
||||||
|
|
||||||
|
echo "<br>Modify Filter Phone Group: $filter_phone_group_id<form action=$PHP_SELF method=POST>\n";
|
||||||
|
echo "<input type=hidden name=ADD value=4711>\n";
|
||||||
|
echo "<input type=hidden name=filter_phone_group_id value=\"$filter_phone_group_id\">\n";
|
||||||
|
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group ID: </td><td align=left> <B>$filter_phone_group_id</B> $NWB#vicidial_filter_phone_groups-user_start$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group Name: </td><td align=left><input type=text name=filter_phone_group_name size=40 maxlength=40 value=\"$filter_phone_group_name\"> $NWB#vicidial_filter_phone_groups-filter_phone_group_name$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=right>Filter Phone Group Description: </td><td align=left><input type=text name=filter_phone_group_description size=60 maxlength=100 value=\"$filter_phone_group_description\"> $NWB#vicidial_filter_phone_groups-filter_phone_group_description$NWE</td></tr>\n";
|
||||||
|
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
||||||
|
echo "</TABLE></center>\n";
|
||||||
|
|
||||||
|
$stmt="SELECT count(*) from vicidial_filter_phone_numbers where filter_phone_group_id='$filter_phone_group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
echo "<br><br>Numbers in this Filter Phone Group: $row[0]";
|
||||||
|
|
||||||
|
if ($LOGdelete_dids > 0)
|
||||||
|
{
|
||||||
|
echo "<br><br><a href=\"$PHP_SELF?ADD=5711&filter_phone_group_id=$filter_phone_group_id\">DELETE THIS FILTER PHONE GROUP</a>\n";
|
||||||
|
}
|
||||||
|
if ($LOGuser_level >= 9)
|
||||||
|
{
|
||||||
|
echo "<br><br><a href=\"./list_download.php?group_id=$filter_phone_group_id&download_type=fpgn\">Click here to download the numbers in this filter phone group</FONT>\n";
|
||||||
|
|
||||||
|
echo "<br><br><a href=\"$PHP_SELF?ADD=720000000000000&category=FILTERPHONEGROUPS&stage=$filter_phone_group_id\">Click here to see Admin chages to this filter phone group</FONT>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "You do not have permission to view this page\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=32111 modify extension group entry in the system
|
# ADD=32111 modify extension group entry in the system
|
||||||
######################
|
######################
|
||||||
@@ -24864,7 +25420,6 @@ if ($ADD==100)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=1000 display all inbound groups
|
# ADD=1000 display all inbound groups
|
||||||
######################
|
######################
|
||||||
@@ -25016,6 +25571,69 @@ if ($ADD==1500)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ADD=1700 display all filter phone groups
|
||||||
|
######################
|
||||||
|
if ($ADD==1700)
|
||||||
|
{
|
||||||
|
echo "<TABLE><TR><TD>\n";
|
||||||
|
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
|
|
||||||
|
$stmt="SELECT vfpg.filter_phone_group_id,filter_phone_group_name,filter_phone_group_description,count(*) as tally from vicidial_filter_phone_groups vfpg,vicidial_filter_phone_numbers vfpn where vfpg.filter_phone_group_id=vfpn.filter_phone_group_id group by filter_phone_group_id order by filter_phone_group_id";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$lists_to_print = mysql_num_rows($rslt);
|
||||||
|
|
||||||
|
echo "<br>FILTER PHONE GROUP LISTINGS:\n";
|
||||||
|
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
||||||
|
echo "<TR BGCOLOR=BLACK>";
|
||||||
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>FPG ID</B></a></TD>";
|
||||||
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>FPG NAME</B></TD>";
|
||||||
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIPTION</B></TD>\n";
|
||||||
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>PHONES COUNT</B></a></TD>\n";
|
||||||
|
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>MODIFY</TD>\n";
|
||||||
|
echo "</TR>\n";
|
||||||
|
|
||||||
|
$lists_printed = '';
|
||||||
|
$o=0;
|
||||||
|
while ($lists_to_print > $o)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
||||||
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||||
|
else
|
||||||
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||||
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$row[0]\">$row[0]</a></td>";
|
||||||
|
echo "<td><font size=1> $row[1]</td>";
|
||||||
|
echo "<td><font size=1> $row[2]</td>";
|
||||||
|
echo "<td><font size=1> $row[3]</td>";
|
||||||
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$row[0]\">MODIFY</a></td></tr>\n";
|
||||||
|
$groups_printed .= "'$row[0]',";
|
||||||
|
$o++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="SELECT filter_phone_group_id,filter_phone_group_name,filter_phone_group_description,0 from vicidial_filter_phone_groups where filter_phone_group_id NOT IN($groups_printed'') order by filter_phone_group_id;";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
$lists_to_print = mysql_num_rows($rslt);
|
||||||
|
$o=0;
|
||||||
|
while ($lists_to_print > $o)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
if (eregi("1$|3$|5$|7$|9$", $o))
|
||||||
|
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||||
|
else
|
||||||
|
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||||
|
echo "<tr $bgcolor><td><font size=1><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$row[0]\">$row[0]</a></td>";
|
||||||
|
echo "<td><font size=1> $row[1]</td>";
|
||||||
|
echo "<td><font size=1> $row[2]</td>";
|
||||||
|
echo "<td><font size=1> $row[3]</td>";
|
||||||
|
echo "<td><font size=1><a href=\"$PHP_SELF?ADD=3711&filter_phone_group_id=$row[0]\">MODIFY</a></td></tr>\n";
|
||||||
|
$o++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</TABLE></center>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
# ADD=10000 display all remote agents
|
# ADD=10000 display all remote agents
|
||||||
######################
|
######################
|
||||||
@@ -26409,40 +27027,41 @@ if ($ADD==999998)
|
|||||||
|
|
||||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||||
<TITLE>Administration: Admin</TITLE></HEAD><BODY BGCOLOR=WHITE>
|
<TITLE>Administration: Admin</TITLE></HEAD><BODY BGCOLOR=WHITE>
|
||||||
<FONT SIZE=4><B>Administration</B></FONT><BR><BR>
|
<FONT SIZE=4><B>Administration</B></FONT><BR><BR><CENTER>
|
||||||
<TABLE BORDER=0 CELLPADDING=5 CELLSPACING=0><TR><TD VALIGN=TOP>
|
<TABLE BORDER=0 CELLPADDING=5 CELLSPACING=0><TR><TD VALIGN=TOP>
|
||||||
<B><UL>
|
<UL>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=100000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Call Times </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=100000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Call Times </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=130000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Shifts </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=130000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Shifts </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=10000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Phones </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=10000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Phones </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=130000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Templates </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=130000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Templates </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=140000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Carriers </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=140000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Carriers </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=100000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Servers </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=100000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Servers </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=1000000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Conferences </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=1000000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Conferences </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=311111111111111\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> System Settings </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=311111111111111\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> System Settings </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=321111111111111\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> System Statuses </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=321111111111111\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> System Statuses </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=170000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Voicemail </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=170000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Voicemail </a>\n";
|
||||||
|
|
||||||
if ( ($sounds_central_control_active > 0) or ($SSsounds_central_control_active > 0) )
|
if ( ($sounds_central_control_active > 0) or ($SSsounds_central_control_active > 0) )
|
||||||
{
|
{
|
||||||
echo "<LI><a href=\"audio_store.php\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Audio Store </a>\n";
|
echo "<LI><a href=\"audio_store.php\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Audio Store </a>\n";
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=160000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Music On Hold </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=160000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Music On Hold </a>\n";
|
||||||
}
|
}
|
||||||
if ($SSenable_tts_integration > 0)
|
if ($SSenable_tts_integration > 0)
|
||||||
{
|
{
|
||||||
echo "<LI><a href=\"$PHP_SELF?ADD=150000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> Text To Speech </a>\n";
|
echo "<LI><a href=\"$PHP_SELF?ADD=150000000000\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> Text To Speech </a>\n";
|
||||||
}
|
}
|
||||||
if ($SScallcard_enabled > 0)
|
if ($SScallcard_enabled > 0)
|
||||||
{
|
{
|
||||||
echo "<LI><a href=\"callcard_admin.php\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=2> CallCard Admin </a>\n";
|
echo "<LI><a href=\"callcard_admin.php\"><FONT FACE=\"ARIAL,HELVETICA\" SIZE=3> CallCard Admin </a>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</UL></B>\n";
|
echo "</UL>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo "</TD><TD WIDTH=400> \n";
|
||||||
echo "</TD></TR></TABLE></center>\n";
|
echo "</TD></TR></TABLE></center>\n";
|
||||||
echo "</TD></TR></TABLE></center>\n";
|
echo "</TD></TR></TABLE></center>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ if($short_header)
|
|||||||
<TD> <A HREF="admin.php?ADD=100" ALT="Lists"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Lists</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=100" ALT="Lists"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Lists</B></A> </TD>
|
||||||
<TD> <A HREF="admin.php?ADD=1000000" ALT="Scripts"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Scripts</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=1000000" ALT="Scripts"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Scripts</B></A> </TD>
|
||||||
<TD> <A HREF="admin.php?ADD=10000000" ALT="Filters"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Filters</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=10000000" ALT="Filters"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Filters</B></A> </TD>
|
||||||
<TD> <A HREF="admin.php?ADD=1000" ALT="In-Groups"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>In-Groups</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=1000" ALT="Inbound"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Inbound</B></A> </TD>
|
||||||
<TD> <A HREF="admin.php?ADD=100000" ALT="User Groups"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>User Groups</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=100000" ALT="User Groups"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>User Groups</B></A> </TD>
|
||||||
<TD> <A HREF="admin.php?ADD=10000" ALT="Remote Agents"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Remote Agents</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=10000" ALT="Remote Agents"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Remote Agents</B></A> </TD>
|
||||||
<TD> <A HREF="admin.php?ADD=999998" ALT="Admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Admin</B></A> </TD>
|
<TD> <A HREF="admin.php?ADD=999998" ALT="Admin"><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Admin</B></A> </TD>
|
||||||
@@ -1026,8 +1026,8 @@ $SScustom_fields_enabled = $row[3];
|
|||||||
<?php
|
<?php
|
||||||
if (strlen($lists_hh) > 1)
|
if (strlen($lists_hh) > 1)
|
||||||
{
|
{
|
||||||
if ($LOGdelete_from_dnc > 0) {$DNClink = 'Add-Delete Number From DNC';}
|
if ($LOGdelete_from_dnc > 0) {$DNClink = 'Add-Delete DNC Number';}
|
||||||
else {$DNClink = 'Add Number To DNC';}
|
else {$DNClink = 'Add DNC Number';}
|
||||||
?>
|
?>
|
||||||
<TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
<TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="<?php echo $ADMIN ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Lists </a>
|
<a href="<?php echo $ADMIN ?>?ADD=100"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show Lists </a>
|
||||||
@@ -1046,7 +1046,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="./admin_lists_custom.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> List Custom Fields </a>
|
<a href="./admin_lists_custom.php"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> List Custom Fields </a>
|
||||||
</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
</TR><TR BGCOLOR=<?php echo $lists_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="./admin_lists_custom.php?action=COPY_FIELDS_FORM"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy List Custom Fields </a>
|
<a href="./admin_lists_custom.php?action=COPY_FIELDS_FORM"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy Custom Fields </a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -1090,11 +1090,13 @@ $SScustom_fields_enabled = $row[3];
|
|||||||
?>
|
?>
|
||||||
<!-- INGROUPS NAVIGATION -->
|
<!-- INGROUPS NAVIGATION -->
|
||||||
<TR><TD <?php echo $ingroups_hh ?>>
|
<TR><TD <?php echo $ingroups_hh ?>>
|
||||||
<a href="<?php echo $ADMIN ?>?ADD=1000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $ingroups_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $ingroups_bold ?> In-Groups </a>
|
<a href="<?php echo $ADMIN ?>?ADD=1000"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $ingroups_fc ?> SIZE=<?php echo $header_font_size ?>><?php echo $ingroups_bold ?> Inbound </a>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<?php
|
<?php
|
||||||
if (strlen($ingroups_hh) > 1)
|
if (strlen($ingroups_hh) > 1)
|
||||||
{
|
{
|
||||||
|
if ($LOGdelete_from_dnc > 0) {$FPGlink = 'Add-Delete FPG Number';}
|
||||||
|
else {$FPGlink = 'Add FPG Number';}
|
||||||
?>
|
?>
|
||||||
<TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
<TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="<?php echo $ADMIN ?>?ADD=1000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show In-Groups </a>
|
<a href="<?php echo $ADMIN ?>?ADD=1000"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Show In-Groups </a>
|
||||||
@@ -1113,7 +1115,13 @@ $SScustom_fields_enabled = $row[3];
|
|||||||
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="<?php echo $ADMIN ?>?ADD=1511"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Call Menu </a>
|
<a href="<?php echo $ADMIN ?>?ADD=1511"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add A New Call Menu </a>
|
||||||
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
||||||
<a href="<?php echo $ADMIN ?>?ADD=1611"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy Call Menu </a>
|
<a href="<?php echo $ADMIN ?>?ADD=1611"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Copy Call Menu </a><HR>
|
||||||
|
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
||||||
|
<a href="<?php echo $ADMIN ?>?ADD=1700"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Filter Phone Groups </a>
|
||||||
|
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
||||||
|
<a href="<?php echo $ADMIN ?>?ADD=1711"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> Add Filter Phone Group </a>
|
||||||
|
</TD></TR><TR BGCOLOR=<?php echo $ingroups_color ?>><TD ALIGN=LEFT>
|
||||||
|
<a href="<?php echo $ADMIN ?>?ADD=171"><FONT FACE="ARIAL,HELVETICA" COLOR=BLACK SIZE=<?php echo $subheader_font_size ?>> <?php echo $FPGlink ?> </a>
|
||||||
</TD></TR>
|
</TD></TR>
|
||||||
<?php }
|
<?php }
|
||||||
?>
|
?>
|
||||||
|
|||||||
+200
-53
@@ -16,6 +16,7 @@
|
|||||||
# 100702-1335 - Added custom fields
|
# 100702-1335 - Added custom fields
|
||||||
# 100712-1324 - Added system setting slave server option
|
# 100712-1324 - Added system setting slave server option
|
||||||
# 100802-2347 - Added User Group Allowed Reports option validation
|
# 100802-2347 - Added User Group Allowed Reports option validation
|
||||||
|
# 100804-1745 - Added option to download DNC and FPGN lists
|
||||||
#
|
#
|
||||||
|
|
||||||
require("dbconnect.php");
|
require("dbconnect.php");
|
||||||
@@ -31,8 +32,13 @@ if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
|||||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||||
|
if (isset($_GET["group_id"])) {$group_id=$_GET["group_id"];}
|
||||||
|
elseif (isset($_POST["group_id"])) {$group_id=$_POST["group_id"];}
|
||||||
|
if (isset($_GET["download_type"])) {$download_type=$_GET["download_type"];}
|
||||||
|
elseif (isset($_POST["download_type"])) {$download_type=$_POST["download_type"];}
|
||||||
|
|
||||||
if (strlen($shift)<2) {$shift='ALL';}
|
if (strlen($shift)<2) {$shift='ALL';}
|
||||||
|
if ($group_id=='SYSTEM_INTERNAL') {$download_type='systemdnc';}
|
||||||
|
|
||||||
$report_name = 'Download List';
|
$report_name = 'Download List';
|
||||||
$db_source = 'M';
|
$db_source = 'M';
|
||||||
@@ -111,39 +117,148 @@ if ( (!eregi("-ALL",$LOGallowed_campaigns)) )
|
|||||||
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt="select count(*) from vicidial_lists where list_id='$list_id' $LOGallowed_campaignsSQL;";
|
if ($download_type == 'systemdnc')
|
||||||
$rslt=mysql_query($stmt, $link);
|
|
||||||
if ($DB) {echo "$stmt\n";}
|
|
||||||
$count_to_print = mysql_num_rows($rslt);
|
|
||||||
if ($count_to_print > 0)
|
|
||||||
{
|
{
|
||||||
$row=mysql_fetch_row($rslt);
|
##### System DNC list validation #####
|
||||||
$lists_allowed =$row[0];
|
$event_code_type='SYSTEM INTERNAL DNC';
|
||||||
$i++;
|
if (strlen($LOGallowed_campaignsSQL) > 2)
|
||||||
|
{
|
||||||
|
echo "You are not allowed to download this list: $list_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select count(*) from vicidial_dnc;";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$leads_count =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($leads_count < 1)
|
||||||
|
{
|
||||||
|
echo "There are no phone numbers in list: SYSTEM INTERNAL DNC\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($download_type == 'dnc')
|
||||||
|
{
|
||||||
|
##### Campaign DNC list validation #####
|
||||||
|
$event_code_type='CAMPAIGN DNC';
|
||||||
|
$stmt="select count(*) from vicidial_campaigns where campaign_id='$group_id' $LOGallowed_campaignsSQL;";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$lists_allowed =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($lists_allowed < 1)
|
||||||
|
{
|
||||||
|
echo "You are not allowed to download this list: $group_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select count(*) from vicidial_campaign_dnc where campaign_id='$group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$leads_count =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($leads_count < 1)
|
||||||
|
{
|
||||||
|
echo "There are no leads in Campaign DNC list: $group_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($download_type == 'fpgn')
|
||||||
|
{
|
||||||
|
##### Filter Phone Group list validation #####
|
||||||
|
$event_code_type='FILTER PHONE GROUP';
|
||||||
|
$stmt="select count(*) from vicidial_filter_phone_groups where filter_phone_group_id='$group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$lists_allowed =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($lists_allowed < 1)
|
||||||
|
{
|
||||||
|
echo "You are not allowed to download this list: $group_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select count(*) from vicidial_filter_phone_numbers where filter_phone_group_id='$group_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$leads_count =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($leads_count < 1)
|
||||||
|
{
|
||||||
|
echo "There are no leads in this filter phone group: $group_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
##### list download validation #####
|
||||||
|
$event_code_type='LIST';
|
||||||
|
$stmt="select count(*) from vicidial_lists where list_id='$list_id' $LOGallowed_campaignsSQL;";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$lists_allowed =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($lists_allowed < 1)
|
||||||
|
{
|
||||||
|
echo "You are not allowed to download this list: $list_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select count(*) from vicidial_list where list_id='$list_id';";
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$count_to_print = mysql_num_rows($rslt);
|
||||||
|
if ($count_to_print > 0)
|
||||||
|
{
|
||||||
|
$row=mysql_fetch_row($rslt);
|
||||||
|
$leads_count =$row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($leads_count < 1)
|
||||||
|
{
|
||||||
|
echo "There are no leads in list_id: $list_id\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($lists_allowed < 1)
|
|
||||||
{
|
|
||||||
echo "You are not allowed to download this list: $list_id\n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$stmt="select count(*) from vicidial_list where list_id='$list_id';";
|
|
||||||
$rslt=mysql_query($stmt, $link);
|
|
||||||
if ($DB) {echo "$stmt\n";}
|
|
||||||
$count_to_print = mysql_num_rows($rslt);
|
|
||||||
if ($count_to_print > 0)
|
|
||||||
{
|
|
||||||
$row=mysql_fetch_row($rslt);
|
|
||||||
$leads_count =$row[0];
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($leads_count < 1)
|
|
||||||
{
|
|
||||||
echo "There are no leads in list_id: $list_id\n";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$US='_';
|
$US='_';
|
||||||
$MT[0]='';
|
$MT[0]='';
|
||||||
@@ -156,16 +271,35 @@ if (!isset($group)) {$group = '';}
|
|||||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||||
if (!isset($end_date)) {$end_date = $NOW_DATE;}
|
if (!isset($end_date)) {$end_date = $NOW_DATE;}
|
||||||
|
|
||||||
### LOG INSERTION Admin Log Table ###
|
|
||||||
$SQL_log = "$stmt|$stmtA|";
|
|
||||||
$SQL_log = ereg_replace(';','',$SQL_log);
|
|
||||||
$SQL_log = addslashes($SQL_log);
|
|
||||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LEADS', event_type='EXPORT', record_id='$list_id', event_code='ADMIN EXPORT LIST', event_sql=\"$SQL_log\", event_notes='';";
|
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
|
||||||
$rslt=mysql_query($stmt, $link);
|
|
||||||
|
|
||||||
|
if ($download_type == 'systemdnc')
|
||||||
$TXTfilename = "LIST_$list_id$US$FILE_TIME.txt";
|
{
|
||||||
|
$TXTfilename = "SYSTEM_DNC_$FILE_TIME.txt";
|
||||||
|
$header_row = "phone_number";
|
||||||
|
$header_columns='';
|
||||||
|
$stmt="select phone_number from vicidial_dnc;";
|
||||||
|
}
|
||||||
|
elseif ($download_type == 'dnc')
|
||||||
|
{
|
||||||
|
$TXTfilename = "DNC_$group_id$US$FILE_TIME.txt";
|
||||||
|
$header_row = "phone_number";
|
||||||
|
$header_columns='';
|
||||||
|
$stmt="select phone_number from vicidial_campaign_dnc where campaign_id='$group_id';";
|
||||||
|
}
|
||||||
|
elseif ($download_type == 'fpgn')
|
||||||
|
{
|
||||||
|
$TXTfilename = "FPGN_$group_id$US$FILE_TIME.txt";
|
||||||
|
$header_row = "phone_number";
|
||||||
|
$header_columns='';
|
||||||
|
$stmt="select phone_number from vicidial_filter_phone_numbers where filter_phone_group_id='$group_id';";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$TXTfilename = "LIST_$list_id$US$FILE_TIME.txt";
|
||||||
|
$header_row = "lead_id\tentry_date\tmodify_date\tstatus\tuser\tvendor_lead_code\tsource_id\tlist_id\tgmt_offset_now\tcalled_since_last_reset\tphone_code\tphone_number\ttitle\tfirst_name\tmiddle_initial\tlast_name\taddress1\taddress2\taddress3\tcity\tstate\tprovince\tpostal_code\tcountry_code\tgender\tdate_of_birth\talt_phone\temail\tsecurity_phrase\tcomments\tcalled_count\tlast_local_call_time\trank\towner";
|
||||||
|
$header_columns='';
|
||||||
|
$stmt="select lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner from vicidial_list where list_id='$list_id';";
|
||||||
|
}
|
||||||
|
|
||||||
// We'll be outputting a TXT file
|
// We'll be outputting a TXT file
|
||||||
header('Content-type: application/octet-stream');
|
header('Content-type: application/octet-stream');
|
||||||
@@ -178,10 +312,8 @@ header('Pragma: public');
|
|||||||
ob_clean();
|
ob_clean();
|
||||||
flush();
|
flush();
|
||||||
|
|
||||||
$header_row = "lead_id\tentry_date\tmodify_date\tstatus\tuser\tvendor_lead_code\tsource_id\tlist_id\tgmt_offset_now\tcalled_since_last_reset\tphone_code\tphone_number\ttitle\tfirst_name\tmiddle_initial\tlast_name\taddress1\taddress2\taddress3\tcity\tstate\tprovince\tpostal_code\tcountry_code\tgender\tdate_of_birth\talt_phone\temail\tsecurity_phrase\tcomments\tcalled_count\tlast_local_call_time\trank\towner";
|
|
||||||
$header_columns='';
|
|
||||||
|
|
||||||
$stmt="select lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner from vicidial_list where list_id='$list_id';";
|
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmt, $link);
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$leads_to_print = mysql_num_rows($rslt);
|
$leads_to_print = mysql_num_rows($rslt);
|
||||||
@@ -190,16 +322,22 @@ while ($i < $leads_to_print)
|
|||||||
{
|
{
|
||||||
$row=mysql_fetch_row($rslt);
|
$row=mysql_fetch_row($rslt);
|
||||||
|
|
||||||
$row[29] = preg_replace("/\n|\r/",'!N',$row[29]);
|
if ( ($download_type == 'systemdnc') or ($download_type == 'dnc') or ($download_type == 'fpgn') )
|
||||||
|
{
|
||||||
$row_data[$i] .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]";
|
$row_data[$i] .= "$row[0]";
|
||||||
$export_lead_id[$i] = $row[0];
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$row[29] = preg_replace("/\n|\r/",'!N',$row[29]);
|
||||||
|
|
||||||
|
$row_data[$i] .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]";
|
||||||
|
$export_lead_id[$i] = $row[0];
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($custom_fields_enabled > 0)
|
if ( ($custom_fields_enabled > 0) and ($event_code_type=='LIST') )
|
||||||
{
|
{
|
||||||
$stmt="SHOW TABLES LIKE \"custom_$list_id\";";
|
$stmt="SHOW TABLES LIKE \"custom_$list_id\";";
|
||||||
if ($DB>0) {echo "$stmt";}
|
if ($DB>0) {echo "$stmt";}
|
||||||
@@ -207,9 +345,9 @@ if ($custom_fields_enabled > 0)
|
|||||||
$tablecount_to_print = mysql_num_rows($rslt);
|
$tablecount_to_print = mysql_num_rows($rslt);
|
||||||
if ($tablecount_to_print > 0)
|
if ($tablecount_to_print > 0)
|
||||||
{
|
{
|
||||||
$stmt = "describe custom_$list_id;";
|
$stmtA = "describe custom_$list_id;";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmtA, $link);
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmtA\n";}
|
||||||
$columns_ct = mysql_num_rows($rslt);
|
$columns_ct = mysql_num_rows($rslt);
|
||||||
$u=0;
|
$u=0;
|
||||||
while ($columns_ct > $u)
|
while ($columns_ct > $u)
|
||||||
@@ -225,9 +363,9 @@ if ($custom_fields_enabled > 0)
|
|||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $leads_to_print)
|
while ($i < $leads_to_print)
|
||||||
{
|
{
|
||||||
$stmt = "SELECT * from custom_$list_id where lead_id='$export_lead_id[$i]' limit 1;";
|
$stmtA = "SELECT * from custom_$list_id where lead_id='$export_lead_id[$i]' limit 1;";
|
||||||
$rslt=mysql_query($stmt, $link);
|
$rslt=mysql_query($stmtA, $link);
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmtA\n";}
|
||||||
$customfield_ct = mysql_num_rows($rslt);
|
$customfield_ct = mysql_num_rows($rslt);
|
||||||
if ($customfield_ct > 0)
|
if ($customfield_ct > 0)
|
||||||
{
|
{
|
||||||
@@ -250,6 +388,15 @@ if ($custom_fields_enabled > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$SQL_log = "$stmt|$stmtA|";
|
||||||
|
$SQL_log = ereg_replace(';','',$SQL_log);
|
||||||
|
$SQL_log = addslashes($SQL_log);
|
||||||
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LEADS', event_type='EXPORT', record_id='$list_id', event_code='ADMIN EXPORT $event_code_type', event_sql=\"$SQL_log\", event_notes='';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_query($stmt, $link);
|
||||||
|
|
||||||
|
|
||||||
echo "$header_row$header_columns\r\n";
|
echo "$header_row$header_columns\r\n";
|
||||||
|
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|||||||
Reference in New Issue
Block a user