Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 23, 2024 1:18 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Could not open buddy file '/etc/asterisk/additional_a2billin
PostPosted: Thu Mar 01, 2007 12:09 pm 
Offline

Joined: Thu Mar 01, 2007 11:50 am
Posts: 3
Location: Sylhet/Bangladesh
Hi,

I have got an error message "

Could not open buddy file '/etc/asterisk/additional_a2billing_sip.conf'
while adding SIP FREIND in a2billing by clicking to GENERATE_ADDITIONAL_A@BILLING_SIP.CONF

I have edited a2billing.conf in /usr/local/etc/asterisk/ directory
(i have freebsd 6.2R OS) but no results !

can anyone help me ? here & how to point out the problem ?

I already add include statement in sip.conf & iax.conf.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 01, 2007 1:04 pm 
Offline
User avatar

Joined: Thu Jan 18, 2007 5:37 pm
Posts: 131
Location: Mallorca / Spain
is the file existing in /etc/asterisk ?

is it chmodded correctly ?


Top
 Profile  
 
 Post subject: Could not open buddy file '/etc/asterisk/additional_a2billin
PostPosted: Thu Mar 01, 2007 6:08 pm 
Offline

Joined: Thu Mar 01, 2007 11:50 am
Posts: 3
Location: Sylhet/Bangladesh
no, cause in freebsd, asterisk is located at /usr/local/etc/asterisk. In linux
its in /etc/asterisk.

Yes I chmoded correctly.

I saw error :

Could not open buddy file '/etc/asterisk/additional_a2billing_sip.conf'

but my file path is in Could not open buddy file '/usr/local/etc/asterisk/additional_a2billing_sip.conf'

how can i change that ? what will be proper chmod ? for this path ?

regards
litu

Added after 3 hours 41 minutes:

At last I got the reason & fix it !

i edit the file in /usr/local/www/data-dist/A2Billing_UI/lib/Class.A2Billing.php and edit the asterisk2billing path
from /etc/asterisk to /usr/local/etc/asterisk to suit FreeBSD OS need.

Now I can add SIP & IAX Friend and can reload Asterisk & my web gui
is able to write config in additional_a2billing_sip.conf and iax aswell.

thanks for everything.

Litu


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 5:41 pm 
Offline
User avatar

Joined: Tue Dec 04, 2007 12:05 am
Posts: 295
this i make chmod 777 /etc/asterisk/additional_a2billing_sip.conf
chmod +x chmod 777 /etc/asterisk/additional_a2billing_sip.conf

But nothing and this error no happens before

also I look Class.A2Billing.php
define('AST_CONFIG_DIR', '/etc/asterisk/');
define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing.conf');

and this is correct any more idea where is the problem


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 8:20 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
I spent a while looking at Arturo's CentOS 5 machine.
I couldn't figure out what was going on; permissions don't work like they do on every distro I've used previously. Editing CC_generate_friend.php to fopen() the buddy file in "w+" mode rather than "w" was the only thing that affected the outcome. Most strange.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 8:44 pm 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
I've had some recent experience with CentOS, too.
The point is that it uses SELinux. That makes things different than what we've been used too.

Think of it as a /double-layered/ security model: you perform the usual unix-like actions, and then you need to *confirm* them in selinux. Chmod-ing some file may not work on the first go. For one, I would expect SELinux to really /punish/ you for attempting a 777 mode.

Carefully looking at the logs, though, was useful and had clear pointers to the solutions.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 9:33 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
:idea:
Thanks for that xrg. Of course, SElinux! It's obvious now you've said it. Usually folks warn me when SElinux is involved.
As you hinted, setting permissive mode and building a policy based on the warnings in /var/log/messages (after testing every function in A2B) is the solution.


Top
 Profile  
 
 Post subject: SElinux is the problem
PostPosted: Sat Mar 29, 2008 11:16 am 
Offline
User avatar

Joined: Tue Dec 04, 2007 12:05 am
Posts: 295
Yes you are right . Many hours and I no look this.

I have other servers with asterisk and centos 5 but use other software and always put Selinux in permissive mode or Selinux OFF

This Time I install the server in X mode and Put Selinux OFF -- Reboot
and install php and all the staff
.- Install asterisk
.- Install a2billing

Now the server work fine

Really this misted is possible take you many hours
THanks to starvos for the chat we make

regards
arturo
gineta


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 26, 2008 4:49 am 
Offline

Joined: Mon May 26, 2008 12:31 am
Posts: 2
Can you give me hand guys, Im running freebsd and I ran out of ideas.
Im getting:

Executing [18004337300@a2billing:1] Answer("SIP/5701515187-0872c000", "") in new stack
-- Executing [18004337300@a2billing:2] Wait("SIP/5701515187-0872c000", "2") in new stack
-- Executing [18004337300@a2billing:3] DeadAGI("SIP/5701515187-0872c000", "a2billing.php") in new stack
[May 25 20:48:02] WARNING[752]: res_agi.c:2116 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
-- Launched AGI Script /usr/local/share/asterisk/agi-bin/a2billing.php
== a2billing.php: Failed to execute '/usr/local/share/asterisk/agi-bin/a2billing.php': No such file or directory
-- AGI Script a2billing.php completed, returning 0
-- Executing [18004337300@a2billing:4] Wait("SIP/5701515187-0872c000", "2") in new stack
-- Executing [18004337300@a2billing:5] Hangup("SIP/5701515187-0872c000", "") in new stack
== Spawn extension (a2billing, 18004337300, 5) exited non-zero on 'SIP/5701515187-0872c000'

the failed to execute is driving me crazy, the file exists and chmod +x so dont know what else to do. please give me hand here.

zvonimir


Top
 Profile  
 
 Post subject: possible solutions
PostPosted: Mon May 26, 2008 12:08 pm 
Offline
User avatar

Joined: Tue Dec 04, 2007 12:05 am
Posts: 295
My friend one question is you need

Is put disable SELINUX
and try again chmod and chown

if not work and need any help contact in the MSN [email protected]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 13 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group