Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 11:17 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: admin and cutomer UI on another web server
PostPosted: Sun Sep 16, 2007 10:09 pm 
Offline

Joined: Wed Sep 12, 2007 2:02 pm
Posts: 12
I have tried to upload the files for the customer and admin web interface to another web server. I have also copied the a2billing.conf over to the web server that will be hosting the user interface...

When I try to access.. I get the following:

Invalid card number lenght defined in configuration.

Is it because I have renamed the directory from A2Billing_UI? or whats the problem?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 18, 2007 12:29 am 
Offline

Joined: Wed Sep 12, 2007 2:02 pm
Posts: 12
anyone? ;-(


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 19, 2007 8:13 am 
Offline

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

Can you confirm that you have put a copy of your a2billing.conf in the /etc/asterisk/ directory of your webserver and that the database settings are set to point at your database, and the port settings are correct (MySQL=3306).

There should still be a copy of a2billing.conf in the original web server, but the database settings will point to localhost.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 5:35 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I confirm that jroper is right. We have successfully installed a2customer and the signup on a totally separated server. But they are all accessing the same database for the moment. We have a copy of a2billing.conf on the web server that need to be kept slightly in sink with the one on the asterisk box but that job is a nightmare.

One more thing. Personally, I think that it's not a good idea to feed a customer web site with data pulled from the same DB as the asterisk box. We have notice great degradation in the sound quality every time the we server receives many hits and pull many data from the database. Because of that, we are starting to think about a way to replicate automatically the database in real time and have the web connected to the replicate database. If anyone has started working on such thing, please let us know.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 6:09 am 
Offline

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

You could just move the MySQL server onto a different machine, and change the database parameters in A2Billing.conf to suit.

This would give you three machines:-

    Web (Admin and Customer)
    Asterisk - you can have many asterisk servers controlled one A2Billing database.
    Database server.


Your challenge however is to replicate the A2Billing SIP and IAX files, which would normally end up on the Web server. You could do this with rsync or use asterisk realtime. I have not done any work so far on realtime so over to someone else for comments on this.

I've only just thought of this as I write, but there should be no reason why the A2Billing_UI pages stay on the asterisk server, as the web loads will be very light (One admin person doing admin stuff, and the occaisional signup) while the A2BCustomer_UI is on a separate server, where the loads are greater, refering to a 3rd server which contains the database.

Indeed, the database and A2BCustomer_UI could be on the same server, while A2Billing_UI and Asterisk stay on the first. (with an eye to database security naturally)

This will ensure that voice quality is at its best, you should not have any issues with a2billing iax and sip replication, and you have only used 2 servers.

Thoughts anyone?

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 6:10 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
asiby wrote:
We have notice great degradation in the sound quality every time the we server receives many hits and pull many data from the database.


Did you prioritize asterisk over http,sql ? I think, just playing with the nicelevels there may drastically improve that situation.
Which kernel ver. are you using? Which scheduler, if on 2.6 ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 6:52 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Thanks for your suggestions. They all sound very good.

No, I haven't played with the priority levels.

About moving the DB on the Web server, I thought about that too, but I also thought that the same problem will remain. It's true that the Asterisk Box will be mainly running Asterisk, but the "a2billing.conf" AGI will be doing constant data transfer with a distant database. That may increase the delay during the establishment of calls. And depending on when you web site will be located, it make render your whole system very vulnerable.

I know that I am being to demanding but my idea is the following:

- Use a main box with a2billing and asterisk and the db server

- Configure another db server. Note that this can constitute a cluster with the main db server. But it that ends up too difficult for the moment, we can make sure that every query that store or update the database will use transaction based connection make sure that the 2nd DB and an exact copy of the 1st one.

- Most cross DB updates will go from the main db to the backup DB

- In some rare cases, updates will go from the backup db to the main db (ex. Customer updating informations, reseller entering/updating new clients, etc.)

- Any application, other than "A2Billing trying to manage calls", will need to connect to the backup database to do their stuff (ex. reporting, general accounting, clients playground, reseller interface, etc.)

That's my vision of this.

One other thing is for those who can afford it. I encourage the use of additional asterisk boxes that will make the actual calls while the box containing a2billing itself will manage the other boxes. This feature is already available in a2b.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 7:01 am 
Offline

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

I can see what you are saying about the fact that there may be a delay in establishing calls, but I reckon this will only be milliseconds, and almost certainly less than 1 second, which I do not think your customer will even notice.

After, all E164.org seem to manage OK with the enum lookups, and they have a much bigger database.

The only calls to the database should only be on set-up and tear down of the call.

Clearly for security, having a well protected separate database server would easiest to secure.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 7:21 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I wasn't referring to security. I was picture the situation where someone would put his database and website on a hosting server instead of having his own "arsenal". That may lead to uncomfortable situations. For example, for many unpredictable reason, the DB may be unreachable (DNS problem, scheduled shutdown due to server maintenance, and the list goes on)

Maybe I am just freaking out for nothing. But I am pretty sure that big guys like E164.org must have a huge number of servers/mirrors scattered across the planet to prevent a catastrophic failure.

I still will feel safer with a near to bullet proof DB system. I have been reading about MySQL cluster but I am not sure yet if it is the right solution. I need to compare it to something that can be considered viable and a reasonable match


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 8:09 am 
Offline

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

Yes you are certainly right about the remote hosting - I lost my website for a day because of the flooding in the UK last month.

My view would be that you have to balance the likely cost of an outage and the likelyhood of that outage against the cost of clustering in terms of the increased maintenance, the initial cost of the hardware and the hosting, and opportunity cost.

There is a danger that you can take precautions against failure too far, and I have seen this become something of an obsession, where the scale of the redundancy solution far outwieghs the revenue and potential for loss.

asiby, I'm not suggesting for one moment that you fall into this camp;-)


Therefore:-

Lots of customers, business class customers, potential loss of confidence, big revenue losses = Cluster + Multiple internet feeds from different corners of the building + UPS + Generator + Multiple VoIP providers +++

Many residential customers, making few calls each, back up regularly and often, and use server class hardware with RAID + UPS and consider warm swap.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 21, 2007 8:12 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Your are probably right. Thanks for the advice.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 04, 2008 2:37 am 
Offline

Joined: Fri Jan 04, 2008 1:24 am
Posts: 22
Location: Ottawa, Canada
Asiby,

Were you successful in getting your configuration working? I am trying to do a similar thing, however, I am having a hard time trying to distinguish which part of A2B would act as a client, and which part as a backend server. In short, is it necessary to have all my boxes running Asterisk for A2B to work?

The following is the setup I am trying to achieve:

Asterisk Box A ->
<Database /Web Server>
Asterisk Box B ->

Essentially, i have 2 Asterisk boxes (A and B) which communicate with a 3rd box that's running a Database, and a Web Server.

a) Where did you place your A2Billing install?
b) How were you able to distinguish between the CDR records from Box A, and Box B within the database?

