Call Management API for Androidβ’
CallGate provides programmatic control of phone calls through a REST API, specifically designed for automation scenarios requiring basic call management without voice interaction.
β οΈ No Audio Handling - This app only manages call initiation/termination, does NOT handle voice playback or recording
- π CallGate
- π² Call control via HTTP API
- π USSD support
- π‘ Real-time webhook notifications
- π Basic authentication protection
- πΆ Local server operation (no internet required)
- π οΈ Simple JSON API structure
- Android device with SIM card
- Network access to the device
- Download the latest APK
- Install and launch the app
- Tap "Offline" to start server β Status bar icon appears
- First Steps:
- Settings β Server to view credentials
- Change the random password to something secure, if necessary
Base URL: http://<device-ip>:8084/api/v1
POST /callscurl -X POST \
-u "username:password" \
-H "Content-Type: application/json" \
-d '{"call": {"phoneNumber": "+1234567890"}}' \
http://device-ip:8084/api/v1/callsResponses:
200 OK: Call initiated400 Bad Request: Invalid number format401 Unauthorized: Invalid credentials500 Internal Server Error: Call failed
To execute a USSD code, use the same /calls endpoint but provide the USSD code in the phoneNumber field.
POST /callscurl -X POST \
-u "username:password" \
-H "Content-Type: application/json" \
-d '{"call": {"phoneNumber": "*123#"}}' \
http://device-ip:8084/api/v1/callsImportant Note: In the current version of the app, executing a USSD code via the API does not return any results. The API will respond with 200 OK if the USSD code was successfully sent to the network, but you will not receive the USSD response (e.g., balance information).
Responses:
200 OK: USSD code sent successfully (but no result returned)400 Bad Request: Invalid USSD code format401 Unauthorized: Invalid credentials500 Internal Server Error: USSD execution failed
DELETE /callscurl -X DELETE \
-u "username:password" \
http://device-ip:8084/api/v1/callsResponses
204 No Content: Call ended404 Not Found: No ringing or active call500 Internal Server Error: Termination failed
| Event | Description |
|---|---|
call:ringing |
Device is ringing |
call:started |
Call connected |
call:ended |
Call terminated |
Base URL: http://<device-ip>:8084/api/v1/webhooks
| Method | Endpoint | Description |
|---|---|---|
| POST | / |
Create or replace webhook |
| GET | /webhooks |
Retrieve all webhooks |
| DELETE | /webhooks/{id} |
Delete a specific webhook |
# Register webhook
curl -X POST \
-u "username:password" \
-H "Content-Type: application/json" \
-d '{"event":"call:started", "url":"https://your-server.com/webhook"}' \
http://device-ip:8084/api/v1/webhooks
# Retrieve all webhooks
curl -X GET \
-u "username:password" \
http://device-ip:8084/api/v1/webhooks
# Delete a specific webhook
curl -X DELETE \
-u "username:password" \
http://device-ip:8084/api/v1/webhooks/123Requirements:
- Valid SSL certificate on receiver
- Receiver accessible from device
{
"deviceId": "0000000019c2d7bf00000195fe00ac0c",
"event": "call:ringing",
"id": "cKTqpr_Rrdgqzsv5ZyqWT",
"payload": {
"phoneNumber": "6505551212"
},
"webhookId": "hNMNzp4EYlwWsGxWiWcpD"
}β Uses the same webhook request structure and signing mechanism as SMSGate webhooks
- Linear retry policy (vs exponential backoff)
- Max 1 retry attempt by default (call events expire quickly)
- Rotate credentials regularly
- Restrict to trusted networks
- Consider encryption for remote access
β
SMSGate - Complete SMS Management Solution
https://sms-gate.app/
The app is currently in active development and not ready for production use.
Version Warning
We welcome contributions! Please:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE for details.