Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 23, 2017 10:05 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Thu Jul 24, 2008 4:25 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4064
Hi

There are always terminology problems here as to what a reseller actually means. I prefer these definitions:-

1. A reseller designs his own products and sets his own prices, and owns his own customers, and therefore takes his own money and pays you for the minutes he uses.

2. An Agent re-sells your products at your prices to customers - you own the customer and collect the money, and pay the agent commission on what he has sold.

Number 1 can be achieved with separate A2Billing servers, either real or virtual.

Number 2 is coming in 1.4.

Joe


Top
 Profile  
 
 Post subject: Reseller module
PostPosted: Thu Jul 24, 2008 9:23 pm 
Offline

Joined: Thu Jul 03, 2008 10:12 pm
Posts: 17
Location: USA
I agree but the switch owner should be able to control the prepay balance of the reseller # 1. The Owner should charge reseller #1 with one rate table and set a prepaid balance. while the reseller can have it's own rate tables for his end users.

Do we expect that soon this year or forget it? :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 24, 2008 9:35 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4064
The circumstance you describe can easily be achieved by using an A2Billing server (real or virtual) per reseller, and having one master A2Billing through which all the afore mentioned A2Billing servers pass their traffic.

Joe


Top
 Profile  
 
 Post subject: Re: Reseller module
PostPosted: Fri Jul 25, 2008 7:21 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
asiatel wrote:
Do we expect that soon this year or forget it? :)


Does that mean you expect the other developers to do the work for you, for free?

Maybe that's the main reason you are not getting the features you want..


Top
 Profile  
 
 Post subject: It is possible
PostPosted: Thu Jul 31, 2008 5:58 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
stavros wrote:
That's the advantage of going the VPS route: each reseller has independant rate-tables, so everyone has their own buy and sell rates. Most resellers will be sourcing their buy-rates from the sell-rate of another VPS on the same system, whilst the top level reseller(s) will source their buy-rate from their carriers.


It is possible to implement this solution with only one public ip address?
Do I need different incoming numbers for each reseller or just one global number will work?


Top
 Profile  
 
 Post subject: Re: It is possible
PostPosted: Thu Jul 31, 2008 6:09 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
gonzogg wrote:
It is possible to implement this solution with only one public ip address?
If you're happy to run Asterisk on a non-default port for all but one of the VPSs, yes a single IP would suffice. Bear in mind that to offer HTTPS you need a unique IP per hostname, so you shouldn't need to go down this route.
Quote:
Do I need different incoming numbers for each reseller or just one global number will work?
You need to deliver the inbound calls to the correct instance of Asterisk, so yes you need separate access numbers.


Top
 Profile  
 
 Post subject: Clone for 1.3.3
PostPosted: Sat Aug 02, 2008 7:38 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
I am following the How to: from coborop to clone version 1.3.3 but I am finding difficult to find some file locations. Has anyone have written the instruction of how to clone version 1.3.3 on the same machine?


Top
 Profile  
 
 Post subject: Re: Clone for 1.3.3
PostPosted: Thu Aug 07, 2008 10:51 pm 
Offline
User avatar

Joined: Sun Jul 22, 2007 4:07 pm
Posts: 26
Location: Rome, Italy
gonzogg wrote:
I am following the How to: from coborop to clone version 1.3.3 but I am finding difficult to find some file locations. Has anyone have written the instruction of how to clone version 1.3.3 on the same machine?


Hi gonzogg,
even if I'm "watching" this thread,
I've not received any alert email about your post
so I've read it only now.

You are correct:
the last time I followed my 'cloning guide'
I noticed some errors,
sorry about that.

Let me know if you where not able to fix it by yourself
perhaps with some 'grepping'
because I've been able to successfully apply it also on the current stable (1.3.3) a2b version.
If the community requests it, I'll post the correct how to.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 08, 2008 3:37 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
Mike,

Thanks for the reply. I will really appreciate if you can post the how to for version 1.3.3
I am wondering if this is the solution others are using for reseller or they already using the agent module on the new version 1.4?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 08, 2008 3:43 pm 
Offline
User avatar

Joined: Sun Jul 22, 2007 4:07 pm
Posts: 26
Location: Rome, Italy
gonzogg wrote:
Mike,

Thanks for the reply. I will really appreciate if you can post the how to for version 1.3.3
I am wondering if this is the solution others are using for reseller or they already using the agent module on the new version 1.4?


