acheremisov / voipms-groundwire

Balance checker for voip.ms at Acrobits Groundwire iOS app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

‼️ Archived and updated to Cloudflare Worker Git repo

Balance checker for voip.ms at Acrobits Groundwire iOS app

Docker container to expose voip.ms API in Groundwire format. Build it as a side project to practice knowledge in Github, Node, Express, Docker, Trivy Docker scan, etc. If you see any opportunity for optimization - pull requests are welcome.

sequenceDiagram
    participant GA as Groundwire App
    participant D as voipms-Groundwire @ Docker
    participant A as voip.ms API
    GA->>D: Check balance
    Note over D: Authenticate <br/> against voip.ms API
    D->>A: Issue API call to voip.ms
    Activate A
    A->>D: Return balance as float (12.123432)
    Deactivate A
    Note over D: Process number and add currency
    D->>GA: Return formatted balance

Deployment

voip.ms

  1. Go to voip.ms API page and configure API password.
  2. Enable API by clicking Enable/Disable API. Make sure that it shows Enabled
  3. Configure IP address of the host where your Docker container will be deployed. If you don't have static IP you can configure 0.0.0.0 to allow access from all IPs, but it presents serious security risk.

Docker

Deploy docker container.
Enviroment variables USERNAME and PASSWORD are required.
USERNAME is your voip.ms login email and PASSWORD is API password that you configured at previous step.
CURRENCY is currency name that you will see in iOS app. Cosmetic and doesn't impact anything. Variable is optional and will be CAD by default.

Groundwire iOS App

Configure in Groundwire settings

Settings -> Select voip.ms number -> Advanced Settings -> Web Services -> Balance Checker

Note: Docker container is available via port 3000
URL: URL of your docker container :3000
(for example via IP http://52.12.23.1:3000 or URL http://app.example:com:3000)
Method: Get

Docker Compose

  groundwire:
    image: ghcr.io/acheremisov/voipms-groundwire:v.1
    container_name: groundwire
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - USERNAME=andrew@mail.org    # required, voip.ms login email
      - PASSWORD=MyApiPassword123   # required, voip.ms API password
      - CURRENCY=CAD                # optional, CAD by default

Groundwire screenshot

This is an image

About

Balance checker for voip.ms at Acrobits Groundwire iOS app


Languages

Language:JavaScript 78.4%Language:Dockerfile 21.6%