diff --git a/UPGRADE b/UPGRADE index 4411786d..81ef0449 100644 --- a/UPGRADE +++ b/UPGRADE @@ -201,7 +201,7 @@ OTHER CHANGES: cpan> install Spreadsheet::XLSX cpan> install Spreadsheet::Read To get to the new lead loader, click to: - Lists -> Load New Leads -> 3rd Gen Lead Loader + Lists -> Load New Leads Here is a list of the file formats(by file extension) that are now supported by the third generation web lead loader: TXT - tab or pipe delimited @@ -229,6 +229,10 @@ OTHER CHANGES: Also, second and third options were added for both allow the offering of a press 1, 2 and 3 option in the wait/hold time option features. +50. Added timer action methods HANGUP, EXTENSION, CALLMENU and IN_GROUP. These + allow you to hangup or transfer the call at a set number of seconds + from start time or triggered from an outside process. + diff --git a/agi/agi-VDAD_ALL_outbound.agi b/agi/agi-VDAD_ALL_outbound.agi index 32c90540..ce486870 100644 --- a/agi/agi-VDAD_ALL_outbound.agi +++ b/agi/agi-VDAD_ALL_outbound.agi @@ -76,6 +76,7 @@ # 100414-2156 - Added extension_appended_cidname option # 100424-1341 - Added extended logging # 100623-1310 - Added queue_priority to queue processing +# 100727-1653 - Fixes for queue priority feature # $script = 'agi-VDAD_ALL_outbound.agi'; @@ -1394,30 +1395,16 @@ while ($drop_timer <= $DROP_TIME) { if ($agent_search_method =~ /^SO/) {$agent_search_method = 'LO';} - $rec_countWAIT=0; - $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$CIDlead_id' and ( ( (campaign_id = '$VDADcampaign') and (call_time < \"$VDADcall_time\") ) or ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) ) );"; - if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $dbhP=$dbhA; $mysql_count='01033'; $MEL_aff_rows=$sthArows; &mysql_error_logging; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $rec_countWAIT = $aryA[0]; - $rec_count++; - } - $sthA->finish(); + if ($DBconcurrent_transfers =~ /AUTO/) { $active_agents=1; - $stmtA = "SELECT count(*) FROM vicidial_live_agents where server_ip='$VARserver_ip' and campaign_id = '$VDADcampaign' and last_update_time > '$BDtsSQLdate';"; + $stmtA = "SELECT count(*) FROM vicidial_live_agents where campaign_id = '$VDADcampaign' and server_ip='$VARserver_ip' and last_update_time > '$BDtsSQLdate';"; if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; - $dbhP=$dbhA; $mysql_count='01034'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + $dbhP=$dbhA; $mysql_count='01041'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $rec_count=0; while ($sthArows > $rec_count) { @@ -1433,6 +1420,122 @@ while ($drop_timer <= $DROP_TIME) } else {$concurrent_transfers = $DBconcurrent_transfers;} $sthA->finish(); + + $cbc=0; + $rec_countWAITOUT=0; + $rec_countWAITIN=0; + $rec_countWAITINallowed=0; + $agentdirect_count=0; + $READY_agent_closer_camps=''; + $READY_users=''; + $READY_users_count=0; + $AGENTDIRECT_user_ids=''; + ### find number of outbound calls waiting in line in front of this call + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and lead_id != '$CIDlead_id' and campaign_id = '$VDADcampaign' and call_time < \"$VDADcall_time\";"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $rec_countWAITOUT = $aryA[0]; + } + $sthA->finish(); + + if (length($closer_campaigns) > 3) + { + ### find number of inbound calls waiting in line in front of this call + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) );"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01070'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $rec_countWAITIN = $aryA[0]; + $rec_countWAITINallowed = $aryA[0]; + } + $sthA->finish(); + } + + ### if there are inbound calls waiting, see if any READY agents are able to take them + if ($rec_countWAITIN > 0) + { + ### get a list of the in-groups that the READY agents are able to take calls from + $stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and server_ip='$VARserver_ip' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01071'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + $READY_users_count=0; + while ($sthArows > $READY_users_count) + { + @aryA = $sthA->fetchrow_array; + $READY_users .= "'$aryA[1]',"; + @VLagent_camps = split(/ /,$aryA[0]); + $ki=0; + foreach(@VLagent_camps) + { + if ( ($VLagent_camps[$ki] !~ /AGENTDIRECT/) && (length($VLagent_camps[$ki]) > 1) && ($READY_agent_closer_camps !~ /'$VLagent_camps[$ki]'/) ) + {$READY_agent_closer_camps .= "'$VLagent_camps[$ki]',";} + $ki++; + } + $READY_users_count++; + } + $sthA->finish(); + $READY_agent_closer_camps =~ s/.$//gi; + $READY_users =~ s/.$//gi; + + if (length($READY_users)>2) + { + if ($closer_campaigns =~ /AGENTDIRECT/) + { + ### get a list of the users that have AGENTDIRECT calls waiting for them + $stmtA = "SELECT agent_only FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and campaign_id LIKE \"%AGENTDIRECT%\" and last_update_time > '$BDtsSQLdate' and agent_only IN($READY_users) and agent_only != '';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01072'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + $agentdirect_count=0; + while ($sthArows > $agentdirect_count) + { + @aryA = $sthA->fetchrow_array; + $AGENTDIRECT_user_ids .= "'$aryA[0]',"; + $agentdirect_count++; + } + $sthA->finish(); + $AGENTDIRECT_user_ids =~ s/.$//gi; + if (length($AGENTDIRECT_user_ids)>2) + {$AGENTDIRECT_user_ids = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only IN($AGENTDIRECT_user_ids)) )";} + else + {$AGENTDIRECT_user_ids='';} + } + + ### find number of inbound calls from in-groups that READY agents are able to take calls from are waiting in line in front of this call + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and server_ip='$VARserver_ip' and ( ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($READY_agent_closer_camps)) ) $AGENTDIRECT_user_ids );"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01073'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $rec_countWAITIN = $aryA[0]; + } + $sthA->finish(); + } + } + + # if ($AGILOG) {$agi_string = "COUNT DEBUG: |$concurrent_transfers|$rec_countWAITOUT|$rec_countWAITIN|$rec_countWAITINallowed|$agentdirect_count|$READY_users_count|$closer_campaigns|$READY_agent_closer_camps|$READY_users|$AGENTDIRECT_user_ids|"; &agi_output;} + + $rec_countWAIT = ($rec_countWAITOUT + $rec_countWAITIN); if ($rec_countWAIT < $concurrent_transfers) { $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and server_ip='$VARserver_ip' and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; @@ -1668,22 +1771,6 @@ while ($drop_timer <= $DROP_TIME) { ################################################################################################### ##### Attempt to send call to an agent on any server ##### - $cbc=0; - $rec_countWAITrem=0; - $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$CIDlead_id' and ( ( (campaign_id = '$VDADcampaign') and (call_time < \"$VDADcall_time\") ) or ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) ) );"; - if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; - $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; - $sthArows=$sthA->rows; - $dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging; - $rec_count=0; - while ($sthArows > $rec_count) - { - @aryA = $sthA->fetchrow_array; - $rec_countWAITrem = $aryA[0]; - $rec_count++; - } - $sthA->finish(); if ($DBconcurrent_transfers =~ /AUTO/) { $active_agents=1; @@ -1708,6 +1795,122 @@ while ($drop_timer <= $DROP_TIME) } else {$concurrent_transfers = $DBconcurrent_transfers;} $sthA->finish(); + + $cbc=0; + $rec_countWAITremOUT=0; + $rec_countWAITremIN=0; + $rec_countWAITremINallowed=0; + $agentdirect_count=0; + $READY_agent_closer_camps=''; + $READY_users=''; + $READY_users_count=0; + $AGENTDIRECT_user_ids=''; + ### find number of outbound calls waiting in line in front of this call + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and lead_id != '$CIDlead_id' and campaign_id = '$VDADcampaign' and call_time < \"$VDADcall_time\";"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01040'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $rec_countWAITremOUT = $aryA[0]; + } + $sthA->finish(); + + if (length($closer_campaigns) > 3) + { + ### find number of inbound calls waiting in line in front of this call + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($closer_campaigns)) );"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01074'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $rec_countWAITremIN = $aryA[0]; + $rec_countWAITremINallowed = $aryA[0]; + } + $sthA->finish(); + } + + ### if there are inbound calls waiting, see if any READY agents are able to take them + if ($rec_countWAITremIN > 0) + { + ### get a list of the in-groups that the READY agents are able to take calls from + $stmtA = "SELECT closer_campaigns,user FROM vicidial_live_agents where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01075'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + $READY_users_count=0; + while ($sthArows > $READY_users_count) + { + @aryA = $sthA->fetchrow_array; + $READY_users .= "'$aryA[1]',"; + @VLagent_camps = split(/ /,$aryA[0]); + $ki=0; + foreach(@VLagent_camps) + { + if ( ($VLagent_camps[$ki] !~ /AGENTDIRECT/) && (length($VLagent_camps[$ki]) > 1) && ($READY_agent_closer_camps !~ /'$VLagent_camps[$ki]'/) ) + {$READY_agent_closer_camps .= "'$VLagent_camps[$ki]',";} + $ki++; + } + $READY_users_count++; + } + $sthA->finish(); + $READY_agent_closer_camps =~ s/.$//gi; + $READY_users =~ s/.$//gi; + + if (length($READY_users)>2) + { + if ($closer_campaigns =~ /AGENTDIRECT/) + { + ### get a list of the users that have AGENTDIRECT calls waiting for them + $stmtA = "SELECT agent_only FROM vicidial_auto_calls where status = 'LIVE' and campaign_id LIKE \"%AGENTDIRECT%\" and last_update_time > '$BDtsSQLdate' and agent_only IN($READY_users) and agent_only != '';"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01076'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + $agentdirect_count=0; + while ($sthArows > $agentdirect_count) + { + @aryA = $sthA->fetchrow_array; + $AGENTDIRECT_user_ids .= "'$aryA[0]',"; + $agentdirect_count++; + } + $sthA->finish(); + $AGENTDIRECT_user_ids =~ s/.$//gi; + if (length($AGENTDIRECT_user_ids)>2) + {$AGENTDIRECT_user_ids = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only IN($AGENTDIRECT_user_ids)) )";} + else + {$AGENTDIRECT_user_ids='';} + } + + ### find number of inbound calls from in-groups that READY agents are able to take calls from are waiting in line in front of this call + $stmtA = "SELECT count(*) FROM vicidial_auto_calls where status = 'LIVE' and ( ( (queue_priority > '$VDADqueue_priority') and (call_type='IN') and (campaign_id IN($READY_agent_closer_camps)) ) $AGENTDIRECT_user_ids );"; + if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $dbhP=$dbhA; $mysql_count='01077'; $MEL_aff_rows=$sthArows; &mysql_error_logging; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $rec_countWAITremIN = $aryA[0]; + } + $sthA->finish(); + } + } + + # if ($AGILOG) {$agi_string = "COUNT DEBUG: |$concurrent_transfers|$rec_countWAITremOUT|$rec_countWAITremIN|$rec_countWAITremINallowed|$agentdirect_count|$READY_users_count|$closer_campaigns|$READY_agent_closer_camps|$READY_users|$AGENTDIRECT_user_ids|"; &agi_output;} + + $rec_countWAITrem = ($rec_countWAITremOUT + $rec_countWAITremIN); if ($rec_countWAITrem < $concurrent_transfers) { $stmtA = "UPDATE vicidial_live_agents set status='QUEUE',lead_id='$CIDlead_id',uniqueid='$unique_id', channel='$channel', call_server_ip='$VARserver_ip', callerid='$callerid',comments='AUTO' where status = 'READY' and lead_id<1 and campaign_id='$VDADcampaign' and last_update_time > '$BDtsSQLdate' $agent_call_order limit 1;"; @@ -1951,7 +2154,7 @@ while ($drop_timer <= $DROP_TIME) } else { - if ($AGILOG) {$agi_string = "WWWWWWWW VDAD XFER BALANCE WAIT: |$rec_countWAIT|$VDADcampaign|$channel|$callerid|$uniqueid|"; &agi_output;} + if ($AGILOG) {$agi_string = "WWWWWWWW VDAD XFER BALANCE WAIT: |$rec_countWAITrem|$VDADcampaign|$channel|$callerid|$uniqueid|"; &agi_output;} } } ############################################################################ diff --git a/docs/NON-AGENT_API.txt b/docs/NON-AGENT_API.txt index e7f4a02b..0cb70efa 100644 --- a/docs/NON-AGENT_API.txt +++ b/docs/NON-AGENT_API.txt @@ -40,6 +40,7 @@ Changes: 100704-1148 - Added custom fields inserts to the add_lead function 100718-0245 - Added update_lead function to update existing leads 100723-1333 - Added no_update option to the update_lead function +100728-1952 - Added delete_lead option to the update_lead function @@ -335,6 +336,7 @@ custom_fields - Y or N, default is N. Defines whether the API will accept custo For example, if the field_label is "favorite_color" you would add "&favorite_color=blue" no_update - Y or N, Setting this to Y will not perform any updates, but will instead only tell you if a lead exists that matches the search criteria, default is N. +delete_lead - Y or N, Setting this to Y will delete the lead from the vicidial_list table, default is N. EDITABLE FIELDS- user_field - 1-20 characters, this updates the 'user' field in the vicidial_list table @@ -384,6 +386,8 @@ http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&functio http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_lead&lead_id=27&no_update=Y +http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=update_lead&lead_id=27&delete_lead=Y + Example responses: SUCCESS: update_lead LEAD HAS BEEN UPDATED - 6666|193716 NOTICE: update_lead CUSTOM FIELDS VALUES UPDATED - 7275551111|1234|101 @@ -394,6 +398,8 @@ NOTICE: update_lead CUSTOM FIELDS NOT UPDATED, NO FIELDS DEFINED - 7275551111|12 NOTICE: update_lead NO MATCHES FOUND IN THE SYSTEM - 6666|4567|897654327|7275551212 SUCCESS: update_lead LEAD HAS BEEN ADDED - 7275551111|6666|999|193716|-4 +SUCCESS: update_lead LEAD HAS BEEN DELETED - 7275551111|6666|999|193716|-4 + NOTICE: update_lead LEADS FOUND IN THE SYSTEM - 6666|4567|897654327|7275551212 ERROR: update_lead INVALID DATA FOR LEAD INSERTION - 6666||| diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 0bd83e0b..4c6e37e8 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -377,6 +377,7 @@ ra_extension VARCHAR(100) default '', external_dtmf VARCHAR(100) default '', external_transferconf VARCHAR(100) default '', external_park VARCHAR(40) default '', +external_timer_action_destination VARCHAR(100) default '', index (random_id), index (last_call_time), index (last_update_time), @@ -734,7 +735,7 @@ agent_select_territories ENUM('Y','N') default 'N', campaign_calldate DATETIME, crm_popup_login ENUM('Y','N') default 'N', crm_login_address TEXT, -timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE', +timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE', timer_action_message VARCHAR(255) default '', timer_action_seconds MEDIUMINT(7) default '-1', start_call_url TEXT, @@ -751,7 +752,8 @@ manual_dial_override ENUM('NONE','ALLOW_ALL','DISABLE_ALL') default 'NONE', blind_monitor_warning ENUM('DISABLED','ALERT','NOTICE','AUDIO','ALERT_NOTICE','ALERT_AUDIO','NOTICE_AUDIO','ALL') default 'DISABLED', blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your session', blind_monitor_filename VARCHAR(100) default '', -inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED' +inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED', +timer_action_destination VARCHAR(30) default '' ); CREATE TABLE vicidial_lists ( @@ -893,7 +895,7 @@ no_agent_no_queue ENUM('N','Y','NO_PAUSED') default 'N', no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE', no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye', web_form_address_two TEXT, -timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE', +timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE', timer_action_message VARCHAR(255) default '', timer_action_seconds MEDIUMINT(7) default '-1', start_call_url TEXT, @@ -927,7 +929,8 @@ wait_time_option_callback_filename VARCHAR(255) default 'vm-hangup', wait_time_option_callback_list_id BIGINT(14) UNSIGNED default '999', wait_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1', wait_time_option_no_block ENUM('N','Y') default 'N', -wait_time_option_prompt_seconds SMALLINT(5) default '10' +wait_time_option_prompt_seconds SMALLINT(5) default '10', +timer_action_destination VARCHAR(30) default '' ); CREATE TABLE vicidial_stations ( @@ -2292,7 +2295,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log; -UPDATE system_settings SET db_schema_version='1236',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1237',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql index eea2501e..ff938da9 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -437,3 +437,13 @@ UPDATE system_settings SET db_schema_version='1235',db_schema_update_date=NOW(); ALTER TABLE vicidial_campaigns MODIFY quick_transfer_button VARCHAR(20) default 'N'; UPDATE system_settings SET db_schema_version='1236',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_campaigns MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE'; +ALTER TABLE vicidial_campaigns ADD timer_action_destination VARCHAR(30) default ''; + +ALTER TABLE vicidial_inbound_groups MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY','HANGUP','CALLMENU','EXTENSION','IN_GROUP') default 'NONE'; +ALTER TABLE vicidial_inbound_groups ADD timer_action_destination VARCHAR(30) default ''; + +ALTER TABLE vicidial_live_agents ADD external_timer_action_destination VARCHAR(100) default ''; + +UPDATE system_settings SET db_schema_version='1237',db_schema_update_date=NOW(); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index f48908c4..9e3b6539 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -287,6 +287,11 @@ If Wait Time Option is set to PRESS_CID_CALLBACK, this is the List ID the call i Wait Hold Option Priority|| If both Estimated Hold Time options and Wait Time options are active, this setting will define whether one, the other or both of these features are active. For example, if the Estimated Hold Time Option is set to 360, the Wait Time option is set to 120 and the customer has been waiting for 120 seconds and there are still 400 seconds estimated hold time, then they are both active at the same time and this setting will be checked to see what options will be offered. Default is WAIT only|| The LOCKED options are used to lock the value to the Quick Transfer Button even if the agent uses the transfer conference features during a cacll before using the Quick Transfer Button|| +HANGUP will hang up the call when the timer is triggered, CALLMENU will send the call to the Call Menu specified in the Timer Action Destination field, EXTENSION will send the call to the Extension that is specified in the Timer Action Destination field, IN_GROUP will send the call to the In-Group specified in the Timer Action Destination field|| +Timer Action Destination|| +This field is where you specify the Call Menu, Extension or In-Group that you want the cacll sent to if the Time Action is set to CALLMENU, EXTENSION or IN_GROUP. Default is empty|| +You must enter field options when adding a|| +You must enter field options when updating a|| AST_VICIDIAL_ingrouplist.php diff --git a/www/agc/conf_exten_check.php b/www/agc/conf_exten_check.php index 811253af..19319e66 100644 --- a/www/agc/conf_exten_check.php +++ b/www/agc/conf_exten_check.php @@ -51,10 +51,11 @@ # 91228-1341 - Added API fields update functions # 100109-1337 - Fixed Manual dial live call detection # 100527-0957 - Added send_dtmf, transfer_conference and park_call API functions +# 100727-2209 - Added timer actions for hangup, extension, callmenu and ingroup as well as destination # -$version = '2.4-26'; -$build = '100527-0957'; +$version = '2.4-27'; +$build = '100727-2209'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=32; $one_mysql_log=0; @@ -388,7 +389,7 @@ echo " } ### grab the API hangup and API dispo fields in vicidial_live_agents - $stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds,external_dtmf,external_transferconf,external_park from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; + $stmt="SELECT external_hangup,external_status,external_pause,external_dial,external_update_fields,external_update_fields_data,external_timer_action,external_timer_action_message,external_timer_action_seconds,external_dtmf,external_transferconf,external_park,external_timer_action_destination from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03010',$user,$server_ip,$session_name,$one_mysql_log);} @@ -405,6 +406,7 @@ echo " $external_dtmf = $row[9]; $external_transferconf = $row[10]; $external_park = $row[11]; + $timer_action_destination = $row[12]; if (strlen($external_status)<1) {$external_status = '::::::::::';} @@ -574,7 +576,7 @@ echo " if ($Ashift_logout > 0) {$Alogin='SHIFT_LOGOUT';} - echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . "\n"; + echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . '|APIHanguP: ' . $external_hangup . '|APIStatuS: ' . $external_status . '|APIPausE: ' . $external_pause . '|APIDiaL: ' . $external_dial . '|DEADcall: ' . $DEADcustomer . '|InGroupChange: ' . $InGroupChangeDetails . '|APIFields: ' . $external_update_fields . '|APIFieldsData: ' . $external_update_fields_data . '|APITimerAction: ' . $timer_action . '|APITimerMessage: ' . $timer_action_message . '|APITimerSeconds: ' . $timer_action_seconds . '|APIdtmf: ' . $external_dtmf . '|APItransferconf: ' . $external_transferconf . '|APIpark: ' . $external_park . '|APITimerDestination: ' . $timer_action_destination . "\n"; if (strlen($timer_action) > 3) { diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 6ffaae6b..f149cf7c 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -4169,7 +4169,7 @@ if ($ACTION == 'VDADcheckINCOMING') $script_recording_delay = $row[0]; } - $stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action,timer_action_message,timer_action_seconds,timer_action_destination from vicidial_campaigns where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00114',$user,$server_ip,$session_name,$one_mysql_log);} @@ -4190,10 +4190,10 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_c_number = $row[9]; $VDCL_xferconf_d_number = $row[10]; $VDCL_xferconf_e_number = $row[11]; - $VDCL_timer_action = $row[11]; - $VDCL_timer_action_message = $row[11]; - $VDCL_timer_action_seconds = $row[11]; - + $VDCL_timer_action = $row[12]; + $VDCL_timer_action_message = $row[13]; + $VDCL_timer_action_seconds = $row[14]; + $VDCL_timer_action_destination = $row[15]; } ### Check for List ID override settings @@ -4220,7 +4220,7 @@ if ($ACTION == 'VDADcheckINCOMING') } } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number||||\n|\n"; + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number||||$VDCL_timer_action_destination|\n|\n"; if (ereg('X',$dialed_label)) { @@ -4281,7 +4281,7 @@ if ($ACTION == 'VDADcheckINCOMING') $script_recording_delay = $row[0]; } - $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix from vicidial_inbound_groups where group_id='$VDADchannel_group';"; + $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix,timer_action_destination from vicidial_inbound_groups where group_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);} @@ -4314,8 +4314,9 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_e_number = $row[22]; $VDCL_uniqueid_status_display = $row[23]; $VDCL_uniqueid_status_prefix = $row[24]; + $VDCL_timer_action_destination = $row[25]; - $stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action_destination from vicidial_campaigns where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);} @@ -4349,6 +4350,8 @@ if ($ACTION == 'VDADcheckINCOMING') {$VDCL_xferconf_d_number = $row[12];} if (strlen($VDCL_xferconf_e_number) < 1) {$VDCL_xferconf_e_number = $row[13];} + if (strlen($VDCL_timer_action_destination) < 1) + {$VDCL_timer_action_destination = $row[14];} if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) ) { @@ -4403,7 +4406,7 @@ if ($ACTION == 'VDADcheckINCOMING') } else { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,timer_action_destination from vicidial_campaigns where campaign_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);} @@ -4426,6 +4429,7 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_xferconf_c_number = $row[12]; $VDCL_xferconf_d_number = $row[13]; $VDCL_xferconf_e_number = $row[14]; + $VDCL_timer_action_destination = $row[15]; } $script_recording_delay=0; @@ -4493,8 +4497,8 @@ if ($ACTION == 'VDADcheckINCOMING') } ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|\n";} - else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|\n";} + if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|\n";} + else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|\n";} $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; if ($DB) {echo "$stmt\n";} @@ -4772,10 +4776,24 @@ if ($ACTION == 'VDADcheckINCOMING') $durationLimit = preg_replace('/\D/','',$SCUresponse[1]); } if (strlen($durationLimit) < 1) {$durationLimit = 0;} + $durationLimitSECnext = ( ($minuteswarning + 0) * 60); $durationLimitSEC = ( ( ($durationLimit + 0) - $minuteswarning) * 60); # minutes - 3 for 3-minute-warning if ($durationLimitSEC < 5) {$durationLimitSEC = 5;} + if ( ($durationLimitSECnext < 30) or (strlen($durationLimitSECnext)<1) ) {$durationLimitSECnext = 30;} - $stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='$minuteswarning minute warning for customer',external_timer_action_seconds='$durationLimitSEC' where user='$user';"; + $timer_action_destination=''; + if (preg_match("/nextstep=/",$VDCL_start_call_url)) + { + $nextstepARY = explode('nextstep=',$VDCL_start_call_url); + $nextstep = preg_replace("/&.*/",'',$nextstepARY[1]); + $nextmessageARY = explode('nextmessage=',$VDCL_start_call_url); + $nextmessage = preg_replace("/&.*/",'',$nextmessageARY[1]); + $destinationARY = explode('destination=',$VDCL_start_call_url); + $destination = preg_replace("/&.*/",'',$destinationARY[1]); + $timer_action_destination = "nextstep---$nextstep--$durationLimitSECnext--$destination--$nextmessage--"; + } + + $stmt="UPDATE vicidial_live_agents set external_timer_action='D1_DIAL',external_timer_action_message='$minuteswarning minute warning for customer',external_timer_action_seconds='$durationLimitSEC',external_timer_action_destination='$timer_action_destination' where user='$user';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00295',$user,$server_ip,$session_name,$one_mysql_log);} @@ -6359,7 +6377,10 @@ if ( ($ACTION == 'VDADpause') || ($ACTION == 'VDADready') ) if ($comments != 'NO_STATUS_CHANGE') { - $stmt="UPDATE vicidial_live_agents set status='$stage' where user='$user' and server_ip='$server_ip';"; + $vla_lead_wipeSQL=''; + if ($ACTION == 'VDADready') + {$vla_lead_wipeSQL = ",lead_id=0";} + $stmt="UPDATE vicidial_live_agents set status='$stage' $vla_lead_wipeSQL where user='$user' and server_ip='$server_ip';"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00166',$user,$server_ip,$session_name,$one_mysql_log);} diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 6371ad05..c3110fe5 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -302,10 +302,11 @@ # 100702-1315 - Custom List Fields functionality enabled # 100712-1441 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any # 100723-1522 - Added LOCKED options for quick transfer button feature +# 100726-1233 - Added HANGUP, CALLMENU, EXTENSION, IN_GROUP timer actions # -$version = '2.4-280'; -$build = '100723-1522'; +$version = '2.4-281'; +$build = '100726-1233'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=66; $one_mysql_log=0; @@ -1246,7 +1247,7 @@ else $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1324,6 +1325,7 @@ else $blind_monitor_warning = $row[70]; $blind_monitor_message = $row[71]; $blind_monitor_filename = $row[72]; + $timer_action_destination = $row[73]; if ($manual_dial_override == 'ALLOW_ALL') {$agentcall_manual = 1;} @@ -2952,9 +2954,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var campaign_timer_action = ''; var campaign_timer_action_message = ''; var campaign_timer_action_seconds = ''; + var campaign_timer_action_destination = ''; var timer_action=''; var timer_action_message=''; var timer_action_seconds=''; + var timer_action_destination = ''; var is_webphone=''; var WebPhonEurl=''; var pause_code_counter=1; @@ -2992,6 +2996,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var api_transferconf_override=''; var api_parkcustomer=''; var API_selected_xfergroup=''; + var API_selected_callmenu='' var custom_fields_enabled=''; var form_contents_loaded=0; var DiaLControl_auto_HTML = "\"\"Resume\""; @@ -3677,6 +3682,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} api_timer_action_message = APITimerMessage_array[1]; var APITimerSeconds_array = check_time_array[19].split("APITimerSeconds: "); api_timer_action_seconds = APITimerSeconds_array[1]; + var APITimerDestination_array = check_time_array[23].split("APITimerDestination: "); + api_timer_action_destination = APITimerDestination_array[1]; var APIdtmf_array = check_time_array[20].split("APIdtmf: "); api_dtmf = APIdtmf_array[1]; var APItransfercond_array = check_time_array[21].split("APItransferconf: "); @@ -3757,6 +3764,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} timer_action = api_timer_action; timer_action_message = api_timer_action_message; timer_action_seconds = api_timer_action_seconds; + timer_action_destination = api_timer_action_destination; + // alert("TIMER_API:" + timer_action + '|' + timer_action_message + '|' + timer_action_seconds + '|' + timer_action_destination + '|'); } if ( (APIHanguP==1) && (VD_live_customer_call==1) ) { @@ -3864,8 +3873,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {VICIDiaL_closer_blended = '0';} } - -// ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ above section working on API functions var check_conf_array=check_ALL_array[1].split("|"); var live_conf_calls = check_conf_array[0]; var conf_chan_array = check_conf_array[1].split(" ~"); @@ -4266,21 +4273,28 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {blindxferdialstring = temp_dial_prefix + "" + temp_phone_code + "" + blindxferdialstring;} } } + if (API_selected_callmenu.length > 0) + { + var blindxferdialstring = 's'; + var blindxfercontext = document.vicidial_form.xfernumber.value; + } + else + {var blindxfercontext = ext_context;} no_delete_VDAC=0; if (taskvar == 'XfeRVMAIL') { var blindxferdialstring = campaign_am_message_exten + '*' + campaign + '*' + document.vicidial_form.phone_code.value + '*' + document.vicidial_form.phone_number.value + '*' + document.vicidial_form.lead_id.value; no_delete_VDAC=1; } - if (blindxferdialstring.length<'2') + if (blindxferdialstring.length<'1') { xferredirect_query=''; taskvar = 'NOTHING'; - alert("Transfer number must have more than 1 digit:" + blindxferdialstring); + alert("Transfer number must have at least 1 digit:" + blindxferdialstring); } else { - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id + "&nodeletevdac=" + no_delete_VDAC; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + blindxfercontext + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id + "&nodeletevdac=" + no_delete_VDAC; } } if (taskvar == 'XfeRINTERNAL') @@ -5762,6 +5776,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} timer_action = campaign_timer_action; timer_action_message = campaign_timer_action_message; timer_action_seconds = campaign_timer_action_seconds; + timer_action_destination = campaign_timer_action_destination; lead_dial_number = document.vicidial_form.phone_number.value; var dispnum = document.vicidial_form.phone_number.value; @@ -6100,10 +6115,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { load_script_contents(); - FormContentsLoad(); } } + if (custom_fields_enabled > 0) + { + FormContentsLoad(); + } if (get_call_launch == 'SCRIPT') { if (delayed_script_load == 'YES') @@ -6495,10 +6513,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { load_script_contents(); - FormContentsLoad(); } } + if (custom_fields_enabled > 0) + { + FormContentsLoad(); + } if (get_call_launch == 'SCRIPT') { if (delayed_script_load == 'YES') @@ -6888,14 +6909,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} timer_action = campaign_timer_action; timer_action_message = campaign_timer_action_message; timer_action_seconds = campaign_timer_action_seconds; + timer_action_destination = campaign_timer_action_destination; } else { var call_timer_action_message = VDIC_data_VDIG[19]; var call_timer_action_seconds = VDIC_data_VDIG[20]; + var call_timer_action_destination = VDIC_data_VDIG[27]; timer_action = call_timer_action; timer_action_message = call_timer_action_message; timer_action_seconds = call_timer_action_seconds; + timer_action_destination = call_timer_action_destination; } CalL_XC_c_NuMber = VDIC_data_VDIG[21]; @@ -7453,10 +7477,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} else { load_script_contents(); - FormContentsLoad(); } } + if (custom_fields_enabled > 0) + { + FormContentsLoad(); + } if (CalL_AutO_LauncH == 'SCRIPT') { if (delayed_script_load == 'YES') @@ -8562,6 +8589,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} uniqueid_status_prefix=''; custom_call_id=''; API_selected_xfergroup=''; + API_selected_callmenu=''; + timer_action=''; + timer_action_seconds=''; + timer_action_mesage=''; + timer_action_destination=''; if (manual_dial_in_progress==1) { @@ -8752,6 +8784,31 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber; basic_originate_call(CalL_XC_e_NuMber,'NO','YES',session_id,'YES','','1','0'); } + function hangup_timer_xfer() + { + hideDiv('CustomerGoneBox'); + WaitingForNextStep=0; + custchannellive=0; + + dialedcall_send_hangup(); + } + function extension_timer_xfer() + { + document.vicidial_form.xfernumber.value = timer_action_destination; + mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip); + } + function callmenu_timer_xfer() + { + API_selected_callmenu = timer_action_destination; + document.vicidial_form.xfernumber.value = timer_action_destination; + mainxfer_send_redirect('XfeRBLIND',lastcustchannel,lastcustserverip); + } + function ingroup_timer_xfer() + { + API_selected_xfergroup = timer_action_destination; + document.vicidial_form.xfernumber.value = timer_action_destination; + mainxfer_send_redirect('XfeRLOCAL',lastcustchannel,lastcustserverip); + } // ################################################################################ // Show message that customer has hungup the call before agent has @@ -10417,6 +10474,7 @@ else // Finish the wrapup timer early function TimerActionRun(taskaction,taskdialalert) { + var next_action=0; if (taskaction == 'DiaLAlerT') { document.getElementById("TimerContentSpan").innerHTML = "DIAL ALERT:

