AST_VDremote_agents.pl bug on 2.0.4?

All installation and configuration problems and questions

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

AST_VDremote_agents.pl bug on 2.0.4?

Postby gardo » Mon Dec 17, 2007 7:33 am

I'm getting this error running /usr/share/astguiclient/AST_VDremote_agents.pl:

/usr/share/astguiclient/AST_VDremote_agents.pl --debugX
String found where operator expected at /usr/share/astguiclient/AST_VDremote_agents.pl line 245, near "echo "$stmt\n""
(Do you need to predeclare echo?)

Astguiclient 2.0.4
CentOS 5
Asterisk 1.2.24

As a side note, running the same /usr/share/astguiclient/AST_VDremote_agents.pl on Astguiclient 2.0.3 doesn't give out any errors and runs fine.
http://goautodial.com
Empowering the next generation contact centers
gardo
 
Posts: 1926
Joined: Fri Sep 15, 2006 10:24 am
Location: Manila, 1004

Postby mflorell » Thu Dec 20, 2007 1:26 am

looks like an echo command snuck into a perl script, I have changed it and committed it to SVN. It should only have made problems if you were running with the --debug flag.

Thanks for the bug catch!
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby seaq » Thu Dec 20, 2007 10:30 am

Hi Matt, gardo, i run on this error, but after checking out svn i changed the echo for a print but now i'm getting this error

/usr/share/astguiclient/AST_VDremote_agents.pl
no command line options set
Undefined subroutine &main::mysql_query called at /usr/share/astguiclient/AST_VDremote_agents.pl line 245.

I'm using RHEL5 or CENTOS5.

i did install Net:MySQL...

perl -c /usr/share/astguiclient/AST_VDremote_agents.pl
/usr/share/astguiclient/AST_VDremote_agents.pl syntax OK
[root@asterisk0 ~]# perl -c /usr/lib/perl5/site_perl/5.8.8/Net/MySQL.pm
/usr/lib/perl5/site_perl/5.8.8/Net/MySQL.pm syntax OK

what could be the problem???
Andres Mujica
RHCE Linux Consultant

SEAQ SERVICIOS CIA LTDA
www.seaq.com.co
seaq
 
Posts: 86
Joined: Tue Jul 04, 2006 8:27 pm

Postby seaq » Thu Dec 20, 2007 10:33 am

right now i've replaced the AST_VDremote_agents.pl script with the 2.0.3 version but i'm not sure about problems doing this....
seaq
 
Posts: 86
Joined: Tue Jul 04, 2006 8:27 pm

Postby gardo » Thu Dec 20, 2007 3:15 pm

I haven't had the chance to try the SVN script for the remote agents yet. However, if I understood Matt correctly, you don't need to edit anything anymore on the script.
http://goautodial.com
Empowering the next generation contact centers
gardo
 
Posts: 1926
Joined: Fri Sep 15, 2006 10:24 am
Location: Manila, 1004

Postby mflorell » Fri Dec 21, 2007 2:41 am

and Net::MySQL is not used by VICIDIAL anymore...
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby gardo » Fri Dec 21, 2007 8:40 am

Matt,

Any plans on having a scheduler for remote agents to automatically start dialing? Say for broadcast type campaigns. Something that looks like the agent callback option where one can choose which date to do the callbacks. Another option is to have it integrated in the "Call Times" section. Instead of just having days, starting and ending hours, a specific date can be chosen when the campaign will start and end.

Is this on the todo list? If not can you give some pointers on how to start with this feature.
http://goautodial.com
Empowering the next generation contact centers
gardo
 
Posts: 1926
Joined: Fri Sep 15, 2006 10:24 am
Location: Manila, 1004

Postby mflorell » Fri Dec 21, 2007 11:58 am

Sounds like a good thing to put in as a feature request into the issue tracker :)
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ekaftan » Thu Jan 03, 2008 11:40 am

seaq wrote:right now i've replaced the AST_VDremote_agents.pl script with the 2.0.3 version but i'm not sure about problems doing this....


Andres,

Thanks for this post, I did the same as you did and now its working.
ekaftan
 
Posts: 126
Joined: Fri Nov 17, 2006 8:23 pm

Postby ekaftan » Thu Jan 03, 2008 12:34 pm

ekaftan wrote:
seaq wrote:right now i've replaced the AST_VDremote_agents.pl script with the 2.0.3 version but i'm not sure about problems doing this....


Andres,

Thanks for this post, I did the same as you did and now its working.


Following up to myself... I tried the script from 2.0.3 but dial statuses on leads were not updated (they got marked called, but stayed as NEW).

I then fixed AST_VDremote script with this patch:

diff -u AST_VDremote_agents.pl /usr/share/astguiclient/AST_VDremote_agents.pl
--- AST_VDremote_agents.pl 2007-12-07 08:04:41.000000000 -0300
+++ /usr/share/astguiclient/AST_VDremote_agents.pl 2008-01-03 14:20:15.000000000 -0300
@@ -241,12 +241,14 @@

##### grab number of calls today in this campaign and increment
$stmt="SELECT calls_today FROM vicidial_live_agents WHERE extension LIKE "R/%";";
- $rslt=mysql_query($stmt, $link);
- if ($DB) {echo "$stmt\n";}
- $vla_cc_ct = mysql_num_rows($rslt);
+ $sthA = $dbhA->prepare($stmt) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ if ($DB) { print "$stmt\n";}
+ $vla_cc_ct = $sthArows;
if ($vla_cc_ct > 0)
{
- $row=mysql_fetch_row($rslt);
+ $row = $sthA->fetchrow;
$calls_today =$row[0];
}
else


Remote agents now work, but call status on the list still dont get updated. What script should update the status?

thanks.
ekaftan
 
