Card Status Reset Through Rating Engine and Monitor

Description:

To ensure that calling cards are left correctly set as available after each use, the system checks through the rating engine - which bills and detects a calling card call and number - and also through a special calling card monitor.

Then, each card reset count, one from the rating engine and the other from the monitor, is stored separately and if it happens to be that they differ in more than a set threshold or that the last reset has exceeded the time imit, all cards used from that server will be reset.


Configuration:

1) Create entry in crontab:
a) To edit crontab:
crontab -e
b) To run the Card Status Monitor script every 10 minutes:
0,10,20,30,40,50 * * * * /bin/sh /root/asterisk_tester/run_card_monitor


2) Make sure to have the file:
a) /root/asterisk_tester/run_card_monitor

Which content has the name of the server to check. It must match the server where is run:

wget --output-document='/root/asterisk_tester/card_monitor_test' 'http://host2.voip.comtel-networks.com/cgi-bin/CCs/ResetCardInUse.html?action=Automated%20Monitor'


3) Set also the name of the server in the files:
a) nano /usr/local/astpp/host.conf

Which content should be like this:
host=host2.voip.comtel-networks.com


4) Configure the DB tables, time and count difference thresholds:

a) File: /var/lib/astpp/conf/astpp-enh-config.conf

; ##########################################
; # Card Monitor Engine
; ##########################################
; minutes_threshold = 10
; re_sleep = 1
; cm_sleep = 2
; crc_difference = 3


5) Finally, Place the web page that checks the cards and acts depending on the counts within the httpd directory:
/www/comtel-networks/cgi-bin/CCs/ResetCardInUse.html


6) To see a demonstration, look at one of our servers:
'http://host2.voip.comtel-networks.com/cgi-bin/CCs/ResetCardInUse.html?action=Automated%20Monitor'


Related Content:

- Perl sudo
- screen
Description:

To ensure that calling cards are left correctly set as available after each use, the system checks through the rating engine - which bills and detects a calling card call and number - and also through a special calling card monitor.

Then, each card reset count, one from the rating engine and the other from the monitor, is stored separately and if it happens to be that they differ in more than a set threshold or that the last reset has exceeded the time imit, all cards used from that server will be reset.


Configuration:

1) Create entry in crontab:
a) To edit crontab:
crontab -e
b) To run the Card Status Monitor script every 10 minutes:
0,10,20,30,40,50 * * * * /bin/sh /root/asterisk_tester/run_card_monitor


2) Make sure to have the file:
a) /root/asterisk_tester/run_card_monitor

Which content has the name of the server to check. It must match the server where is run:

wget --output-document='/root/asterisk_tester/card_monitor_test' 'http://host2.voip.comtel-networks.com/cgi-bin/CCs/ResetCardInUse.html?action=Automated%20Monitor'


3) Set also the name of the server in the files:
a) nano /usr/local/astpp/host.conf

Which content should be like this:
host=host2.voip.comtel-networks.com


4) Configure the DB tables, time and count difference thresholds:

a) File: /var/lib/astpp/conf/astpp-enh-config.conf

; ##########################################
; # Card Monitor Engine
; ##########################################
; minutes_threshold = 10
; re_sleep = 1
; cm_sleep = 2
; crc_difference = 3


5) Finally, Place the web page that checks the cards and acts depending on the counts within the httpd directory:
/www/comtel-networks/cgi-bin/CCs/ResetCardInUse.html


6) To see a demonstration, look at one of our servers:
'http://host2.voip.comtel-networks.com/cgi-bin/CCs/ResetCardInUse.html?action=Automated%20Monitor'


Related Content:

- Perl sudo
- screen
Created by: mglucksmann, Last modification: Mon 31 of Dec, 2007 (03:00 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+