Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 25, 2024 9:50 am
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Tue Jun 12, 2007 7:36 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
In your linux console, try to execute the following command:

Code:
# service callback_daemon status


If I am right, you will receive a feedback telling you if the callback_daemon is running or not.

If it is not, then try:
Code:
# service callback_daemon start


The last time I have used it, I have noticed that the callback_daemon didn't give me much feedback on the screen. Maybe you will be luckier than me.

Also, try the command:
Code:
# pstree


This will show you a list of processes (incuding daemons) running on your server. If the callback_daemon is not in the list, than it is not started.

The the # pstree result is too long, then do this:

Code:
# pstree | grep "callback"


This will only show the processes that have the word callback in them.

Let me know about the result.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 15, 2007 4:15 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
If you follow these instructions, you will be able to start the daemon.

http://trac.asterisk2billing.org/cgi-bin/trac.cgi/browser/trunk/addons/Doc/Callback-Install.info

But even then, we have found some bugs in the daemon. It does not understand the restart and the zap options. And the option "status" says that de daemon is stopped no matter what.

Another problem is that when you try the daemon more than once, it is indeed able to start more than once. You will end up with a whole bunch of daemons trying to initiate your callbacks.


Top
 Profile  
 
 Post subject: Callback
PostPosted: Mon Jun 18, 2007 3:13 am 
Offline

Joined: Mon Jun 18, 2007 2:55 am
Posts: 5
Hey guys awesome software i have it running and love it and now want to offer call back but am having a number of difficulties configuring it for some reason.... :? i must have missed something i followed the instructions.

asiby wrote:
If you follow these instructions, you will be able to start the daemon.

http://trac.asterisk2billing.org/cgi-bin/trac.cgi/browser/trunk/addons/Doc/Callback-Install.info


I was wondering if someone could explain/more detail about the following step, i believe i carried it out successfully but am unsure i know i could just restart the box but its in use 24/7 not possible and i am having issues else where.

Quote:
34 CHKCONFIG : RUNLEVEL FILES
35 Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line
36 tells chkconfig what runlevels the service should be started in by default, as well as the start and stop priority levels. If the
37 service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line
38 contains a description for the service, and may be extended across multiple lines with backslash continuation.
39
40 you may need to check the priority of postgresql or mysql through :
41 ls -la /etc/rc3.d/
42
43 then set the priority of the runlevel accordingly, edit a2billing-callback-daemon.rc
44 # chkconfig: levels S K
45 in our script : # chkconfig: 2345 80 80


The main issue that i am having is that when i start the daemon i receive the following error message:
Code:
root@asterisk1 callback-daemon]# a2billing-callback-daemon
Can't call method "val" on an undefined value at /usr/local/bin/a2billing-callback-daemon line 25.


Line 25 is the DB section of the conf file...

Here is a copy of my a2billing-callback-daemon global and DB section:
Code:
######################### GLOBALS ########################
my $path_daemon = "/var/lib/asterisk/a2billing/callback-daemon/";
my $daemon = "CallBack-Daemon";

######################### READ THE CONFIG FILE ########################
my $conf_file = "/etc/asterisk/a2billing.conf";
# Read the config file
my $cfg = Config::IniFiles->new( -file => $conf_file );

######################### DB PARAMETER ########################
my $dbname = $cfg->val('database', 'dbname');
my $dbhost = $cfg->val('database', 'hostname');
my $dbport = $cfg->val('database', 'port');
my $login = $cfg->val('database', 'user');
my $pwd = $cfg->val('database', 'password');
my $dbtype = $cfg->val('database', 'dbtype');


Here are the file permissions for the a2billing.conf
-rwxrwxrwx 1 asterisk asterisk 23248 Jun 18 12:05 a2billing.conf

Can anyone see something out of the ordinary i have no idea why it cannot pull the information, i replace the database values within the a2billing-callback-daemon with the real values and it gave another error message but dont have it on hand but can get it...

Help is greatly appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 18, 2007 12:57 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
So far, you did well. Now you just update your a2billing.conf file with the one from the trunk. It was broken in 2 places: a ":" was used to comment a line instead of a ";" and another comment line was broken in 2. This causes an error in the .conf file. After the update, everything should be ok.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 4:36 am 
Offline

Joined: Mon Jun 18, 2007 2:55 am
Posts: 5
Thanks for the help but i am still not clear on what is broken..

Code:
[root@connect1]# service a2billing-callback-daemon start
Can't call method "val" on an undefined value at /var/lib/asterisk/a2billing/callback-daemon/a2billing-callback-daemon line 25.
Starting a2billing-callback-daemon:                        [FAILED]
[root@connect1]#


Here is another copy of my callback-daemon i cannot see where the : is...


Code:
#!/usr/bin/perl -w

use strict;
use DBI;
use POSIX qw(setsid);
use vars qw($dbh);

use lib '/var/lib/asterisk/a2billing/callback-daemon/lib';
use Asterisk::Manager;
use Config::IniFiles;

$|++;


######################### GLOBALS ########################
my $path_daemon = "/var/lib/asterisk/a2billing/callback-daemon/";
my $daemon = "CallBack-Daemon";

######################### READ THE CONFIG FILE ########################
my $conf_file = "/etc/asterisk/a2billing.conf";
# Read the config file
my $cfg = Config::IniFiles->new( -file => $conf_file );

######################### DB PARAMETER ########################
my $dbname = $cfg->val('database', 'dbname');
my $dbhost = $cfg->val('database', 'hostname');
my $dbport = $cfg->val('database', 'port');
my $login = $cfg->val('database', 'user');
my $pwd = $cfg->val('database', 'password');
my $dbtype = $cfg->val('database', 'dbtype');


