Added source_id as optional channel variable to populate when inserting new leads in inbound AGI script
git-svn-id: svn://192.168.202.10@2946 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -223,6 +223,7 @@
|
|||||||
# 180209-1716 - Big fix for recent feature
|
# 180209-1716 - Big fix for recent feature
|
||||||
# 180217-1018 - Added NO_READY option for no_agent_no_queue in-group feature, issue #1046
|
# 180217-1018 - Added NO_READY option for no_agent_no_queue in-group feature, issue #1046
|
||||||
# 180306-1450 - Fix for Wait/Hold time options when nothing is pressed
|
# 180306-1450 - Fix for Wait/Hold time options when nothing is pressed
|
||||||
|
# 180321-0824 - Added source_id as optional channel variable to populate when inserting new leads
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||||
@@ -1025,6 +1026,13 @@ if (length($postal_code) > 0)
|
|||||||
$INSERTpostal_codeSQLa=',postal_code';
|
$INSERTpostal_codeSQLa=',postal_code';
|
||||||
$INSERTpostal_codeSQLb=",'$postal_code'";
|
$INSERTpostal_codeSQLb=",'$postal_code'";
|
||||||
}
|
}
|
||||||
|
$source_id = $AGI->get_variable('source_id');
|
||||||
|
if (length($source_id) > 0)
|
||||||
|
{
|
||||||
|
$source_id =~ s/\'|\"|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{$source_id='VDCL';}
|
||||||
|
|
||||||
if ($populate_state_areacode =~ /NEW_LEAD_ONLY|OVERWRITE_ALWAYS/)
|
if ($populate_state_areacode =~ /NEW_LEAD_ONLY|OVERWRITE_ALWAYS/)
|
||||||
{
|
{
|
||||||
@@ -1111,7 +1119,7 @@ if ($call_handle_method =~ /LOOKUP/)
|
|||||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||||
{&lead_timezone_process;}
|
{&lead_timezone_process;}
|
||||||
### insert a record into the vicidial_list table
|
### insert a record into the vicidial_list table
|
||||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$list_id','Y','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$list_id','Y','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='02007'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='02007'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
$cbc=0;
|
$cbc=0;
|
||||||
@@ -1268,7 +1276,7 @@ if ($call_handle_method =~ /LOOKUP/)
|
|||||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||||
{&lead_timezone_process;}
|
{&lead_timezone_process;}
|
||||||
### insert a record into the vicidial_list table
|
### insert a record into the vicidial_list table
|
||||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$list_id','Y','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$list_id','Y','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='02011'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='02011'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
$cbc=0;
|
$cbc=0;
|
||||||
@@ -1359,7 +1367,7 @@ else
|
|||||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||||
{&lead_timezone_process;}
|
{&lead_timezone_process;}
|
||||||
### insert a record into the vicidial_list table if no record was found above
|
### insert a record into the vicidial_list table if no record was found above
|
||||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$list_id','Y','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$list_id','Y','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='02014'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='02014'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
$cbc=0;
|
$cbc=0;
|
||||||
@@ -5088,7 +5096,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
|||||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||||
{&lead_timezone_process;}
|
{&lead_timezone_process;}
|
||||||
### insert a record into the vicidial_list table
|
### insert a record into the vicidial_list table
|
||||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$wait_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$wait_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='02089'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='02089'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||||
@@ -5584,7 +5592,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
|||||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||||
{&lead_timezone_process;}
|
{&lead_timezone_process;}
|
||||||
### insert a record into the vicidial_list table
|
### insert a record into the vicidial_list table
|
||||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$hold_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$hold_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='02089'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='02089'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||||
@@ -6097,7 +6105,7 @@ if ($closing_check > 0)
|
|||||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||||
{&lead_timezone_process;}
|
{&lead_timezone_process;}
|
||||||
### insert a record into the vicidial_list table
|
### insert a record into the vicidial_list table
|
||||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$closing_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$closing_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||||
$affected_rows = $dbhA->do($stmtA);
|
$affected_rows = $dbhA->do($stmtA);
|
||||||
$dbhP=$dbhA; $mysql_count='02237'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
$dbhP=$dbhA; $mysql_count='02237'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||||
|
|||||||
Reference in New Issue
Block a user