Hi gonzogg,
as already wrote:

coborop wrote:
The main idea is to
- clone an empty (or already running) a2b installation, into different folders
- clone the a2b database
- change some configuration options in a2b and asterisk
- force in 'readonly' some fields in the a2b gui

by doing that,
you will obtain a separate a2b platform, with both admin and customers
backends,
with no resources overhead on the machine: not on asterisk, nor the web
server, neither the database.

The strongest lack of this solution is total indipendence between clones:
you won't have the ability to centralize the clones in order to obtain, for example,
viewing of your profits in real-time.
However, by understanding this patch, you will be able to rearrange this
whole thing to better fit your needs.

I suggest to accomplish this how-to a minimum knowledge of the a2b codebase and folder structure.


Are you still interested ?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 09, 2008 12:24 am 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
Yes Mike, this is something it will work for me. I am traveling, but as soon as I get back I will tell you were I get stuck


Top
 Profile  
 
 Post subject: How to
PostPosted: Tue Aug 12, 2008 10:27 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
This is what I understand I have to do on each step. Please understand I am not very familiar with Linux yet.

-
Quote:
change your current working directory in /etc/asterisk

-
- Could you explain what to do here?
-
-
Quote:
create another context in extensions.conf, poiting to another a2billing agi script,
something like, for example:

[a2billing2]
exten => _X.,1,DeadAGI,a2billing2.php
exten => _X.,2,Wait,2
exten => _X.,3,Hangup

-
- I copy this to extensions.conf

-
Quote:
clone the a2b database

-
echo "GRANT ALL PRIVILEGES ON *.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;" | mysql -ppassw0rd

mysqladmin create mya2billing2 -u a2billinguser -pa2billing

mysql mya2billing2 -u a2billinguser -pa2billing < a2billing-mysql-schema-MYSQL.3.X-4.X_v1.3.0.sql
-

-
Quote:
touch and give write access to the web server user to /etc/asterisk/additional_a2billing_sip2.conf and /etc/asterisk/additional_a2billing_iax2.conf

-
- touch /etc/asterisk/additional_a2billing_sip2.conf
- touch /etc/asterisk/additional_a2billing_iax2.conf
-
- chmod 666 /etc/asterisk/additional_a2billing_sip2.conf
- chmod 666 /etc/asterisk/additional_a2billing_iax2.conf

-
-
Quote:
copy /var/lib/asterisk/agi-bin/libs_a2billing in /var/lib/asterisk/agi-bin/libs_a2billing2


- Copied

-
Quote:
change the includes in /var/lib/asterisk/agi-bin/a2billing2.php from line 27 to 32


include_once (dirname(__FILE__)."/libs_a2billing/db_php_lib/Class.Table.php");
include (dirname(__FILE__)."/libs_a2billing2/Class.A2Billing.php");
include (dirname(__FILE__)."/libs_a2billing2/Class.RateEngine.php");
include (dirname(__FILE__)."/libs_a2billing2/phpagi_2_14/phpagi.php");
include (dirname(__FILE__)."/libs_a2billing2/phpagi_2_14/phpagi-asmanager.php");
include (dirname(__FILE__)."/libs_a2billing2/Misc.php");
-
Quote:
change the define in /var/lib/asterisk/agi-bin/libs_a2billing2/Class.A2Billing.php on line 21


define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing2.conf');
-
-
-
Quote:
copy /var/www/A2Billing_UI in /var/www/A2Billing_UI2


- /var/www/html/A2Billing_UI copied to /var/www/html/A2Billing_UI2
-
Quote:
change the define in /var/www/A2Billing_UI2/lib/Class.A2Billing.php on line 21


define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing2.conf');

-
Quote:
change the load_conf in /var/www/A2Billing_UI2/lib/defines.php on line 9


$A2B -> load_conf($agi, AST_CONFIG_DIR."a2billing2.conf", 1);
-

-
Quote:
copy /var/www/A2BCustomer_UI in /var/www/A2BCustomer_UI2
-


- /var/www/html/A2BCustomer_UI copied to /var/www/html/A2BCustomer_UI2
-
Quote:
change the define in /var/www/A2BCustomer_UI2/lib/Class.A2Billing.php on line 21

