Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sat Apr 27, 2024 8:48 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Creating FreePBX extentions automatically with A2Billing!
PostPosted: Wed Aug 15, 2007 3:53 pm 
Offline

Joined: Mon Aug 13, 2007 4:10 am
Posts: 36
Hi i would like to know if anyone out there has any idea on how to make A2Billing create a FreePBX extension when you create a new Customer.

For example i want to create a new customer in A2Billing and i want it in stead of creating a sip friend for that customer to create an extension in FreePBX. So that when i go to FreePBX interface the extension is there and ready to use.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 15, 2007 6:10 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
I'm not sure whether it is so easy to create a FreePBX extension, unless you know something about PHP scripting and creating records in MySQL.

However, it's pretty trivial to create a FreePBX extension, and have an A2Billing account created the first time they dial out.

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 15, 2007 6:29 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I believe that if you use Asterisk Realtime, this will be possible.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 2:34 am 
Offline

Joined: Mon Aug 13, 2007 4:10 am
Posts: 36
i dont know about mysql, because i thought that the php script created the extention in the a2billing extension conf files to be used by asterisk. Which is almost exactly the same as the details that are put int he freepbx extension conf files. So what i had thought was that in stead of putt the extension in the A2billing file, for it to be put in the FreePBX file hence showing up on the Freepbx extensions list on the interface.

this is just a wild guess but it sounds doable. doesnt it?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 3:37 am 
Offline

Joined: Mon Jun 19, 2006 5:14 pm
Posts: 218
what you said would be true if all you are trying to do is add contexts in the sip.conf file. but i don't think you are implying that

if what you desire is to create extensions that are manageable by freepbx then it takes more effort than just writing out the contents into the sip file.

if you doubt me take a look at the database asterisk and see in how many tables the extensions actually get referenced and used in some form or the other


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 6:12 am 
Offline

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

Both systems work in broadly the same way.

A fairly simplistic explanation is that MySQL database records are updated when you type stuff into their GUI, such as adding extensions and ring groups in FreePBX, or new customers in A2Billing.

When you click the red button at the top, the system works through the databases and recreates the configuration files in /etc/asterisk from the records in the MySQL database.

Finally, the system does an asterisk reload, where asterisk reads the text based config files, which makes asterisk do what you wanted it to do.

In terms of FreePBX, once the records have been turned into text files, then the database is pretty much redundant until the next time you want to change the config. This is not entirely the case with A2Billing, as the DB is needed for other things (in fact just about everything else other than SIP and IAX extensions)

So if you wanted to do what you describe, one of the methods would be to copy the A2Billing data over to the appropriate table in the freePBX database, then get FreePBX to recreate it's text files, followed by a reload.

Having said this, there are possibly more elegant ways of doing what you want to do without creating 2 extensions for each user in Asterisk, but to make suggestions, we would have to have a better idea of what you wanted to finally achieve.

For instance, if you wanted to use say conferencing in FreePBX from an A2Billing customer, and charge for it, or present some IVR menus to an A2Billing customer, one of the fairly easy ways of doing this is creating a trunk to FreePBX.

In A2Billing, change the Trunk technology to type "local" (rather than SIP orIAX2), and in the trunk name, type "from-internal" finally in A2Billing.conf, change switchdialcommand = NO to YES

Finally, make sure you have a rate for the FreePBX destination. You should then be able to access all the extensions, ringroups, conferences etc that you have created in FreePBX, as well as use the FreePBX Outbound routes to make external calls.

However, what security holes, and other issues that may be created by this course of action would need further investigation, so usual caveats apply, in other words you are on your own.

Yours

Joe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 16, 2007 7:35 am 
Offline

Joined: Mon Aug 13, 2007 4:10 am
Posts: 36
jroper your a genius! thats exactly what i needed it for. I needed to be able to use FreePBX features such as the ring group.

What i actually was planning on doing was to create a customer in A2Billing then create a FreePBX extension for that customer and have FreePBX outbound trunk setup to go to a2billing, and have the customer caller id on A2Billing that of the extension on FreePBX.

But your method if it works sound MUCH more better because then i can create the customer AND the sip freind in A2Billing and use FreePBX routing and features at the same time.

I am just trying to get my head around this setup that you said would work but cant seem to get a handle on how it would work...if you can list those steps with a tiny bit more detail it might sink in, but ill give it a try now anyways and see if i can understand by doing

Once again THANKYOU jroper!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 9:47 am 
Offline

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

There is very little detail I can add for you that has not already been said.

In FreePBX, the "from-internal" context is pretty much where everything within the PBX is accessable from.

So once you have created a trunk in A2Billing (technology = local and name = "from-internal") you should be able to access any extension within FreePBX, provided that you have a rate for that extension.

E.G., create a ringroup 600, and put some extensions in it, put a rate in for extension 600 in the rate table (attached to a callplan), and then pick up your A2Billing extension and make a call to extension 600, and the call should be passed through to your nearly created ring groups.

Then using your misc. destinations module in FreePBX, and some imagination, you can pretty much create whatever you want to do with FreePBX, while dialling in from A2Billing.

Yours

Joe


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


All times are UTC


Who is online

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