Posts: 126
Joined: Fri Nov 17, 2006 8:23 pm

Postby ekaftan » Thu Jan 24, 2008 7:15 pm

ekaftan wrote:
ekaftan wrote:
seaq wrote:right now i've replaced the AST_VDremote_agents.pl script with the 2.0.3 version but i'm not sure about problems doing this....


Andres,

Thanks for this post, I did the same as you did and now its working.


Following up to myself... I tried the script from 2.0.3 but dial statuses on leads were not updated (they got marked called, but stayed as NEW).

I then fixed AST_VDremote script with this patch:

diff -u AST_VDremote_agents.pl /usr/share/astguiclient/AST_VDremote_agents.pl
--- AST_VDremote_agents.pl 2007-12-07 08:04:41.000000000 -0300
+++ /usr/share/astguiclient/AST_VDremote_agents.pl 2008-01-03 14:20:15.000000000 -0300
@@ -241,12 +241,14 @@

##### grab number of calls today in this campaign and increment
$stmt="SELECT calls_today FROM vicidial_live_agents WHERE extension LIKE "R/%";";
- $rslt=mysql_query($stmt, $link);
- if ($DB) {echo "$stmt\n";}
- $vla_cc_ct = mysql_num_rows($rslt);
+ $sthA = $dbhA->prepare($stmt) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ if ($DB) { print "$stmt\n";}
+ $vla_cc_ct = $sthArows;
if ($vla_cc_ct > 0)
{
- $row=mysql_fetch_row($rslt);
+ $row = $sthA->fetchrow;
$calls_today =$row[0];
}
else


Remote agents now work, but call status on the list still dont get updated. What script should update the status?

thanks.


Following up to myself again. The patch I made is working and call status do get updated (that was a different error, I had not installed FastAgi correctly.)
ekaftan
 
Posts: 126
Joined: Fri Nov 17, 2006 8:23 pm

Postby seaq » Fri Jan 25, 2008 8:10 am

i haven't had the chance yet to check remote agents with 2.0.4 and 2.0.3, as soon as i get the chance i'll be testing this.

tnks
seaq
 
Posts: 86
Joined: Tue Jul 04, 2006 8:27 pm

A patch of the solution that works for me - for now.

Postby sirevilknight » Mon Feb 04, 2008 12:35 pm

Guys,

I grabbed the copy of this file from the svn trunk and it is still broken.
The echo statement is patched in the trunk version but there is a section
of the code using the NET::MySQL API calls, apparently overlooked in the
rewrite? Anyway, I hope mflorell would be able to look at this issue and
patch the versions in the distribution.


Code: Select all
--- /usr/share/astguiclient/AST_VDremote_agents.pl      2008-02-04 09:46:36.000000000 -0500
+++ astguiclient-trunk/trunk/bin/AST_VDremote_agents.pl 2008-02-04 06:33:43.000000000 -0500
@@ -241,28 +241,16 @@
 
                ##### grab number of calls today in this campaign and increment
                $stmt="SELECT calls_today FROM vicidial_live_agents WHERE extension LIKE \"R/%\";";
-               ### $rslt=mysql_query($stmt, $link);
-
-               # if ($DB) { print "$stmt\n";}
-               # $vla_cc_ct = mysql_num_rows($rslt);
-               # if ($vla_cc_ct > 0)
-               #       {
-               #       $row=mysql_fetch_row($rslt);
-               #       $calls_today =$row[0];
-               #       }
-               #else
-               #       {$calls_today ='0';}
-
-               $sthAX = $dbhA->prepare($stmt) or die "preparing: ",$dbhA->errstr;
-                $sthAX->execute or die "executing: $stmt ", $dbhA->errstr;
-                $vla_cc_ct=$sthAX->rows;
+               $rslt=mysql_query($stmt, $link);
+               if ($DB) {print "$stmt\n";}
+               $vla_cc_ct = mysql_num_rows($rslt);
                if ($vla_cc_ct > 0)
-               {       # @rowAX = $sthAX->fetchrow_array;
-                       #$calls_today = "$rowAX[0]";
-               }else
-               {       $calls_today ='0';                      }
-                $sthAX->finish();
-
+                       {
+                       $row=mysql_fetch_row($rslt);
+                       $calls_today =$row[0];
+                       }
+               else
+                       {$calls_today ='0';}
                $calls_today++;
 
                $stmtA = "UPDATE vicidial_live_agents set status='INCALL', last_call_time='$SQLdate',comments='REMOTE',calls_today='$calls_today' where server_ip='$server_ip' and status IN('QUEUE') and extension LIKE \"R/%\";";
sirevilknight
 
Posts: 4
Joined: Sat Feb 02, 2008 2:49 am

Note on the solution above..

Postby sirevilknight » Mon Feb 04, 2008 12:46 pm

The code posted is a diff of my changes to the AST_VDremote_agents.pl file and the version in the 2.04 release and current svn trunk.

Anyone with this same issue should be able to copy the code and above
and use it to patch their copy of AST_VDremote_agents.pl.

Anyone with better knowledge of PEAR and DBI database API should can review the code changes for accuracy, they are made in a hurry and based on my best guess to get the system working... I am in no way a PEAR programmer.
sirevilknight
 
Posts: 4
Joined: Sat Feb 02, 2008 2:49 am

Postby seaq » Tue Feb 05, 2008 4:33 pm

that explains this message after trying to run the script

/usr/share/astguiclient/AST_VDremote_agents.pl
no command line options set
Undefined subroutine &main::mysql_query called at /usr/share/astguiclient/AST_VDremote_agents.pl line 245.

it seems to be asking for Net::mysql
seaq
 
Posts: 86
Joined: Tue Jul 04, 2006 8:27 pm


Return to Support

Who is online

Users browsing this forum: Bing [Bot] and 307 guests