-
define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing2.conf');
-
Quote:
change the load_conf in /var/www/A2BCustomer_UI2/lib/defines.php on line 10

-
$A2B -> load_conf($agi, AST_CONFIG_DIR."a2billing2.conf", 1);
-

-
Quote:
add the lines:
#include additional_a2billing_sip2.conf
and
#include additional_a2billing_iax2.conf
to the /etc/asterisk/sip.conf file

- Added
-
-
Quote:
copy /etc/asterisk/a2billing.conf in /etc/asterisk/a2billing2.conf

- Copied
-
Quote:
and change the database section to point to the newly created a2b database
clone.

-
[database]
dbname = mya2billing2
-
Quote:
You may also want to change the 'backup_path' option,
buddy_sip_file and buddy_iax_file to something like
/etc/asterisk/additional_a2billing_sip2.conf and /etc/asterisk/additional_a2billing_iax2.conf,

-
- Don’t see this on the backup section
-
Quote:
force the 'context' option in the 'peer_friend' section to something like
'a2billing2'

-
context = a2billing2
-
Quote:
and, in general, change the other options to make them point to the new
clone.

- you may also want to force in 'readonly' some fields in the a2b customer
back-end,
to prevent them being changed by the reseller.

For example, if you want to force the context field of the sip friend, you can
add the 'readonly' attribute to the
/var/www/A2BCustomer_UI2/Public/form_data/FG_var_friend.inc file on line 296,
like that:
"size=40 maxlength=40 $CONTEXT_default readonly",

- Can’t find this in 1.3.3
-
-
Quote:
And, for example, if you want to change to 'readonly' also the buying
price field of all the rates,
you can change the
/var/www/A2BCustomer_UI2/Public/form_data/FG_var_def_ratecard.inc file on
line 130 like this:
"size=30 maxlength=20 readonly",
then do the same on lines 139 and 148
-

- Can’t find this in 1.3.3
-

-
Quote:
harden the a2b login routine, by editing, in every clone, the file:
~A2Billing_UI*/lib/module.access.php
and force a2b to re-check the credentials in every page, by adding,
around line 135, just before the "FUNCTIONS" part, this:

$DBHandle = DbConnect();
$return = login ($_SESSION["pr_login"], $_SESSION["pr_password"]);
if (!is_array($return) || $return[1]==0 ) {
header ("HTTP/1.0 401 Unauthorized");
Header ("Location: index.php?error=1");
die();
}


- Added
-


Top
 Profile  
 
 Post subject: Re: How to
PostPosted: Wed Aug 13, 2008 12:34 pm 
Offline
User avatar

Joined: Sun Jul 22, 2007 4:07 pm
Posts: 26
Location: Rome, Italy
Hi gonzogg,

gonzogg wrote:
- Don’t see this on the backup section


the backup_path should be on line 311 of the A2Billing's 1.3.3 a2billing.conf sample file

gonzogg wrote:
- you may also want to force in 'readonly' some fields in the a2b customer
back-end,
to prevent them being changed by the reseller.

...
...

- Can’t find this in 1.3.3
...


this is where I was wrong:
you may want to force in 'readonly' some fields in the a2b ADMIN back-end, not in the customer back-end.

So please change

/var/www/A2BCustomer_UI2/Public/form_data/FG_var_friend.inc
with
/var/www/A2Billing_UI2/Public/form_data/FG_var_friend.inc

and

/var/www/A2BCustomer_UI2/Public/form_data/FG_var_def_ratecard.inc
with
/var/www/A2Billing_UI2/Public/form_data/FG_var_def_ratecard.inc

while I confirm the lines location.

Feedback is welcome.


Top
 Profile  
 
 Post subject: First step
PostPosted: Wed Aug 13, 2008 7:06 pm 
Offline

Joined: Thu May 15, 2008 1:29 pm
Posts: 70
Location: Miami
I will try as soon as I can. What about the first line?

Quote:
change your current working directory in /etc/asterisk


Top
 Profile  
 
 Post subject: Re: First step
PostPosted: Thu Aug 14, 2008 10:11 am 
Offline
User avatar

Joined: Sun Jul 22, 2007 4:07 pm
Posts: 26
Location: Rome, Italy
Hi gonzogg,

coborop wrote:
change your current working directory in /etc/asterisk


that means:
cd /etc/asterisk

http://en.wikipedia.org/wiki/Chdir


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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