Ever wonder how much is left on your prepaid account.  Worried you're getting low.

Les.Net has provided a web query to allow you to check.  Now, the next part is getting it to your phone…We've solved it…at least for the Aastra sets…

 

Begin by downloading  LESNET_Balance.tar (revised Apr 15 2008 9pm) and untarring the file.  Three parts…

1. The "add_to_extension.conf" file is exactly that…you just need to figure out where.  I've got this line right before my Hangup such that I read my balance every time I disconnect.  Change the xxxxx and yyyyy to your account and password for your lesnet account.

2. Move the balance.php (revised as of Apr 15) file to the aastra directory in your folder (likely /var/www/aastra or /var/www/html/aastra depending on what OS you're running).

3. The remaining two files are my versions of the onhook and register events files.  At the minimum, you need to find the line containing "LESNET" in each and put it in your respective onhook.php and register.php files. 

Reload your asterisk after changing the extension.conf and you're ready to go. 

If I was to do it again, I'd actually read the $User variable and probably create a include file instead which would have a lookup to see which users should get the data displayed.  I could likely do it easy enough by making it part of the variable too.  Food for though for another time… until then…enjoy