Added address2 variable population in ALL inbound agi script
git-svn-id: svn://192.168.202.10@4007 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -82,7 +82,7 @@
|
|||||||
#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
|
#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
|
||||||
#exten => _99909*.,3,Hangup
|
#exten => _99909*.,3,Hangup
|
||||||
#
|
#
|
||||||
# Copyright (C) 2025 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2026 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# changes:
|
# changes:
|
||||||
# 70828-0924 - First Build
|
# 70828-0924 - First Build
|
||||||
@@ -270,6 +270,7 @@
|
|||||||
# 251001-1836 - Fix for rare Stereo recording filename issue
|
# 251001-1836 - Fix for rare Stereo recording filename issue
|
||||||
# 251020-0836 - Added code for recording_dtmf_muting, fix for stereo call recording
|
# 251020-0836 - Added code for recording_dtmf_muting, fix for stereo call recording
|
||||||
# 260403-2249 - Added vicidial_max_inbound_cache logging
|
# 260403-2249 - Added vicidial_max_inbound_cache logging
|
||||||
|
# 260729-0102 - Added address2 variable population
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||||
@@ -1393,6 +1394,13 @@ else
|
|||||||
if ($populate_lead_source =~ /DISABLED/)
|
if ($populate_lead_source =~ /DISABLED/)
|
||||||
{$source_id = 'VDCL';}
|
{$source_id = 'VDCL';}
|
||||||
}
|
}
|
||||||
|
$address2 = $AGI->get_variable('address2');
|
||||||
|
$address2_sql_a=''; $address2_sql_b='';
|
||||||
|
if (length($address2) > 0)
|
||||||
|
{
|
||||||
|
$address2_sql_a =',address2';
|
||||||
|
$address2_sql_b = ",'$address2'";
|
||||||
|
}
|
||||||
|
|
||||||
if ($populate_state_areacode =~ /NEW_LEAD_ONLY|OVERWRITE_ALWAYS/)
|
if ($populate_state_areacode =~ /NEW_LEAD_ONLY|OVERWRITE_ALWAYS/)
|
||||||
{
|
{
|
||||||
@@ -1504,7 +1512,7 @@ if ($call_handle_method =~ /LOOKUP/)
|
|||||||
if ($populate_lead_owner =~ /did|OWNERCUSTOM/)
|
if ($populate_lead_owner =~ /did|OWNERCUSTOM/)
|
||||||
{&populate_lead_owner_process;}
|
{&populate_lead_owner_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$populate_ownerA) 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$populate_ownerB);";
|
$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$populate_ownerA$address2_sql_a) 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$populate_ownerB$address2_sql_b);";
|
||||||
$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;
|
||||||
@@ -1681,7 +1689,7 @@ if ($call_handle_method =~ /LOOKUP/)
|
|||||||
if ($populate_lead_owner =~ /did|OWNERCUSTOM/)
|
if ($populate_lead_owner =~ /did|OWNERCUSTOM/)
|
||||||
{&populate_lead_owner_process;}
|
{&populate_lead_owner_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$populate_ownerA) 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$populate_ownerB);";
|
$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$populate_ownerA$address2_sql_a) 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$populate_ownerB$address2_sql_b);";
|
||||||
$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;
|
||||||
@@ -1780,7 +1788,7 @@ else
|
|||||||
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
||||||
{&populate_lead_owner_process;}
|
{&populate_lead_owner_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$populate_ownerA) 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$populate_ownerB);";
|
$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$populate_ownerA$address2_sql_a) 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$populate_ownerB$address2_sql_b);";
|
||||||
$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;
|
||||||
@@ -6596,7 +6604,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
|||||||
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
||||||
{&populate_lead_owner_process;}
|
{&populate_lead_owner_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$populate_ownerA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$wait_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB$populate_ownerB);";
|
$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$populate_ownerA$address2_sql_a) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$wait_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB$populate_ownerB$address2_sql_b);";
|
||||||
$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;";
|
||||||
@@ -7152,7 +7160,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
|||||||
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
||||||
{&populate_lead_owner_process;}
|
{&populate_lead_owner_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$populate_ownerA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$hold_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB$populate_ownerB);";
|
$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$populate_ownerA$address2_sql_a) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$hold_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB$populate_ownerB$address2_sql_b);";
|
||||||
$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;";
|
||||||
@@ -7744,7 +7752,7 @@ if ($closing_check > 0)
|
|||||||
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
if ($populate_lead_owner =~ /did|OWNERCUSTOM/i)
|
||||||
{&populate_lead_owner_process;}
|
{&populate_lead_owner_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$populate_ownerA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$closing_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB$populate_ownerB);";
|
$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$populate_ownerA$address2_sql_a) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$closing_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB$populate_ownerB$address2_sql_b);";
|
||||||
$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