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
|