multiSwitch – user manual
© TOPEX 2008 50
7.9.1 Pg SQL Billing
In order to activate Billing in PostGre SQL you need to configure the files –
“
/mnt/app/bin/pgsql_sip_pool
” and “
/mnt/app/cfg/pgsql_sip_pool.cfg
”.
The data base tables are created automatically by the multiSwitch application for the current
month and for the next two months. The billing tables are in the format “
billing_yyyy_mm
”.
Warning:
When the multiSwitch main application was updated with a new version where were added
new fields in billing you must change manually the billing tables (for the current month and for the
months for which it has been created) and to add the new fields!
Example for adding a new field in billing:
ALTER TABLE billing_2008_06 add column in_billing_profileid INT NOT NULL DEFAULT 0;
The multiSwitch application includes a PostGre SQL billing pool for redundancy.
First of all you must configure the file “
/mnt/app/cfg/exec.cfg
” as follows:
pgsql_billing 1/0 [configuration file name]
The command enable/disale pgsql billing pool. The field “configuration file name” is optional
and if it is set it specifies the configuration file which will be read on start. The default file is
“pgsql_sip_pool.cfg”.
pgsql_billing_alt 1/0 [configuration file name]
The command enable / disable the pgsql_billing pool for redundancy. The field “configuration
file name” is optional and if it is set it specifies the configuration file which will be read on start. The
default file is “pgsql_sip_pool.cfg”.
The second step is to configure the file “
/mnt/app/cfg/pgsql_sip_pool.cfg
”. The changes
made on this file are loaded automatically by “
pgsql_status
” application.
debug 0
The line above indicates that no debug is made on Pg SQL billing. 0 = no debug, 1 = min
debug, 2 = full debug.
conn_string dbname=softswitch host=127.0.0.1 user=softswitch
password=99softswitch11
The line above contains the connection string for connection to postgresql database.
7.9.2 My SQL Billing
In order to activate billing in My SQL you will need the configuration files
“
/mnt/app/bin/mysql_client
” and “
/mnt/app/cfg/mysql_client.cfg
”.
In the “
exec.cfg
” file the is inserted the line:
mysql_billing 1
Then is created the data base:
mysql -p
create database billing
use database billing