asterisk2billing.org
http://forum.asterisk2billing.org/

reseller module, again
http://forum.asterisk2billing.org/viewtopic.php?f=15&t=2436
Page 2 of 4

Author:  ash [ Fri Feb 29, 2008 5:02 am ]
Post subject: 

Perfectly makes sense. Brilliant idea.

But this will require the call to hop from one a2b agi to another a2b agi ... not such a big deal, but still 2 seperate processing ...

Wouldn't it be nice just to have a step somewhere which just checks the balance before proceeding with the call ...

Waiting to hear more experts comment ...

Author:  stavros [ Fri Feb 29, 2008 9:15 am ]
Post subject: 

I do exactly what kk described. Admittedly it's horribly inefficient to maintain every call on 1 extra Asterisk server for each 'layer' of reselling.
For the moment the overhead of this isn't causing me any trouble, but when my monitoring indicates we're starting to stretch the legs of the servers I'm intending to take another look at this. Implementing the necessary changes to A2Billing should be fairly trivial. Of course, if you're in the mood for development, patches would be very welcome.

Author:  MatBoy [ Tue Mar 04, 2008 2:53 pm ]
Post subject: 

Ok, you can make resellers like described at the previous page, but what about the buy rate that you want to set for your sellers... that will be a problem I think.

Author:  stavros [ Tue Mar 04, 2008 3:02 pm ]
Post subject: 

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.

Author:  MatBoy [ Tue Mar 04, 2008 3:25 pm ]
Post subject: 

True, but why don't we make a hack than where a reseller is actually an administrator that can only see his own customers and where his buy rates are solid and set by the root of the system.

I'm just still brainstorming what would be the best way to get to this :)

Author:  imitrik [ Wed Mar 12, 2008 2:12 pm ]
Post subject: 

Nice job coborop! It works very good. But I was wondering, what about local calls between different instances of A2B ? How would customers be able to make free calls between themselves, meaning, for example, if they have got an account from a different reseller?

Has anyone some solution to post for this? coborop maybe?

Author:  MatBoy [ Wed Mar 12, 2008 2:33 pm ]
Post subject: 

Good one, I would like to know this one too.

Author:  graher01 [ Wed Mar 12, 2008 5:09 pm ]
Post subject: 

krzykat wrote:
I haven't used a reseller module yet (can't wait to get into that), but if you've got 2 A2B's back to back, then I assume you would just have your first A2B system with the reseller's account as the trunk that he uses to process all of his calls.

System A = your main system
System B = reseller's virtual system

System A has a A2B user created that is Wholesaler (B)
System B sets up a SIP trunk to System-A as he is a user of this system.

Did I make any sense on this? Your system is the provider for the Virtual system. So he can't use more than you allow him with his account on System-A.


My suggestion to the reseller module would be to add a field to all the tables involved in the operation of the a2billing and the main account woud be 0 and for resellers an account would be created just like the pin number and once the reseller is logged in his account# would be globally set and every acction he take the account number would be used to save new customers or retreive new customers new trunk ect. it is just an Idea I am trying to create something like this but I am not an Expert in PHP I am a beginner and but I think something like that would work quite nicely.

Author:  coborop [ Fri Mar 14, 2008 11:28 pm ]
Post subject: 

imitrik wrote:
Nice job coborop! It works very good. But I was wondering, what about local calls between different instances of A2B ? How would customers be able to make free calls between themselves, meaning, for example, if they have got an account from a different reseller?

Has anyone some solution to post for this? coborop maybe?


Hi imitrik, hi Matboy, unfortunately I have don't have any installation with this need
so I've never dig the code to permit a feature like that.

If a customer of mine happens to ask me this,
if successful, I'll share the hack here.

Have a nice day,
mike

Author:  coborop [ Mon Mar 24, 2008 6:37 pm ]
Post subject:  A2B "Clones" security flaw and patch

Hi All,

to everyone is using my solution, or a derivate of it,
I found some time to patch a serious security flaw in that hack.

You may have noticed that, by having, for example, two clones,
you can:
* authenticate as an admin in one clone, let's say: http://1.2.3.4/A2Billing_UI_1/
and once correctly authenticated,
change the url in, for example,
http://1.2.3.4/A2Billing_UI_2/Public/A2 ... &section=1
to enter in the second clone's admin UI, without providing any credentials.

I've consequently edited my previous post, the one documenting this hack, to include this patch.
For your convenience, I'm reporting it also here:

- 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();
}

Regards,
Mike

Author:  asiby [ Tue Mar 25, 2008 1:59 am ]
Post subject: 

I have also noticed that problem a why ago. I have trace the issue to the file module.access.php. The code is:

Code:
if (!isset($_SESSION)) {
   session_name("UIADMINSESSION");
   session_start();
}


IMHO, this code should be changes the session name of your clones version of the admin UI. Your both clones are running on the same server and have the same domain name/IP. In addition to that, the identical session name can only lead to a very predictable behavior. This does not happen between different domains. The only annoying thing that I found about the interface is that when you logout from the Customer UI, any Admin UI on the same domain and the same browser will also be logged out. Even though the session names are different.

Cheers

Author:  coborop [ Sat Mar 29, 2008 8:03 pm ]
Post subject: 

Hi asiby,

my first attempt to fix that bug was to dig for cookies name ... session names ... something like that. In fact I was hoping to find a unique identifier to recognize the session.

I prefer your solution but I can't replicate it.
I've changed around line 40 the file lib/module.access.php from:

session_name("UIADMINSESSION");
session_start();

to

if (!isset($_SESSION)) {
session_name("UIADMINSESSION");
session_start();
}

and gave a different name than "UIADMINSESSION" to both clones,
but the problem still persists.

However, I think that your solution is more toward the right direction
than my poor patch.

Thanks for your time.

Regards,
Mike

Author:  asiatel [ Thu Jul 03, 2008 10:29 pm ]
Post subject:  Reseller Module

I am looking for reseller module with following features:

Owner can creat multiple reseller accounts.
Owner can setup credit limit for each reseller and reseller batches stops when the reseller balance get to null.
Owner can charge reseller either by a rate table or commission basis.
Reseller can charge the end users based on plan/packages, fixed per minute rates or commission etc. reseller may have option to creat commision agent.
reseller can brand their website running on A2billing servers virtual direcotry.
reseller can have reporting avaialble for profit and usage for thier accounts
Owner can view reports for one or all resellers for usage/profit etc.

I am willing to contribute in donation if support can help me for this task? It will also be good for all comunity looking for same features. Please let me know if some one can.

Author:  stavros [ Fri Jul 04, 2008 1:47 am ]
Post subject:  Re: Reseller Module

asiatel wrote:
I am willing to contribute in donation if support can help me for this task? It will also be good for all comunity looking for same features. Please let me know if some one can.
I'm sure if someone were to put a bounty of EUR 10,000 out there, this work could be completed in a few months, perhaps less.

Author:  asiatel [ Thu Jul 24, 2008 4:14 am ]
Post subject:  Reseller module,, clonning idea not so cool

Clonning of the A2B is may be good for system partitioning but it is not the actual solution people are looking for. Becuause system owner can not control the prepay fund of the each clone partition user. So that means each clone owner is unrestricted and can use like he is the owner of switch. Community is still seeking for real reseller billing module.

Page 2 of 4 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/