How to install a2billing callback daemon on Elastix

Written by admin on November 22, 2014. Posted in A2billing, Elastix

If you follow the installation procedures given on forums you will notice that after installation either your callback daemon shows it has started but if you try to get status using command "service a2b-callback-daemon status" It shows that its not running. or it fails to even start at all. This is not because the installation procedures are wrong. This happens because of the SQLalchemy version that is default with python 2.4. Callback daemon does not run on any SQLalchemy version less than 0.6. The next procedure shows how to correctly install the callback daemon on Elastix without problems.

The first thing you need to know is that the directory of a2billing is different on Elastix from the ones you find on many forums. The correct folder is /usr/share/a2billing.

So now lets install the Daemon.

Login via ssh

# cd /usr/share/a2billing
# yum -y install python-setuptools.noarch
yum -y install MySQL-python
easy_install sqlalchemy

You will notice that the Sqlalchemy version installed is 0.3.x-py2.4.egg

You need to remove this and install a newer version

*If you had not installed SQLAlchemy for the below instructions just follow the ones in blue

# rm -rf /usr/lib/python2.4/site-packages/SQLAlchemy-0.3.11-py2.4.egg

#cd  /usr/lib/python2.4/site-packages/

# rm -rf sqlalchemy

# rm  -rf  SQLAlchemy-0.3.11-py2.4.egg-info


# tar zxvf SQLAlchemy-0.7.10.tar.gz

# cd SQLAlchemy-0.7.10

# python install

*If you had not installed SQLAlchemy for the above insttructions just follow the ones in blue

Change to callback directory

# cd /usr/share/a2billing/CallBack/callback-daemon-py
# cp callback_daemon/a2b-callback-daemon.rc /etc/init.d/a2b-callback-daemon
# chmod +x /etc/init.d/a2b-callback-daemon
# cp dist/ /tmp
# cd /tmp
# tar xvfz
# cd
# python build
# python bdist_egg

Now install Daemon

#easy_install dist/callback_daemon-1.0.prod_r1528-py2.4.egg

chkconfig --add a2b-callback-daemon
service a2b-callback-daemon start
chkconfig a2b-callback-daemon on