Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
$value = ereg_replace("[^0-9]","",$value);
if(strlen($value)>1)
{
$stmt = "SELECT `phone_number` FROM `vicidial_list` WHERE `lead_id`='" . $value . "';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$value=$row[0];
}
################################################################################
### BEGIN - external_dial - place a manual dial phone call
################################################################################
if ($function == 'external_dial_by_lead')
{
$value = ereg_replace("[^0-9]","",$value);
if(strlen($value)>1)
{
$stmt = "SELECT `phone_number` FROM `vicidial_list` WHERE `lead_id`='" . $value . "';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$value=$row[0];
}
if ( (strlen($value)<2) or ( (strlen($agent_user)<2) and (strlen($alt_user)<2) ) or (strlen($search)<2) or (strlen($preview)<2) or (strlen($focus)<2) )
{
$result = 'ERROR';
$result_reason = "external_dial not valid";
$data = "$phone_code|$search|$preview|$focus";
echo "$result: $result_reason - $value|$data|$agent_user|$alt_user\n";
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
}
<code continues but cut off early for easy reading.>
Users browsing this forum: No registered users and 24 guests