dellmont-credit-checker v4.5.3 [09 Sep 2019] by Dominic

Description

GNU/Linux program to notify if credit on one or more Dellmont/Finarea/Betamax voip provider accounts is running low. Once successfully tested it can be run as daily cron job with -q option and -m email_address option so that an email is generated when action to top up credit on the account is required. Can also run under MS Windows using Cygwin (https://www.cygwin.com/), or can be run as CGI job on Linux/Apache webserver.

Usage

dellmont-credit-checker.sh [option]

Conffile

A conffile should be in the same directory as dellmont-credit-checker.sh with name dellmont-credit-checker.conf, or if elsewhere or differently named then be specified by option -f, and should contain one or more lines giving the Dellmont/Finarea/Betamax account details in the form:
website username password [test_credit_level_in_cents/pence] [credit_reduction_in_cents/pence] [credit_recordfile]

where the test_credit_level_in_cents/pence is >=100 or 0 (0 means 'never send email'). If you don't specify a test_credit_level_in_cents/pence then the current credit level is always displayed (but no email is ever sent).

If you specify them, the credit_reduction and credit_recordfile work together to perform an additional test. The program will record in credit_recordfile the amount of credit for the given portal each time it is run, and notify you if the credit has reduced since the last time by more than the credit_reduction. This can be useful to warn you of unusual activity on the account or of a change in tariffs that is significant for you. Set the credit_reduction_in_cents/pence to a level that is more than you would expect to see consumed between consecutive (e.g. daily) runs of dellmont-credit-checker.sh e.g. 2000 (for 20 euros/day or 20 dollars/day).

Here's an example single-line conffile to generate a warning email if the credit on the www.voipdiscount.com account falls below 3 euros (or dollars):

www.voipdiscount.com myaccount mypassword 300

Temporary_Files

Temporary files are saved with 600 permissions in $TEMP which is set to a standard location, normally /tmp, unless it is already defined (so you can define it if you want a special location). Unless run with debug option, all such files are deleted after running - except the cookiejar file which is retained so it can be reused. (The same cookiejar file is also used, if found, by get-vt-cdrs.sh.)

Call Records History

You can use options -r and -t to download call records and appedn them to a specified file.

Options

-c [path] - save captcha images (if any) at path (default is current path)
-d debug - be very verbose and retain temporary files
-f [path/conffile] - path and name of conffile
-h show this help and exit
-l show changelog and exit
-m [emailaddress] - send any messages about low credit or too-rapidly-falling credit to the specified address (assumes sendmail is available and working)
-M "[month-year-page]" - specify a specific earlier month and page for call record history retrieval (with -r option) - format '/MM/YYYY/P'
-n delete any existing cookies and start over
-p pause on cookie expiry - wait 2 minutes if cookies have expired before trying to login (because cookies are usually for 24 hours exactly this should allow a second login 24 hours later without requiring new cookies)
-q quiet
-r [path/file] - specify a directory for call record history files (per website and account) - data is appended to any existing files
-s skip if captcha code is requested (e.g. for unattended process)
-t [char] - if extracting call records (-r), this specifies the field separator character (default comma)
-u set umask for any created files (default 177: files are readable/writable only by current user)
-v be more verbose

Portal List

Here is a list of websites / sip portals belonging to and/or operated by Dellmont. To find more, google &quot;is a service from dellmont sarl&quot; (with the quotes). Try a portal with dellmont-credit-checker.sh - it might work!

If one of these (or another which you know is run by Dellmont) does not work, run dellmont-credit-checker.sh with -d option and drop me an email attaching the temporary files (two or three per portal, password is stripped out anyway).

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run from the command line (CLI), are freely available and can be obtained by clicking on the links. Dependencies are shown and while in most cases written for a conventional Linux server, they should run even on a Raspberry Pi, and many can run under Windows using Cygwin. Email me if you have problems or questions, or if you think I could help with a programming requirement.

Debian/Ubuntu kernel and LVM Utilities

kernel-remove - GNU/Linux script to list the installed GNU/Linux kernels in a Debian-based distro (e.g. Ubuntu), and can be used to remove an unwanted kernel and related packages, updating grub appropriately. [ GNU/Linux-Debian/Ubuntu: 2010-15
]

lvm-usage - GNU/Linux script to show available disk space and how it is used; run as cron job to warn if usage is above a set percentage. Provides additional information if LVM is in use. [ GNU/Linux-Debian/Ubuntu: 2012-18
]

lvm-delete-snapshot - GNU/Linux script to remove LVM snapshot that has been left over by another process. [ GNU/Linux-Debian/Ubuntu: 2012-19
]

tiny-device-monitor - GNU/Linux program to test webpages (including password-protected) or machines to check they are live; use as a cron job for your own websites, for hardware presenting a webpage, or for any machines with a presence on your local LAN or on the internet. [ GNU/Linux: 2009-19
]

dutree - GNU/Linux program to show a tree-style list of files and directories at the specified location and greater than the specified size (default 1GB). [ GNU/Linux: 2012-15
]

disk-wiper - GNU/Linux script to wipe a disk drive comprehensively and also check it for bad blocks. For use on a surplus drive (not SSD, not GPT) before passing to a third party. [ GNU/Linux: 2011-16
]