Added user variable sending option on enter_ingroup_url feature

Added full_name and launch_user variables to AST_send_URL.pl script

git-svn-id: svn://192.168.202.10@2996 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2018-06-01 13:55:57 +00:00
parent 010ca7bc4c
commit 7efd0ea400
2 changed files with 43 additions and 7 deletions
+6 -1
View File
@@ -227,6 +227,7 @@
# 180424-1539 - Added in-group populate_lead_source, populate_lead_vendor options
# 180520-1802 - Added enter_ingroup_url feature
# 180521-0736 - Changed closer logs for AGENTDIRECT calls to log destination user
# 180601-0932 - Added user variable sending option on enter_ingroup_url feature
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -2556,11 +2557,15 @@ if ($populate_lead_province =~ /OW_did/i)
### BEGIN the Enter-InGroup-URL get process
if (length($enter_ingroup_url) > 5)
{
$temp_user='';
if ( ($channel_group =~ /AGENTDIRECT/i) && (length($agent_only) > 1) )
{$temp_user = $agent_only;}
$launch = $PATHhome . "/AST_send_URL.pl";
$launch .= " --SYSLOG" if ($SYSLOG);
$launch .= " --lead_id=" . $insert_lead_id;
$launch .= " --phone_number=" . $phone_number;
$launch .= " --user=";
$launch .= " --user=" . $temp_user;
$launch .= " --call_type=IN";
$launch .= " --campaign=" . $channel_group;
$launch .= " --uniqueid=" . $uniqueid;
+37 -6
View File
@@ -27,6 +27,7 @@
# 170509-1545 - Added --A--SQLdate--B-- variable
# 180519-1741 - Added INGROUP_WCU_ON & INGROUP_WCU_OFF functions
# 180520-2002 - Added ENTER_INGROUP_URL function
# 180601-0929 - Added full_name and launch_user variable options
#
$|++;
@@ -489,6 +490,25 @@ if (length($lead_id) > 0)
$sthA->finish();
}
if ($enter_ingroup_url =~ /--A--user_custom_|--A--full_name--B--/)
{
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group,full_name from vicidial_users where user='$user';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VAR_user_custom_one = $aryA[0];
$VAR_user_custom_two = $aryA[1];
$VAR_user_custom_three = $aryA[2];
$VAR_user_custom_four = $aryA[3];
$VAR_user_custom_five = $aryA[4];
$VAR_user_group = $aryA[5];
$VAR_full_name = $aryA[6];
}
}
if ($enter_ingroup_url =~ /--A--closecallid--B--/)
{
$stmtA = "SELECT closecallid FROM vicidial_closer_log where uniqueid='$uniqueid' order by closecallid limit 1;";
@@ -568,6 +588,8 @@ if (length($lead_id) > 0)
$enter_ingroup_url =~ s/--A--user_custom_three--B--/$VAR_user_custom_three/gi;
$enter_ingroup_url =~ s/--A--user_custom_four--B--/$VAR_user_custom_four/gi;
$enter_ingroup_url =~ s/--A--user_custom_five--B--/$VAR_user_custom_five/gi;
$enter_ingroup_url =~ s/--A--full_name--B--/$VAR_full_name/gi;
$enter_ingroup_url =~ s/--A--launch_user--B--/$user/gi;
$enter_ingroup_url =~ s/--A--did_id--B--/$VAR_did_id/gi;
$enter_ingroup_url =~ s/--A--did_extension--B--/$VAR_did_extension/gi;
$enter_ingroup_url =~ s/--A--did_pattern--B--/$VAR_did_pattern/gi;
@@ -630,9 +652,9 @@ if (length($lead_id) > 0)
}
$sthA->finish();
if ($na_call_url =~ /--A--user_custom_/)
if ($na_call_url =~ /--A--user_custom_|--A--full_name--B--/)
{
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group from vicidial_users where user='$user';";
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group,full_name from vicidial_users where user='$user';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -645,6 +667,7 @@ if (length($lead_id) > 0)
$VAR_user_custom_four = $aryA[3];
$VAR_user_custom_five = $aryA[4];
$VAR_user_group = $aryA[5];
$VAR_full_name = $aryA[6];
}
}
@@ -754,6 +777,8 @@ if (length($lead_id) > 0)
$na_call_url =~ s/--A--user_custom_three--B--/$VAR_user_custom_three/gi;
$na_call_url =~ s/--A--user_custom_four--B--/$VAR_user_custom_four/gi;
$na_call_url =~ s/--A--user_custom_five--B--/$VAR_user_custom_five/gi;
$na_call_url =~ s/--A--full_name--B--/$VAR_full_name/gi;
$na_call_url =~ s/--A--launch_user--B--/$user/gi;
$na_call_url =~ s/--A--did_id--B--/$VAR_did_id/gi;
$na_call_url =~ s/--A--did_extension--B--/$VAR_did_extension/gi;
$na_call_url =~ s/--A--did_pattern--B--/$VAR_did_pattern/gi;
@@ -838,9 +863,9 @@ if (length($lead_id) > 0)
}
$sthA->finish();
if ($sc_call_url =~ /--A--user_custom_/)
if ($sc_call_url =~ /--A--user_custom_|--A--full_name--B--/)
{
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group from vicidial_users where user='$user';";
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group,full_name from vicidial_users where user='$user';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -853,6 +878,7 @@ if (length($lead_id) > 0)
$VAR_user_custom_four = $aryA[3];
$VAR_user_custom_five = $aryA[4];
$VAR_user_group = $aryA[5];
$VAR_full_name = $aryA[6];
}
}
@@ -962,6 +988,8 @@ if (length($lead_id) > 0)
$sc_call_url =~ s/--A--user_custom_three--B--/$VAR_user_custom_three/gi;
$sc_call_url =~ s/--A--user_custom_four--B--/$VAR_user_custom_four/gi;
$sc_call_url =~ s/--A--user_custom_five--B--/$VAR_user_custom_five/gi;
$sc_call_url =~ s/--A--full_name--B--/$VAR_full_name/gi;
$sc_call_url =~ s/--A--launch_user--B--/$user/gi;
$sc_call_url =~ s/--A--did_id--B--/$VAR_did_id/gi;
$sc_call_url =~ s/--A--did_extension--B--/$VAR_did_extension/gi;
$sc_call_url =~ s/--A--did_pattern--B--/$VAR_did_pattern/gi;
@@ -1027,9 +1055,9 @@ if (length($lead_id) > 0)
}
$sthA->finish();
if ($start_call_url =~ /--A--user_custom_/)
if ($start_call_url =~ /--A--user_custom_|--A--full_name--B--/)
{
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group from vicidial_users where user='$user';";
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group,full_name from vicidial_users where user='$user';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1042,6 +1070,7 @@ if (length($lead_id) > 0)
$VAR_user_custom_four = $aryA[3];
$VAR_user_custom_five = $aryA[4];
$VAR_user_group = $aryA[5];
$VAR_full_name = $aryA[6];
}
}
@@ -1150,6 +1179,8 @@ if (length($lead_id) > 0)
$start_call_url =~ s/--A--user_custom_three--B--/$VAR_user_custom_three/gi;
$start_call_url =~ s/--A--user_custom_four--B--/$VAR_user_custom_four/gi;
$start_call_url =~ s/--A--user_custom_five--B--/$VAR_user_custom_five/gi;
$start_call_url =~ s/--A--full_name--B--/$VAR_full_name/gi;
$start_call_url =~ s/--A--launch_user--B--/$user/gi;
$start_call_url =~ s/--A--did_id--B--/$VAR_did_id/gi;
$start_call_url =~ s/--A--did_extension--B--/$VAR_did_extension/gi;
$start_call_url =~ s/--A--did_pattern--B--/$VAR_did_pattern/gi;