Asterisk Realtime dont work with A2Billing

Hi all. I am really tired of looking for a solution in this forum for integrating my A2Billing with Asterisk Real Time, so I need some help before killing me.

My configuration is the following:

  • OS: Cent OS

  • Asterisk

  • A2Billing 1.8.5

  • FreePBX

  • MySQL

  • Parameter “use_realtime” in A2Billing is “yes”

  • /etc/asterisk/extconfig.conf:

sipusers => mysql,general,cc_sip_buddies
sippeers => mysql,general,cc_sip_buddies
iaxusers => mysql,general,cc_iax_buddies
iaxpeers => mysql,general,cc_iax_buddies
extensions => mysql,general,cc_sip_buddies

  • /etc/asterisk/res_mysql.conf:

dbhost =
dbname = asterisk
dbuser = root
dbpass = XXX
dbport = 3306

dbhost =
dbname = mya2billing
dbuser = root
dbpass = XXX
dbport = 3306

  • I am using the root user to access the databases

  • All my files in /etc/asterisk have 777 permissions.

  • In Asterisk console:

realtime mysql status
global connected to asterisk@, port 3306 with username root for 58 minutes.
a2billing connected to mya2billing@, port 3306 with username root for 58 minutes.

sip show peers
Name/username Host Dyn Forcerport ACL Port Status Realtime
8004410 (Unspecified) D N A 0 UNKNOWN
8005555 (Unspecified) D N A 0 UNKNOWN
2 sip peers [Monitored: 0 online, 2 offline Unmonitored: 0 online, 0 offline]

OBS: These sip peers where added manually in FreePBX.

FreePBX and A2Billing web interfaces are working fine.

So, my problem is: I add customers in A2Billing but they are not listed in FreePBX.

Also, I just enabled and monitored mysql.log file and after adding a customer, A2Billing doesn’t even try to connect to Asterisk DB to add some extensions and other things.

So, is A2Billing responsable for adding records in Asterisk DB or do I have to enable some Asterisk cron job?

I really tried to search the forum and trie some suggestions but it didn’t work.

Any help would be very useful.

Thank you.


We gave you an answer on our forum.

in /etc/asterisk/res_mysql.conf, you have 2 sections, one called a2billing to connect to the a2billing database.

Therefore in your extconfig.conf, you need to set the realtime setting to use the a2billing database.

So replace by :
sipusers => mysql,a2billing,cc_sip_buddies
sippeers => mysql,a2billing,cc_sip_buddies
iaxusers => mysql,a2billing,cc_iax_buddies
iaxpeers => mysql,a2billing,cc_iax_buddies
;a2billing doesn’t provide extensions configuration
;extensions => mysql,general,cc_sip_buddies


Ok. I made some changes in my configuration files.

  • /etc/asterisk/res_myql.conf:

dbsock = /tmp/mysql.sock

  • /etc/asterisk/extconfig.conf:

sipusers => mysql,mya2billing,cc_sip_buddies
sippeers => mysql,mya2billing,cc_sip_buddies
iaxusers => mysql,mya2billing,cc_iax_buddies
iaxpeers => mysql,mya2billing,cc_iax_buddies
;extensions => mysql,general,cc_sip_buddies

I just have 3 questions right now:

  1. if I add a customer in A2Billing, do I have to see some new record in FreePBX’s Extension page added by ARA?

  2. I’m monitoring MYSQL’s log files and when I add a customer in A2Billing I can see it happening in A2Billing database, but I see nothing happening in Asterisk database. Do I have to see something happening in Asterisk DB?

  3. What more do I have to check to get ARA working? My web interfaces are OK.

Thank you.


Do you guys have some help for this problem?

Realtime really doesn’t work for me.

  • How do I know if Real time is working? If I add a customer in A2Billing this registry has to be added in FreePBX Extension pages?

  • How does Asterisk Realtime know that it has to add some records?

Still waiting for some help.

Thank you.