Skip to content

πŸ“± Android app providing ⚑ REST API for call management - companion to SMSGate app πŸ”€

License

Notifications You must be signed in to change notification settings

call-gate-app/android-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ž CallGate

Apache License

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

🌟 Features

  • πŸ“² Call control via HTTP API
  • πŸ“ž USSD support
  • πŸ“‘ Real-time webhook notifications
  • πŸ”’ Basic authentication protection
  • πŸ“Ά Local server operation (no internet required)
  • πŸ› οΈ Simple JSON API structure

πŸ“¦ Getting Started

Prerequisites

  • Android device with SIM card
  • Network access to the device

Installation

  1. Download the latest APK
  2. Install and launch the app
  3. Tap "Offline" to start server β†’ Status bar icon appears
  4. First Steps:
    • Settings β†’ Server to view credentials
    • Change the random password to something secure, if necessary

πŸš€ Core API Usage

Base URL: http://<device-ip>:8084/api/v1

πŸ“ž Call Management

Start Call

POST /calls
curl -X POST \
  -u "username:password" \
  -H "Content-Type: application/json" \
  -d '{"call": {"phoneNumber": "+1234567890"}}' \
  http://device-ip:8084/api/v1/calls

Responses:

  • 200 OK: Call initiated
  • 400 Bad Request: Invalid number format
  • 401 Unauthorized: Invalid credentials
  • 500 Internal Server Error: Call failed

End Active Call

DELETE /calls
curl -X DELETE \
  -u "username:password" \
  http://device-ip:8084/api/v1/calls

Responses

  • 204 No Content: Call ended
  • 404 Not Found: No ringing or active call
  • 500 Internal Server Error: Termination failed

πŸ“‘ Webhook System

Events

Event Description
call:ringing Device is ringing
call:started Call connected
call:ended Call terminated

Configuration

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/123

Requirements:

  • Valid SSL certificate on receiver
  • Receiver accessible from device

Example Payload

{
  "deviceId": "0000000019c2d7bf00000195fe00ac0c",
  "event": "call:ringing",
  "id": "cKTqpr_Rrdgqzsv5ZyqWT",
  "payload": {
    "phoneNumber": "6505551212"
  },
  "webhookId": "hNMNzp4EYlwWsGxWiWcpD"
}

SMSGate Compatibility

βœ… Uses the same webhook request structure and signing mechanism as SMSGate webhooks

⚠️ Key differences:

  • Linear retry policy (vs exponential backoff)
  • Max 1 retry attempt by default (call events expire quickly)

πŸ”’ Security Best Practices

  • Rotate credentials regularly
  • Restrict to trusted networks
  • Consider encryption for remote access

🌐 Related Projects

βœ… SMSGate - Complete SMS Management Solution
https://sms-gate.app/

πŸ“Œ Project Status

The app is currently in active development and not ready for production use.

Version Warning
⚠️ API may change in minor versions during 0.x phase

🀝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“œ License

Distributed under the Apache 2.0 License. See LICENSE for details.

About

πŸ“± Android app providing ⚑ REST API for call management - companion to SMSGate app πŸ”€

Topics

Resources

License

Stars

Watchers

Forks

Languages