######################### LOG FILE ########################
my $log_file = "/var/log/asterisk/a2billing-daemon-callback.log";

######################### ASTERISK MANAGER ########################
my $manager_host = "localhost";
my $manager_username = "mymanagerusername";
my $manager_secret = "mymanagerpassword";


I am running trixbox2.2 could this be the issue??

Thanks for your help guys:D


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 02, 2007 7:48 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Can you attach a copy of your a2billing.conf file please? Don't forget to remove any password and host name :D


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 4:04 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Think I got some Perl issue here. When executing:

service a2billing-callback-daemon start

I get error of: "Can't locate Config/IniFiles.pm in @INC (@INC contains: /var/lib/asteirsk/a2billing............)

BEGIN failed--compilation aborted at /var/lib/asterisk/a2billing/callback-daemon/a2billing-callback-daemon line 10.

Lilttle help needed - using trixbox (Centos 4.5), Asterisk 1.2.22, and YellowJacket.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 4:20 am 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
Code:
perl -MCPAN -e shell
install Config::IniFiles
exit


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 4:49 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Thanks Anest ... I know I did that, but did again, my slow ass link took forever on the download and I thought I was stuck and had closed it down before it was finished. Daemon now reports "OK"

Now for the next step of testing. I assume people do have this working properly, right?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 28, 2007 1:46 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
OK - got a test call working fine with the web GUI, but have a slight problem .....

The 1st call is there and billed properly, the 2nd leg of the call shows no duration and no terminating cause ... and therefore, not billed.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 05, 2007 7:35 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
My callbacks allways fail. On my web callback and cid-callback the "show callback" always shows that the "status" as "error" and the "manager-result" as "error-originate"

I am running 1.3 released version


The a2billing-callback-daemon service starts but if I check the status it says it has stopped. If i do "pstree" i never see the a2billing-callback-daemon among the services that are running

the manager does log on successfully, the callback does get spooled with ip address/hostname as "localhost"

the callback is never initiated and the status always shows error and error-originate

any suggestions as to why this is occurring and as to why the daemon appears to have stopped



FIXED. I ended up using the log file /var/log/asterisk/a2billing-daemon-callback.log to determine if the daemon was running. it is always logging the spool status.
Eventually found the problem in the "originate" call complaining about the call failing because the channel was on the same server as that of the caller.


Last edited by gue on Mon Aug 06, 2007 7:56 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 4:12 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
In the admin interface, check the IP of the server. If it says default, you will have to change it to localhost or the IP or domain name of your server.

After checking that out, you can also check the file a2billing.conf to see if the maner password is set correctly.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 6:31 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Hey Asiby, Anest or someone, can you help me out again. I had this daemon working properly on my test system, and now on one I want to put in production, I'm missing something. Is Trix 2.2 with Asterisk 1.4 and A2B 1.3.

I have performed the following steps:

yum install perl-DBD-Pg
perl -MCPAN -e shell

cpan> install Config::IniFiles
CPAN: Storable loaded OK ..... Config::IniFiles is up to date.
cpan> reload cpan .... 224 subroutings redefined

copy callback-daemon directory to /var/lib/asterisk/a2billing

install --owner=root --group=root --mode=700 a2billing-callback-daemon.rc /etc/rc.d/init.d/a2billing-callback-daemon

chkconfig --add a2billing-callback-daemon

Then I do service a2billing-callback-daemon start I get:
execvp: Permission denied
Starting a2billing-callback-daemon: [FAILED]


Can someone point me in the proper direction? What did I forget or mess up on. Thanks.


Top
 Profile  
 
 Post subject: Re: Callback
PostPosted: Tue Oct 16, 2007 7:11 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
jmead86 wrote:
Hey guys awesome software i have it running and love it and now want to offer call back but am having a number of difficulties configuring it for some reason.... :? i must have missed something i followed the instructions.



The main issue that i am having is that when i start the daemon i receive the following error message:
Code:
root@asterisk1 callback-daemon]# a2billing-callback-daemon
Can't call method "val" on an undefined value at /usr/local/bin/a2billing-callback-daemon line 25.


Line 25 is the DB section of the conf file...

Here is a copy of my a2billing-callback-daemon global and DB section:
Code:
######################### GLOBALS ########################
my $path_daemon = "/var/lib/asterisk/a2billing/callback-daemon/";
my $daemon = "CallBack-Daemon";

######################### READ THE CONFIG FILE ########################
my $conf_file = "/etc/asterisk/a2billing.conf";
# Read the config file
my $cfg = Config::IniFiles->new( -file => $conf_file );

######################### DB PARAMETER ########################
my $dbname = $cfg->val('database', 'dbname');
my $dbhost = $cfg->val('database', 'hostname');
my $dbport = $cfg->val('database', 'port');
my $login = $cfg->val('database', 'user');
my $pwd = $cfg->val('database', 'password');
my $dbtype = $cfg->val('database', 'dbtype');


I got the same exact issue here. And to add here is the relevant part of my a2billing.conf file:
Quote:
[database]
hostname = localhost
port = 5432
user = a2billinguser
password = a2billing
dbname = mya2billing
dbtype = mysql


So any help is appreciated ... what is wrong here?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 9:04 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Looks to me like there's a typo in a2billing.conf.

The easiest way to fix it would be to apply xrg's changes which make the callback daemon report config file errors.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group