" + taskdialalert.replace("\n","
") + "
"; @@ -10462,8 +10520,43 @@ else { DtMf_PreSet_e_DiaL(); } + if ( (timer_action == 'HANGUP') && (VD_live_customer_call==1) ) + { + hangup_timer_xfer(); + } + if ( (timer_action == 'EXTENSION') && (VD_live_customer_call==1) && (timer_action_destination.length > 0) ) + { + extension_timer_xfer(); + } + if ( (timer_action == 'CALLMENU') && (VD_live_customer_call==1) && (timer_action_destination.length > 0) ) + { + callmenu_timer_xfer(); + } + if ( (timer_action == 'IN_GROUP') && (VD_live_customer_call==1) && (timer_action_destination.length > 0) ) + { + ingroup_timer_xfer(); + } + if (timer_action_destination.length > 0) + { + var regNS = new RegExp("nextstep---","ig"); + if (timer_action_destination.match(regNS)) + { + next_action=1; + timer_action = 'NONE'; + var next_action_array=timer_action_destination.split("nextstep---"); + var next_action_details_array=next_action_array[1].split("--"); + timer_action = next_action_details_array[0]; + timer_action_seconds = parseInt(next_action_details_array[1]); + timer_action_seconds = (timer_action_seconds + VD_live_call_secondS); + timer_action_destination = next_action_details_array[2]; + timer_action_message = next_action_details_array[3]; + // alert("NEXT: " + timer_action + '|' + timer_action_message + '|' + timer_action_seconds + '|' + timer_action_destination + '|'); + } + } } - timer_action = 'NONE'; + + if (next_action < 1) + {timer_action = 'NONE';} } diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 888ec475..a6f3f289 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1365,6 +1365,8 @@ if (isset($_GET["wait_time_option_no_block"])) {$wait_time_option_no_block=$_G elseif (isset($_POST["wait_time_option_no_block"])) {$wait_time_option_no_block=$_POST["wait_time_option_no_block"];} if (isset($_GET["wait_time_option_prompt_seconds"])) {$wait_time_option_prompt_seconds=$_GET["wait_time_option_prompt_seconds"];} elseif (isset($_POST["wait_time_option_prompt_seconds"])) {$wait_time_option_prompt_seconds=$_POST["wait_time_option_prompt_seconds"];} +if (isset($_GET["timer_action_destination"])) {$timer_action_destination=$_GET["timer_action_destination"];} + elseif (isset($_POST["timer_action_destination"])) {$timer_action_destination=$_POST["timer_action_destination"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -1890,9 +1892,6 @@ if ($non_latin < 1) $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_third_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_third_option); - $wait_time_third_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_third_option); - ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); $menu_timeout_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_timeout_prompt); @@ -2034,6 +2033,7 @@ if ($non_latin < 1) ### ALPHA-NUMERIC and underscore and dash and slash and at and dot and pound and star $extension = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$extension); + $timer_action_destination = ereg_replace("[^-\*\#\.\:\/\@\_0-9a-zA-Z]","",$timer_action_destination); ### NUMERIC and comma and pipe $waitforsilence_options = ereg_replace("[^\|\,0-9]","",$waitforsilence_options); @@ -2383,11 +2383,12 @@ else # 100718-2318 - Added Wait Time options to in-groups # 100720-1332 - Small changes to Phone addition and modification pages # 100723-1519 - Added LOCKED options for Quick Transfer Button in campaigns +# 100726-1017 - Added HANGUP, CALLMENU, EXTENSION and IN_GROUP timer actions to campaigns and in-groups # # 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-265'; -$build = '100723-1519'; +$admin_version = '2.4-266'; +$build = '100726-1017'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -4203,7 +4204,7 @@ if ($ADD==99999)

- Timer Action - This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. + Timer Action - This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. HANGUP will hang up the call when the timer is triggered, CALLMENU will send the call to the Call Menu specified in the Timer Action Destination field, EXTENSION will send the call to the Extension that is specified in the Timer Action Destination field, IN_GROUP will send the call to the In-Group specified in the Timer Action Destination field.
@@ -4215,6 +4216,11 @@ if ($ADD==99999)
Timer Action Seconds - This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive. +
+
+
+ Timer Action Destination - This field is where you specify the Call Menu, Extension or In-Group that you want the cacll sent to if the Time Action is set to CALLMENU, EXTENSION or IN_GROUP. Default is empty. +

@@ -4614,7 +4620,7 @@ if ($ADD==99999)

- Timer Action - This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. This setting will override the Campaign settings. + Timer Action - This feature allows you to trigger actions after a certain amount of time. the D1 and D2 DIAL options will launch a call to the Transfer Conference Number presets and send them to the agent session, this is usually used for simple IVR validation AGI applications or just to play a pre-recorded message. WEBFORM will open the web form address. MESSAGE_ONLY will simply display the message that is in the field below. NONE will disable this feature and is the default. This setting will override the Campaign settings. HANGUP will hang up the call when the timer is triggered, CALLMENU will send the call to the Call Menu specified in the Timer Action Destination field, EXTENSION will send the call to the Extension that is specified in the Timer Action Destination field, IN_GROUP will send the call to the In-Group specified in the Timer Action Destination field.
@@ -4626,6 +4632,11 @@ if ($ADD==99999)
Timer Action Seconds - This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive. +
+
+
+ Timer Action Destination - This field is where you specify the Call Menu, Extension or In-Group that you want the cacll sent to if the Time Action is set to CALLMENU, EXTENSION or IN_GROUP. Default is empty. +

@@ -9483,7 +9494,7 @@ if ($ADD==20) { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -9950,7 +9961,7 @@ if ($ADD==2011) } else { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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=\"$source_group_id\";"; + $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_query($stmt, $link); echo "
GROUP ADDED: $group_id\n"; @@ -12198,7 +12209,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -13062,7 +13073,7 @@ if ($ADD==4111) echo "
GROUP MODIFIED: $group_id\n"; - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds' where group_id='$group_id';"; + $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds',timer_action_destination='$timer_action_destination' where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -16995,7 +17006,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial from vicidial_campaigns where campaign_id='$campaign_id';"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -17146,6 +17157,7 @@ if ($ADD==31) $blind_monitor_message = $row[149]; $blind_monitor_filename = $row[150]; $inbound_queue_no_dial = $row[151]; + $timer_action_destination = $row[152]; if (ereg("DISABLED",$list_order_mix)) @@ -17806,12 +17818,14 @@ if ($ADD==31) echo "PrePopulate Transfer Preset: $NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE\n"; - echo "Timer Action: $NWB#vicidial_campaigns-timer_action$NWE\n"; + echo "Timer Action: $NWB#vicidial_campaigns-timer_action$NWE\n"; echo "Timer Action Message: $NWB#vicidial_campaigns-timer_action_message$NWE\n"; echo "Timer Action Seconds: $NWB#vicidial_campaigns-timer_action_seconds$NWE\n"; + echo "Timer Action Destination: $NWB#vicidial_campaigns-timer_action_destination$NWE\n"; + if ($SSoutbound_autodial_active > 0) { echo "Alt Number Dialing: $NWB#vicidial_campaigns-alt_number_dialing$NWE\n"; @@ -20386,7 +20400,7 @@ if ($ADD==3111) echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -24943,7 +24960,7 @@ if ($ADD==10000) echo "
\n"; echo ""; - $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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='$group_id';"; + $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -20484,6 +20498,7 @@ if ($ADD==3111) $wait_time_option_press_filename = $row[92]; $wait_time_option_no_block = $row[93]; $wait_time_option_prompt_seconds = $row[94]; + $timer_action_destination = $row[95]; ##### get callmenu listings for dynamic pulldown $stmt="SELECT menu_id,menu_name from vicidial_call_menu order by menu_id"; @@ -20647,12 +20662,14 @@ if ($ADD==3111) echo "
Transfer-Conf Number 5: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Timer Action: $NWB#vicidial_inbound_groups-timer_action$NWE
Timer Action: $NWB#vicidial_inbound_groups-timer_action$NWE
Timer Action Message: $NWB#vicidial_inbound_groups-timer_action_message$NWE
Timer Action Seconds: $NWB#vicidial_inbound_groups-timer_action_seconds$NWE
Timer Action Destination: $NWB#vicidial_inbound_groups-timer_action_destination$NWE
Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
Drop Action: $NWB#vicidial_inbound_groups-drop_action$NWE
"; echo ""; echo ""; + echo ""; echo ""; echo ""; echo "\n"; @@ -24972,6 +24990,7 @@ if ($ADD==10000) echo ""; echo ""; echo ""; + echo ""; echo "\n"; $o++; } diff --git a/www/vicidial/admin_header.php b/www/vicidial/admin_header.php index 7ac41b19..6df6826e 100644 --- a/www/vicidial/admin_header.php +++ b/www/vicidial/admin_header.php @@ -22,6 +22,7 @@ # 100428-1039 - Added custom fields display # 100507-1339 - Added copy carrier submenu # 100616-2350 - Added VIDPROMPT call menu options +# 100728-0904 - Changed Lead Loader link to the new 3rd gen lead loader # @@ -1036,7 +1037,7 @@ $SScustom_fields_enabled = $row[3]; >> - +
\n"; echo ""; - $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id from vicidial_remote_agents order by server_ip,campaign_id,user_start"; + $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,extension_group,status,campaign_id from vicidial_remote_agents order by server_ip,campaign_id,user_start"; $rslt=mysql_query($stmt, $link); $remoteagents_to_print = mysql_num_rows($rslt); @@ -24954,6 +24971,7 @@ if ($ADD==10000) echo "LINESSERVER   CONF-EXTEN   GROUP   STATUS   CAMPAIGN   MODIFY
$row[4] $row[5] $row[6] $row[7]MODIFY
  >
  - > Load New Leads + > Load New Leads 0) { diff --git a/www/vicidial/admin_listloader_third_gen.php b/www/vicidial/admin_listloader_third_gen.php index bd100291..a0445d10 100644 --- a/www/vicidial/admin_listloader_third_gen.php +++ b/www/vicidial/admin_listloader_third_gen.php @@ -39,10 +39,11 @@ # 100707-1040 - Converted List Id Override and Phone Code Override to drop downs # 100707-1156 - Made it so you cannot submit with no lead file selected. Also fixed Start Over Link # 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any +# 100728-0900 - Filtered uploaded filenames for unsupported characters # -$version = '2.4-38'; -$build = '100712-1416'; +$version = '2.4-39'; +$build = '100728-0900'; require("dbconnect.php"); @@ -443,7 +444,7 @@ if ( (!$OK_to_process) or ( ($leadfile) and ($file_layout!="standard") ) )
        
        BACK TO ADMINLIST LOADER 3rd Gen-     VERSION:     BUILD:    
        BACK TO ADMIN         Old Lead Loader     LIST LOADER 3rd Gen-     VERSION:     BUILD:    
99) ) {echo "ERROR: You must enter a field label, field name and field size - $list_id|$field_label|$field_name|$field_size\n
";} else { - if ($field_exists > 0) - {echo "ERROR: Field already exists for this list - $list_id|$field_label\n
";} + $TEST_valid_options=0; + if ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') ) + { + $TESTfield_options_array = explode("\n",$field_options); + $TESTfield_options_count = count($TESTfield_options_array); + $te=0; + while ($te < $TESTfield_options_count) + { + if (preg_match("/,/",$TESTfield_options_array[$te])) + { + $TESTfield_options_value_array = explode(",",$TESTfield_options_array[$te]); + if ( (strlen($TESTfield_options_value_array[0]) > 0) and (strlen($TESTfield_options_value_array[1]) > 0) ) + {$TEST_valid_options++;} + } + $te++; + } + $field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM); + } + + if ( ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') ) and ( (!preg_match("/,/",$field_options)) or (!preg_match("/\n/",$field_options)) or (strlen($field_options)<6) or ($TEST_valid_options < 1) ) ) + {echo "ERROR: You must enter field options when adding a SELECT, MULTI, RADIO or CHECKBOX field type - $list_id|$field_label|$field_type|$field_options\n
";} else { - $table_exists=0; - $linkCUSTOM=mysql_connect("$VARDB_server:$VARDB_port", "$VARDB_custom_user","$VARDB_custom_pass"); - if (!$linkCUSTOM) {die("Could not connect: $VARDB_server|$VARDB_port|$VARDB_database|$VARDB_custom_user|$VARDB_custom_pass" . mysql_error());} - mysql_select_db("$VARDB_database", $linkCUSTOM); + if ($field_exists > 0) + {echo "ERROR: Field already exists for this list - $list_id|$field_label\n
";} + else + { + $table_exists=0; + $linkCUSTOM=mysql_connect("$VARDB_server:$VARDB_port", "$VARDB_custom_user","$VARDB_custom_pass"); + if (!$linkCUSTOM) {die("Could not connect: $VARDB_server|$VARDB_port|$VARDB_database|$VARDB_custom_user|$VARDB_custom_pass" . mysql_error());} + mysql_select_db("$VARDB_database", $linkCUSTOM); - $stmt="SHOW TABLES LIKE \"custom_$list_id\";"; - $rslt=mysql_query($stmt, $link); - $tablecount_to_print = mysql_num_rows($rslt); - if ($tablecount_to_print > 0) - {$table_exists = 1;} - if ($DB>0) {echo "$stmt|$tablecount_to_print|$table_exists";} - - ### add field function - add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields); + $stmt="SHOW TABLES LIKE \"custom_$list_id\";"; + $rslt=mysql_query($stmt, $link); + $tablecount_to_print = mysql_num_rows($rslt); + if ($tablecount_to_print > 0) + {$table_exists = 1;} + if ($DB>0) {echo "$stmt|$tablecount_to_print|$table_exists";} + + ### add field function + add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields); - echo "SUCCESS: Custom Field Added - $list_id|$field_label\n
"; + echo "SUCCESS: Custom Field Added - $list_id|$field_label\n
"; + } } } @@ -796,10 +822,34 @@ if ( ($action == "MODIFY_CUSTOM_FIELD_SUBMIT") and ($list_id > 99) and ($field_i {echo "ERROR: Table does not exist\n
";} else { - ### modify field function - modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields); + $TEST_valid_options=0; + if ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') ) + { + $TESTfield_options_array = explode("\n",$field_options); + $TESTfield_options_count = count($TESTfield_options_array); + $te=0; + while ($te < $TESTfield_options_count) + { + if (preg_match("/,/",$TESTfield_options_array[$te])) + { + $TESTfield_options_value_array = explode(",",$TESTfield_options_array[$te]); + if ( (strlen($TESTfield_options_value_array[0]) > 0) and (strlen($TESTfield_options_value_array[1]) > 0) ) + {$TEST_valid_options++;} + } + $te++; + } + $field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM); + } - echo "SUCCESS: Custom Field Modified - $list_id|$field_label\n
"; + if ( ( ($field_type=='SELECT') or ($field_type=='MULTI') or ($field_type=='RADIO') or ($field_type=='CHECKBOX') ) and ( (!preg_match("/,/",$field_options)) or (!preg_match("/\n/",$field_options)) or (strlen($field_options)<6) or ($TEST_valid_options < 1) ) ) + {echo "ERROR: You must enter field options when updating a SELECT, MULTI, RADIO or CHECKBOX field type - $list_id|$field_label|$field_type|$field_options\n
";} + else + { + ### modify field function + modify_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field_id,$list_id,$field_label,$field_name,$field_description,$field_rank,$field_help,$field_type,$field_options,$field_size,$field_max,$field_default,$field_required,$field_cost,$multi_position,$name_position,$field_order,$vicidial_list_fields); + + echo "SUCCESS: Custom Field Modified - $list_id|$field_label\n
"; + } } } @@ -1466,10 +1516,12 @@ function add_field_function($DB,$link,$linkCUSTOM,$ip,$user,$table_exists,$field } $field_options_ENUM = preg_replace("/.$/",'',$field_options_ENUM); $field_cost = strlen($field_options_ENUM); + if ($field_cost < 1) {$field_cost=1;}; $field_sql .= "VARCHAR($field_cost) "; } if ($field_type=='TEXT') { + if ($field_max < 1) {$field_max=1;}; $field_sql .= "VARCHAR($field_max) "; $field_cost = ($field_max + $field_cost); } diff --git a/www/vicidial/non_agent_api.php b/www/vicidial/non_agent_api.php index a8c01fc9..9dad3a51 100644 --- a/www/vicidial/non_agent_api.php +++ b/www/vicidial/non_agent_api.php @@ -35,10 +35,11 @@ # 100712-1416 - Added entry_list_id field to vicidial_list to preserve link to custom fields if any # 100718-0245 - Added update_lead function to update existing leads # 100723-1333 - Added no_update option to the update_lead function +# 100728-1952 - Added delete_lead option to the update_lead function # -$version = '2.4-21'; -$build = '100723-1333'; +$version = '2.4-22'; +$build = '100728-1952'; require("dbconnect.php"); @@ -153,6 +154,9 @@ if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} if (isset($_GET["no_update"])) {$no_update=$_GET["no_update"];} elseif (isset($_POST["no_update"])) {$no_update=$_POST["no_update"];} +if (isset($_GET["delete_lead"])) {$delete_lead=$_GET["delete_lead"];} + elseif (isset($_POST["delete_lead"])) {$delete_lead=$_POST["delete_lead"];} + header ("Content-type: text/html; charset=utf-8"); header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 @@ -242,6 +246,7 @@ if ($non_latin < 1) $list_id_field = ereg_replace("[^0-9]","",$list_id_field); $lead_id = ereg_replace("[^0-9]","",$lead_id); $no_update = ereg_replace("[^A-Z]","",$no_update); + $delete_lead = ereg_replace("[^A-Z]","",$delete_lead); } else { @@ -1906,15 +1911,23 @@ if ($function == 'update_lead') { $VLaffected_rows=0; $CFaffected_rows=0; - if (strlen($VL_update_SQL)>6) + if ( (strlen($VL_update_SQL)>6) or ($delete_lead=='Y') ) { - $stmt = "UPDATE vicidial_list SET $VL_update_SQL where lead_id='$search_lead_id[$n]';"; + if ($delete_lead=='Y') + { + $stmt = "DELETE from vicidial_list where lead_id='$search_lead_id[$n]';"; + $result_reason = "update_lead LEAD HAS BEEN DELETED"; + } + else + { + $stmt = "UPDATE vicidial_list SET $VL_update_SQL where lead_id='$search_lead_id[$n]';"; + $result_reason = "update_lead LEAD HAS BEEN UPDATED"; + } if ($DB>0) {echo "DEBUG: update_lead query - $stmt\n";} $rslt=mysql_query($stmt, $link); $VLaffected_rows = mysql_affected_rows($link); $result = 'SUCCESS'; - $result_reason = "update_lead LEAD HAS BEEN UPDATED"; echo "$result: $result_reason - $user|$search_lead_id[$n]\n"; $data = "$phone_number|$list_id|$lead_id|$gmt_offset"; api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);