Skip to main content

scripts using voip.ms API

Project description

programs using voip.ms API

These programs use the API of the voip.ms phone service

Description

This set of programs uses a config file to supply authentication information to use the API of the VOIP service at voip.ms. There is an included example config file that needs to have the userid and password changed, and the file installed into your HOME directory. You can tweak the config file to set which fields you are interested in, the order and size of the fields, and the titles.

programs

  • black-list
  • get-cdrs
  • get-did-info
  • send-sms-message

Installation

To install from downloading from Github:

make install        # install programs
make man            # install man-pages

To install from the Python Package Index (PyPI):

pip install voip-ms-moxad

Example usages

This will print CDR records from November 11 to November 22, in reverse order such that records will be numbered from oldest to newest:

% get-cdrs --from 2017-11-15 --to 2017-11-22 --reverse

This will print last months CDR records and the cost for account 'home':

% get-cdrs --last-month --cost --account home

This will print the filter rules along with filter IDs to make changes to an existing rule:

% black-list

This will set a filter rule giving a Busy signal instead of the default NoService message:

% black-list --note 'Bad Evil Dudes' --busy  416-555-1212 

This will change the previous filter rule from Busy to Hangup instead:

% black-list --hangup --filterid 12345

This will send a SMS message to barney (an alias set up in the config file):

% send-sms-message -r barney Time for a beer

This will print all data about each DID, with the phone-number preceded by the (sub)account-name

% get-did-info --account --all

There is a help option with each program. For eg:

% get-cdrs --help

usage: get-cdrs [options]*
    [-a|--account str]     (account name)
    [-c|--config file]     (config-file (default=/home/rj/.voip-ms.conf)
    [-d|--debug]           (debugging output)
    [-f|--from date]       (YYYY-MM-DD - FROM date)
    [-h|--help]            (help)
    [-p|--padding num]     (padding between output fields (default=3)
    [-q|--quiet]           (quiet.  No headings and titles)
    [-r|--reverse]         (reverse date order of CDR output)
    [-s|--sheldon]
    [-t|--to date]         (YYYY-MM-DD - TO date)
    [-w|--timeout  num]    (default=120)
    [-C|--cost]            (total up costs and duration of CDRs)
    [-L|--last-month]      (want CDR records for LAST month)
    [-T|--this-month]      (want CDR records for THIS month)
    [-V|--version]         (print version of this program)    

API setup.

You need to set up your voip.ms service to permit access to it. This includes providing which IP addresses can use it. Please see the following URL for instructions:

https://voip.ms/m/api.php

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voip_ms_moxad-0.8.4.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voip_ms_moxad-0.8.4-py2.py3-none-any.whl (38.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file voip_ms_moxad-0.8.4.tar.gz.

File metadata

  • Download URL: voip_ms_moxad-0.8.4.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for voip_ms_moxad-0.8.4.tar.gz
Algorithm Hash digest
SHA256 6ccfbeeaefe931186f7d36fe58bea54aa4442c0efec3dbfb4a3384134391443b
MD5 01a436da5ae3844c5c52cca8baf2f2f0
BLAKE2b-256 12ac3600606ea5263b33eb2b4967ca004d56411b533f61cb2af121dd74f65125

See more details on using hashes here.

File details

Details for the file voip_ms_moxad-0.8.4-py2.py3-none-any.whl.

File metadata

  • Download URL: voip_ms_moxad-0.8.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for voip_ms_moxad-0.8.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 098a77d5c7b1747cda6ba2b1a81a79e9a88a06470e33865b77f29296b66d615c
MD5 ed23a4b435a0b4cffdc82d30c521fd8e
BLAKE2b-256 1ae8a4819e9c2bc588c6eee94629534b9837245987a01944351ced60214b4c9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page