π± The Telon GSM-SIP Gateway is an Android application that acts as a bidirectional bridge between GSM telephony and SIP (Session Initiation Protocol). It enables seamless integration of local GSM calls with SIP-based telephony systems, allowing users to make and receive calls through SIP infrastructure while using GSM hardware.
The application consists of two main endpoints that work together to bridge GSM and SIP communications:
- Telephony Endpoint (
react-native-tele
): Handles GSM/telephony operations - SIP Endpoint (
react-native-sip2
): Manages SIP protocol communications
- SIP call is received by the SIP endpoint
- Application extracts the destination number from SIP call
- Initiates outgoing GSM call using the telephony endpoint
- Bridges audio between SIP and GSM calls
- Handles call state synchronization (ringing, connected, terminated)
- GSM call is received by the telephony endpoint
- Application automatically rejects incoming GSM calls (for security)
- Only outgoing GSM calls initiated by SIP are processed
The application automatically configures itself based on the device ID:
Device ID | SIP Account | GSM Configuration |
---|---|---|
sp7731cea |
50015 | ReplaceDialer: true, Permissions: true |
Impress_City |
50014 | ReplaceDialer: false, Permissions: false |
Impress_Tor |
50017 | ReplaceDialer: true, Permissions: true |
QC_Reference_Phone |
50019 | ReplaceDialer: true, Permissions: true, fas: false |
MSM8937 |
50018 | ReplaceDialer: true, Permissions: true, fas: false |
Default | 50016 | ReplaceDialer: false, Permissions: false |
- Server: 192.168.88.254
- Transport: UDP
- Registration Timeout: 3600 seconds
- Network: Supports WiFi, 3G, Edge, GPRS, and roaming
- 50014-50019: Test calls with fast answer
- 3333: Test call with destination "900"
- 4444: Test call with audio session activation
- π Bidirectional Gateway: Routes calls between GSM and SIP networks
- π± Device Auto-Configuration: Automatically detects and configures based on device ID
- π Security: Rejects incoming GSM calls to prevent unauthorized access
- π Real-time Logging: Comprehensive logging for monitoring and debugging
- βοΈ Magisk Integration: System-level permissions for telephony operations
- π΅ Audio Bridging: Seamless audio routing between GSM and SIP calls
- π± Android device running version 8.0 (Oreo) or higher
- π§ Root access (for Magisk module installation)
- π‘ GSM SIM card with active service
- π Network connectivity for SIP registration
The application requires elevated permissions through Magisk:
android.permission.READ_LOGS
android.permission.CAPTURE_AUDIO_OUTPUT
android.permission.READ_PRECISE_PHONE_STATE
android.permission.MODIFY_PHONE_STATE
Clone the required repositories to a common folder:
# Clone the main repository
git clone https://github.com/telon-org/telon-gsm-sip-gateway.git
# Clone the required libraries to the same directory level
git clone https://github.com/telon-org/react-native-tele.git
git clone https://github.com/telon-org/react-native-sip2.git
git clone https://github.com/telon-org/react-native-replace-dialer.git
Your directory structure should look like this:
common-folder/
βββ telon-gsm-sip-gateway/
βββ react-native-tele/
βββ react-native-sip2/
βββ react-native-replace-dialer/
- Install Magisk Module: Flash the
magisk/gateway.zip
module - Build Application: Use GitHub Actions or run
yarn android
- Install APK: Install the generated APK on your device
- π Launch the Telon GSM-SIP Gateway app
- π± Grant necessary permissions when prompted
- π§ The app will automatically configure based on your device ID
- π Monitor the gateway log for connection status
- The application runs in the background
- SIP calls are automatically routed to GSM
- All call states are synchronized between networks
- Real-time logs show call progress and any issues
- SIP Registration Failed: Check network connectivity and server configuration
- Audio Issues: Verify device audio permissions and hardware compatibility
- Call Routing Problems: Check device ID configuration and SIP account settings
- View real-time logs in the application console
- Check Magisk module installation status
- Verify system permissions are properly granted
react-native-tele
: GSM/telephony operationsreact-native-sip2
: SIP protocol handlingreact-native-replace-dialer
: Default dialer replacementreact-native-device-info
: Device identification
cd telon-gateway-app
yarn install
yarn android
π€ We welcome contributions! Here's how you can help:
- π΄ Fork the repository
- π± Create a feature branch:
git checkout -b feature-name
- πΎ Commit your changes:
git commit -m "Add feature description"
- πΌ Push the branch:
git push origin feature-name
- π Create a pull request
π This project is licensed under the ISC License.
π For support or inquiries, please visit telon.org or contact us at [email protected].
π Special thanks to the contributors and the open-source community for making this project possible.