No Vicidial Notes >999999 being exported

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

No Vicidial Notes >999999 being exported

Postby Khanyasi » Thu Oct 12, 2017 9:53 am

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.
Khanyasi
 
Posts: 23
Joined: Thu Feb 16, 2017 9:46 am

Re: No Vicidial Notes >999999 being exported

Postby mflorell » Thu Oct 12, 2017 10:10 am

"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.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: No Vicidial Notes >999999 being exported

Postby Khanyasi » Thu Oct 12, 2017 10:44 am

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.
Khanyasi
 
Posts: 23
Joined: Thu Feb 16, 2017 9:46 am

Re: No Vicidial Notes >999999 being exported

Postby mflorell » Thu Oct 12, 2017 11:10 am

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.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: No Vicidial Notes >999999 being exported

Postby williamconley » Thu Oct 12, 2017 11:25 am

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. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: No Vicidial Notes >999999 being exported

Postby Khanyasi » Thu Oct 12, 2017 11:25 am

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
Khanyasi
 
Posts: 23
Joined: Thu Feb 16, 2017 9:46 am

Re: No Vicidial Notes >999999 being exported

Postby williamconley » Thu Oct 12, 2017 11:33 am

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.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: No Vicidial Notes >999999 being exported

Postby Khanyasi » Thu Oct 12, 2017 12:23 pm

Thank you all of you i will get in touch with developer...
Khanyasi
 
Posts: 23
Joined: Thu Feb 16, 2017 9:46 am

Re: No Vicidial Notes >999999 being exported

Postby Khanyasi » Thu Oct 12, 2017 3:02 pm

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;
}
Khanyasi
 
Posts: 23
Joined: Thu Feb 16, 2017 9:46 am

Re: No Vicidial Notes >999999 being exported

Postby blackbird2306 » Thu Oct 12, 2017 3:22 pm

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
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3
blackbird2306
 
Posts: 409
Joined: Mon Jun 23, 2014 5:31 pm

Re: No Vicidial Notes >999999 being exported

Postby williamconley » Thu Oct 12, 2017 3:32 pm

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).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: No Vicidial Notes >999999 being exported

Postby Khanyasi » Thu Oct 12, 2017 3:35 pm

Thanks William will update you if ended up messing things up !!thanks for your time!!.
Khanyasi
 
Posts: 23
Joined: Thu Feb 16, 2017 9:46 am

Re: No Vicidial Notes >999999 being exported

Postby williamconley » Thu Oct 12, 2017 9:16 pm

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 8-) )
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 116 guests