need help debugging AST_VDauto_dial.pl

Discussions about development of VICIDIAL and astGUIclient

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

need help debugging AST_VDauto_dial.pl

Postby bobbymc » Wed Apr 27, 2016 2:06 am

im trying to understand what the reason for this is. why do we check if the caller id is bigger then 17 characters and has x digits in a row and below if we check calls unique id is bigger then 11 and the CLuniqueid if ever fetched from the call log table is less then 12 we override the epoch and unique id identifier?

matt any light you can shed on this would be greatly appreciated.

thank you

Code: Select all

                                if ( (length($KLcalleridCHECK[$kill_vac]) > 17) && ($KLcalleridCHECK[$kill_vac] =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) )
                                        {
                                        $stmtA = "SELECT end_epoch,uniqueid,start_epoch FROM call_log where caller_code='$KLcallerid[$kill_vac]' and server_ip='$KLserver_ip[$kill_vac]' order by end_epoch, start_time desc limit 1;";
                                        $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
                                        $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
                                        $sthArows=$sthA->rows;
                                        $rec_count=0;
                                        $rec_countCUSTDATA=0;
                                        while ($sthArows > $rec_count)
                                                {
                                                @aryA = $sthA->fetchrow_array;
                                                $end_epoch              = $aryA[0];
                                                $CLuniqueid             = $aryA[1];
                                                $start_epoch    = $aryA[2];
                                                $rec_count++;
                                                }
                                        $sthA->finish();
                                        }

                                if ( (length($KLuniqueid[$kill_vac]) > 11) && (length($CLuniqueid) < 12) )
                                        {
                                        $stmtA = "SELECT end_epoch,uniqueid,start_epoch FROM call_log where uniqueid='$KLuniqueid[$kill_vac]' and server_ip='$KLserver_ip[$kill_vac]' order by end_epoch, start_time desc limit 1;";
                                        $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
                                        $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
                                        $sthArows=$sthA->rows;
                                        $rec_count=0;
                                        $rec_countCUSTDATA=0;
                                        while ($sthArows > $rec_count)
                                                {
                                                @aryA = $sthA->fetchrow_array;
                                                $end_epoch              = $aryA[0];
                                                $CLuniqueid             = $aryA[1];
                                                $start_epoch    = $aryA[2];
                                                $rec_count++;
                                                }
                                        $sthA->finish();
                                        }

bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: need help debugging AST_VDauto_dial.pl

Postby mflorell » Wed Apr 27, 2016 5:46 am

Can't think of a reason off the top of my head, but that script was mostly written 10 years ago, so I would have to go through all of the code in that script to figure out why it's doing that. My guess is that's in the validation of vicidial_auto_calls section, so it's probably searching for the proper call_log record to use(since there can be more than one.)
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: need help debugging AST_VDauto_dial.pl

Postby bobbymc » Thu Apr 28, 2016 2:23 am

thank you for the feedback
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am


Return to Development

Who is online

Users browsing this forum: No registered users and 28 guests