Thanks,

razor


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 04, 2008 3:46 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Hello Razor.

I have been able to do it. I have the following configuration

Box1: A2B+MySQL+Asterisk+AdminUI
Box2: Asterisk
Box3: Asterisk
Box4: Asterisk
Box5: Asterisk
WebSite: CustomerUI

Box1 was the classic A2Billing Box as most of us know it. But Box2, 3, 4 and 5 have only Asterisk and a copy of a2billing.php agi script.

The only boxes which a "required" to have asterisk are the boxes you are going to send calls from (through termination providers) and the box that you are going to receive calls on (from DID providers).

For the location of the main a2billing installation, we had no choice. Due to the way a2billing was designed, we had to have the main AGI running on Box1 where all the inbound DID numbers are being sent.

You can have MySQL (or Postgres) on it's own machine and the web server with the Admin and Customer UI on their separate machine too or the same Box as MySQL.

For the CDR, we could not distinguish between CDR sent from Box1, 2, 3, 4 or 5. So we have left all the CDR on their own machines for the moment. But you can use CDR Custom to add custom field to the CDR if you want.

I have recently installed the MySQL CDR modules for Asterisk and it seems to Work Well. So we are going to simply send all the CDR at the same location (in the Database) cause even though we have many asterisk server, we want it to look like a simple huge server from administrators point of view (just 1 CDR). On the other hand, by hacking a2billing, we can have it to write the server name in A2B's CDR. Unfortunately, that's just a partial solution, cause multiple server topology in A2B only works for callback. Other modes have not been design to dispatch call to other servers than localhost. That is even more true for the 1st leg of a regular inbound call coming from a DID providers. There is virtually no way to decide to re-receive that inbound call on another Box if Box1 is overloaded.

That's why we are starting to check SER out. After thorough reading, we have decided to go with SER. And despite what people are saying, we believe that A2B can work with SER without any major modifications. It will save our lives. :lol:

PS: In addition, if all the boxes are behind a firewall, you will need to assign a different port for SIP, IAX and RTP Streams for each asterisk box just to be on the safe side. I am sure there is more but I can't recall it all.

Does that give you a better idea of the situation?

Added after 8 minutes:

I have just remembered. We are configuring a FastAGI server and A2Billing will be called directly from remote Asterisk Boxes without having any a2billing on themselves. And we will configure Asterisk Realtime and use it partially. We will keep some provider settings specific to some Asterisk Boxes, but All extensions and configuration that can stay common to all boxes will be pulled from the same database.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 04, 2008 3:46 am 
Offline

Joined: Fri Jan 04, 2008 1:24 am
Posts: 22
Location: Ottawa, Canada
Hi Asiby,

Thank you so much for your response. Your description has certainly given my the insight that I needed. Based on this info, along with this other post that I found (http://forum.asterisk2billing.org/viewtopic.php?t=2441&highlight=database), I will commence the install. Once i get started, I may have additional questions, I hope you don't mind.

Cheers,

Razor


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 04, 2008 3:48 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I don't mind. Send as many questions as you can think of. Sometimes, questions made us realize that we have missed something or that we should do it another way.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
VoIP Billing solution


All times are UTC


Who is online

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