‼️ Archived and updated to Cloudflare Worker Git repo
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
- Go to voip.ms API page and configure API password.
- Enable API by clicking
Enable/Disable API
. Make sure that it showsEnabled
- 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.
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.
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
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