menuimage

Description

Usage

Example

Options

Dependencies

License

Changelog

Download

My_Other_Sites

My_Programs

Comments

get-vt-cdrs v4.5 [27 Mar 2017] by Dominic

Description

For users of Dellmont's Voicetrading or VoipPro VoIP services (https://www.voicetrading.com or https://www.voippro.com), this command-line GNU/Linux script downloads one month's worth of CDR records, which can then be analysed (for instance in a spreadsheet). If month and 4-digit-year parameters are missing then it downloads data for the month before the current one (i.e. the last complete month).

This program depends upon the presence of dellmont-credit-checker.sh (available from https://www.timedicer.co.uk/programs/help/dellmont-credit-checker.sh.php) in the same location as get-vt-cdrs.sh. Before using get-vt-cdrs.sh you should ensure that dellmont-credit-checker.sh is able to run successfully from that location using a .conf file which must contain settings for www.voicetrading.com or www.voippro.com. This conffile must be specified on the get-vt-cdrs.sh command line with 'option' -f (which is therefore not optional).

The output file for call data is get-vt-cdrs-[year]-[month].csv at location specified by -o option (current directory is the default).

Tested (v2.0308) under CentOS, Cygwin and Devil-Linux.

Usage

get-vt-cdrs.sh [options] [month] [4-digit-year]

Example

./get-vt-cdrs.sh -o ~/vtcdrs -f ~/opt/dellmont-credit-checker.conf -s "\t" 2 2014

Options

-d - be very verbose and save debug data (password is stripped out)
-f [path/conffile] - path and name of conffile (required)
-h - show this help and then exit
-l - show changelog and then exit
-o [path] - output path (not optional)
-q - be quiet unless error
-s [delimiter] - specify output field delimiter (default: comma)
-u set umask for any created files (default 177: files are readable/writable only by current user)
-v - be more verbose

Dependencies

awk, bash, coreutils, curl, grep, sed, dellmont-credit-checker.sh

License

Copyright 2017 Dominic Raferd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Changelog

4.5 [27 Mar 2017] - add -u options (set umask, default 177), change output file extension from txt to csv
4.4 [29 Jun 2016] - temporary filenames with numeric userid not username
4.3 [25 Mar 2016] - bugfix
4.2 [15 Mar 2016] - make all files created secure (permissions 600), match to changes in dellmont-credit-checker.sh
4.1 [13 Oct 2015] - change default delimiter to comma, add header line
4.0908 [18 May 2015] - store/use cookiejar in /var/tmp
4.0907 [07 Sep 2014] - change to match new dellmont-credit-checker.sh
4.0807 [07 Aug 2014] - bugfix in last-day-of-month evaluation
4.0311 [11 Mar 2014] - added VoipPro.com and -s option
3.1107 [07 Nov 2013] - substantially changed, uses dellmont-credit-checker.sh to log in
3.0918 [18 Sep 2013] - corrected for new way to obtain credit level
3.0802 [02 Aug 2013] - retry downloading each day up to 4 times, improved help text, added -c option, documented and improved debug option, placed all intermediate files in temporary location
3.0531 [31 May 2013] - remove text message for days when there are no calls, add changelog

Download get-vt-cdrs.sh

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.

Backup Utilities

Debian/Ubuntu kernel and LVM Utilities

Dellmont / Three / Giffgaff / Vodafone - VoIP and Mobile Phone Account Utilities

Miscellaneous Programs

Comments

jan van niekerk 05 Mar 2012, 12:02
I'm very interested in this script, but it gives me syntax errors.
Im running this on a asterisk machine with centos5.
Dominic 09 Mar 2012, 11:03
Updated this script to 2.0308 for better input error-checking, and tested under Centos 6.2-x64.
Sam 21 May 2013, 19:20
Hello, i love this script, but i would like to have the same script for the bestvoipreselling clone, this way i could implement a script for blacklisting number ranges which costumers called for avoid Premium numbers fraud. kind regards
Bill 25 Sep 2013, 16:41
Hello, I am also intereset in doing this with bestvoipreselling. Also, I would like to know if anyone has attempted to negotiate some features with VoiceTrading like having the callid in the cdrs, or sending them some custom header with an id, in order to match their cdrs with mine. It is a great PITA the way i am doing it know, by trying to match called_number and timestamps(they seem to skew a lot regarding call start times, duration is correctly reported though)
*Name:
Email:
Hide my email
*Text:
 
Powered by Scriptsmill Comments Script