Asterisk Realtime setup for A2billing 1.9.4 !
It is useful to use Asterisk Realtime with A2billing. It does not require Asterisk to reload each time when you add/remove/change a customer. Also it allows you to share the A2billing database between multiple servers if you needed to do that. There are some performance advantages as well. If you need to create many customers it just makes more sense to use a database instead of putting them all in a flat text file.
*Assume you have already installed asterisk+a2billing
First add the following in /etc/asterisk/extconfig.conf
iaxusers => mysql,general,cc_iax_buddies
iaxpeers => mysql,general,cc_iax_buddies
sipusers => mysql,general,cc_sip_buddies
sippeers => mysql,general,cc_sip_buddies
extensions => mysql,general,cc_sip_buddiesThen add the following in /etc/asterisk/res_config_mysql.conf
[general]
dbhost = 127.0.0.1
dbname = mya2billing
dbuser = a2billinguser
dbpass = password (your defined password for a2billing database)dbport = 3306
;dbsock = /var/lib/mysql/mysql.sock
Now restart asterisk :
[general]
dbhost = 127.0.0.1
dbname = mya2billing
dbuser = a2billinguser
dbpass = password (your defined password for a2billing database)dbport = 3306
;dbsock = /var/lib/mysql/mysql.sock
Now restart asterisk :
#CLI core reload
To test it if working or not:
From Asterisk CLI>
>core show config mappings
Should show below lines:
Config Engine: mysql
===> extensions (db=general, table=cc_sip_buddies)
===> iaxpeers (db=general, table=cc_iax_buddies)
===> iaxusers (db=general, table=cc_iax_buddies)
===> sippeers (db=general, table=cc_sip_buddies)
===> sipusers (db=general, table=cc_sip_buddies)
In the A2Billing GUI go into System settings>Global and search for “realtime”. Change that setting to “yes”.
Comments
Post a Comment