Page 1 of 1
No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 9:53 am
by Khanyasi
We are using Vicidial version 2.6-381a with Asterisk 1.4.44-VICI, I think we are having issues with our /srv/www/htdocs/vicidial/non_agent_api_test.php any file >999999 7-digit DBID are not exporting vicidial notes to our external database, i would like to know how Vicidial flags call_log entries as being imported, any help would be appreciated.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 10:10 am
by mflorell
"non_agent_api_test.php" is not a VICIdial script, it looks like it might be a custom script someone wrote for you.
As to the rest of it, I really don't understand what you are referring to.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 10:44 am
by Khanyasi
Thanks for quick reply this script was modified to export vicidial notes to our external database, we just want to know how the script or Vicidial flags call_log entries, because non of >999999 DBID's are being exported, there has to be some sort of flag which is preventing anything > 6 digits, we want remove that flag, i would like to post the entire script but it larger than the allowed message size.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 11:10 am
by mflorell
You should probably contact the programmer that made the custom code for you.
You also might have alterations to your VICIdial system that are non-standard, especially since the call_log table doesn't have any flag fields in it.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 11:25 am
by williamconley
Khanyasi wrote:Thanks for quick reply this script was modified to export vicidial notes to our external database, we just want to know how the script or Vicidial flags call_log entries, because non of >999999 DBID's are being exported, there has to be some sort of flag which is preventing anything > 6 digits, we want remove that flag, i would like to post the entire script but it larger than the allowed message size.
try running a diff on the original api comparing it to this custom api. the result should be your custom code.
in there you will likely find a sql query with your limitation (or script code, but it should be sql as that is more efficient).
post the sql query only and you'll likely see the problem before you even finish posting it.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 11:25 am
by Khanyasi
Okay if vicidial dose not flag call log table, then would it be vicidial DB corruption that we are unable to export vicidial notes, please advise thanks
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 11:33 am
by williamconley
Khanyasi wrote:Okay if vicidial dose not flag call log table, then would it be vicidial DB corruption that we are unable to export vicidial notes, please advise thanks
you are apparently using a custom api file. that has nothing to do with anyone "flagging" anything. nor does it have anything to do with corruption.
and to stop the next wild claim: It's also not the NSA and you're not being hacked.
someone wrote code to export data. they built in a limitation to avoid "too much data" (most likely) and the sql query used to request the data is likely where that limitation will be. find the sql query in your code.
or hire someone to find it for you.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 12:23 pm
by Khanyasi
Thank you all of you i will get in touch with developer...
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 3:02 pm
by Khanyasi
Hi William here i have the custom code which was added to it i thought let me show you this code it might help before i look for a coder
if ($function == 'carrier_dump')
{
$stmt="SELECT dialplan_entry from vicidial_server_carriers WHERE carrier_id='Modulis1';";
$rslt=mysql_query($stmt, $link) or die("could not execute: $stmt " . mysql_error());
$row=mysql_fetch_row($rslt);
echo nl2br($row[0]);
exit;
}
if ($function == 'camponoff')
{
if (strlen($campaign_id) > 0 && strlen($active) > 0 && ($active =='Y' || $active == 'N'))
{
if ($active == 'Y')
{
$isactive = "Activated";
}
else
{
$isactive = "DeActivated";
}
$stmt="UPDATE vicidial_campaigns SET active = '$active' WHERE campaign_id = '$campaign_id';";
$rslt=mysql_query($stmt, $link) or die("could not execute: $stmt " . mysql_error());
printf ("Success Campaign $campaign_id has been $isactive <BR>");
}
if (strlen($campaign_id) == 0)
{
printf ("ERROR No Campaign ID<BR>");
}
if (strlen($active) == 0)
{
printf ("ERROR No Active flag<BR>");
}
if ($active !='Y')
{
if($active != 'N')
{
printf ("ERROR Incorrect Active Flag: $active <BR>");
}
}
exit;
}
if ($function == 'calllogdump')
{
#$stmt="SELECT * from vicidial_log where processed = 'N' AND limit 1000;";
$stmt ="select vicidial_log.uniqueid,left(vicidial_list.vendor_lead_code,7), left(vicidial_log.call_date,10),right(vicidial_log.call_date,8), vicidial_log.user, CONCAT('IVR TEL -- ',vicidial_log.phone_number,' -- ',vicidial_log.status),vicidial_list.source_id
from vicidial_log, vicidial_list
where vicidial_log.lead_id = vicidial_list.lead_id
and (vicidial_log.processed = 'N')
and vicidial_log.user = 'VDAD'
order by call_date limit 10000;";
$rslt=mysql_query($stmt, $link) or die("could not execute: $stmt " . mysql_error());
$num_rows = mysql_num_rows($rslt);
$count= 0;
while ($count < $num_rows)
{
$row=mysql_fetch_row($rslt);
$date = date('Y-m-d H:i:s', time());
printf("$row[0]|$row[1]|$row[2]|$row[3]|$row[4]|$row[5]|$row[6]|$row[7]<BR>")
;
$count++;
}
exit;
}
if ($function == 'calllogmark')
{
$vendor_lead_code = ereg_replace('"','',$vendor_lead_code);
$nosuccess = 0;
if ($vendor_lead_code == '')
{
printf ("ERROR<BR>");
$nosuccess = 1;
}
printf("Unique ID: $vendor_lead_code <BR>");
$stmt ="UPDATE vicidial_log set processed = 'Y',comments = NOW() where uniqueid = '$vendor_lead_code';";
$rslt=mysql_query($stmt, $link) or die("could not execute: $stmt " . mysql_error());
if ($nosuccess == 0)
{
printf("SUCCESS<BR>");
}
exit;
}
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 3:22 pm
by blackbird2306
Please post the API "function" you are using in Non Agent API. There are many functions in the API with a limit for instance "agent_stats_export":
NOTES-
There is a hard limit of 10000000 records analyzed
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 3:32 pm
by williamconley
Search for the word "limit" in each of those queries. The number after that word is stopping *all* records above that number from being processed.
Challenge: If there are millions of records in the resulting data set, you could overload your server trying to process that data. So be cautious when increasing the "limit" values.
If you want to be funny, remove "limit XXXXX" (whatever the value is) from each of the statements and run the script. Be sure you can restart mysql if necessary if the server begins to overload (don't do this while dialing, lol).
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 3:35 pm
by Khanyasi
Thanks William will update you if ended up messing things up !!thanks for your time!!.
Re: No Vicidial Notes >999999 being exported
Posted:
Thu Oct 12, 2017 9:16 pm
by williamconley
blackbird2306 wrote:Please post the API "function" you are using in Non Agent API. There are many functions in the API with a limit for instance "agent_stats_export":
NOTES-
There is a hard limit of 10000000 records analyzed
What he posted *
was* the functions. It's a custom copy with changes and newly added functions by an outside developer. (Read the rest of the post
)