This is a script written by Philippe Lindheimer that checks and read back the balance of a voipjet account. I have had for a while and lost track of and recently found.
It currently does not work and needs updating. it can be used to check the piaf service, but I don't have the knowledge to do so.
from the readme file
It currently does not work and needs updating. it can be used to check the piaf service, but I don't have the knowledge to do so.
from the readme file
This set of scripts was written to allow an asterisk dialplan to login to your voipjet account, check your balance and then
play back the balance to you. The various functions have been modularized to easily resue components of this in other
scenarios. It also has a script that will both email you when your account goes below a defined level, as well as update
a database table with the cost of each call that can be joined with the main CDR table for any records that get recorded.
(Only calls that resulted in a charge are added to this table).
Note - you can get voipjet CDRs from VOIPJET to check actual charges. This just makes it handy to update immediately. I have
checked it against one call and the calculated charge was the same as VoipJET's CDR info.
INCLUDED FILES:
getvoipjetbalance.php:
This is the main file, it will get_voipjet_balance() from the voipjetbalance.php file and then send the appropriate AGI
commands to speak what your curent balance is. Read the comments at the befining of this file to see how to add the login
information.
checkvoipjet.php:
This is the main file that is called from macro-hangupcall and will check on your balance as well as update the database
table.
voipjetbalance.php:
This contains the get_voipjet_balance() funtion. (I guess I should have swapped the names of these two files.
pl_agiclass.php:
A class that implents some of the AGI required commands.
voipjet_account_info.php:
See comments in getvoipjetbalance.php and checkvoipjet.php. This is where you can put your account information if you want
to leave getvoipjetbalance.php and checkvoipjet.php untouched and make it easy to send to others without accidently
sending out your account info, database passwords, etc.