Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 1:51 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: a2billing-callback-daemon manager.conf
PostPosted: Fri Dec 07, 2007 3:59 am 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
Is ther a bug in a2billing-callback-daemon while changin information about manager.conf ?

Ones changed the information in manager.conf to setup a different username/password, and applying the changes on a2billing.con

Code:
[2007-12-06 22:55:01] : TRY TO FIND PENDING CALLBACK
** Number of PENDING callbacks 1 **
UPDATE cc_callback_spool SET status='PROCESSING' WHERE id='1'

WE ARE IN THE PARENT PROCESS -> CHILD PID = 32634 -> RECORD ID = 1

WE ARE IN THE CHILD PROCESS
SQL =SELECT id, server_ip, manager_host, manager_username, manager_secret, lasttime_used FROM cc_server_manager WHERE id_group='1' ORDER BY lasttime_used ASC LIMIT 1 OFFSET 0

[2007-12-06 22:55:02]
[
[2007-12-06 22:55:03]]
## ERROR Cannot connect to the asterisk manager!
Please check the manager configuration...
UPDATE cc_callback_spool SET status='ERROR' WHERE id='1'
[
[2007-12-06 22:55:03]]
[END SELECT]


Asterisk reloaded, even restarted after changing manager.conf, no difference

I'm running version 1.3.0


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 11:50 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
After changing the credentials in manager.conf, you need to restart the callback daemon so it picks up the changes. Asterisk should only need a 'reload'.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 2:32 pm 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
I did, and still the same problem :(


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 2:40 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Try watching the Asterisk console with a high debug level whilst queueing a callback. You might receive an informative error message about why the manager connection was refused.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 3:36 pm 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
Yes indeed

a2billing.conf has this information

Code:
; MANAGER CONNECTION PARAMETERS
manager_host = localhost
manager_username = myasterisk1234
manager_secret = mycode1234


Code:
pbx001*CLI>
  == Parsing '/etc/asterisk/manager.conf': Found
Dec  7 10:35:15 NOTICE[5679]: manager.c:576 authenticate: 127.0.0.1 tried to authenticate with nonexistent user 'myasterisk'
  == Connect attempt from '127.0.0.1' unable to authenticate



No matter what I put in a2billing.conf, callback-daemon still says 'myasterisk'


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 11:01 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
It would be nice if we could prove that the callback daemon is actually restarting. Perhaps you should stop the service and then check the daemon actually stops with:
Code:
ps x | grep callback | grep -v grep
If you get any output then the daemon is still running and will need to be killed with something like:
Code:
killall -9  `ps x | grep callback | grep -v grep | sed -e 's/^ *//' | cut -d ' ' -f 1`
Or just kill the PIDs of the callback scripts manually.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 07, 2007 11:57 pm 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
Yes it does stops and starts correctly!

I'm not a php developer, but I do know some programmin on other languages, I can see that the definitions are well (as far as my understanding allows me)

I did this

manager.conf

Code:
[myasterisk1234]
secret = mycode1234
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user


a2billing.con

Code:
[test]
manager_host = localhost
manager_username = myasterisk1234
manager_secret = mycode1234


and in a2billing-callback-daemon

Code:
my $manager_host = $cfg->val('test', 'manager_host');
my $manager_username = $cfg->val('test', 'manager_username');
my $manager_secret = $cfg->val('test', 'manager_secret');


Reload asterisk
restart callback-daemon

same thing

== Parsing '/etc/asterisk/manager.conf': Found
Dec 7 18:50:11 NOTICE[8942]: manager.c:576 authenticate: 127.0.0.1 tried to authenticate with nonexistent user 'myasterisk'
== Connect attempt from '127.0.0.1' unable to authenticate

Another thing...

within the directory I execute the command

/var/lib/asterisk/a2billing
egrep -R myasterisk *

Just to make sure the string "myasterisk" wasn't hard coded any where, and it is not !!

wired, and I'm out of ideas


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 12:06 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
OK, you've customised the code. Is it possible you've changed the config file the callback daemon is reading from '$conf_file'?

Can you change the credentials in the [global] section to check that it's not still reading those for some reason.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 3:27 am 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
Default confiurations for the config file


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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 4:00 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I don't know then. All I can say is a default A2B installation has never shown this problem for me.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 08, 2007 1:33 pm 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
HEHE, anyway, thanks a lot stavros, I just wanted to change the username/password for something else than the defaults, is not dat bad at this moment, I'll keep looking forward for something else, learn PHP and if I found something I'll post the solution.

Is just a matter of time!

Thank you very much for you help!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 2:04 am 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
And the error re appears, I have a fresh installation with Fedora 7, asterisk 1.2 and A2B 1.3.1

I'm wondering if there is something missing within the PERL componnets, I did install them with CPAN, I really can not understand what is going on, I do changes in the manager.con and copy them to a2billing.conf and callback-deamon is not taking them.

Is ther another prerequisit that maybe I'm not covering?


Top
 Profile  
 
 Post subject: I know the answer
PostPosted: Tue Dec 11, 2007 3:58 pm 
Offline

Joined: Tue Dec 11, 2007 3:11 pm
Posts: 8
I had the same problem

I found that is a problem with code going faster that the Docs.

On the admin screen
go to Callback
go to Show Servers
Edit the Server

the MANAGER USERNAME
and password
are not set correctly,

Look in the a2billing.conf and about 2 pages down is
the manager settings just edit this screen with
those values

and it worked for me.

Take care


Last edited by yahoolane on Tue Dec 11, 2007 7:16 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 5:55 pm 
Offline

Joined: Thu Nov 22, 2007 6:14 pm
Posts: 33
There you go, this was extremely simple as it is must of the times.


Thanks a lot!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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