No description
  • Kotlin 65.4%
  • C 29.6%
  • Shell 3.5%
  • CMake 1.5%
Find a file
salix f34d6e5a6b
All checks were successful
Build APK / Build debug APK (push) Successful in 12m45s
Improve call transfer and SIP connection reliability
- Add attended transfer support alongside blind transfer
- Keep SIP signaling alive and bind to the active Android network
- Maintain background connectivity with a foreground-service wake lock
2026-08-05 13:13:15 +02:00
.forgejo Derive release version from the release tag 2026-07-08 21:10:23 +02:00
app Improve call transfer and SIP connection reliability 2026-08-05 13:13:15 +02:00
docs/screenshots Refresh README with screenshots and project details 2026-07-08 18:27:12 +02:00
gradle Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00
scripts Fix Android CI SDK paths and OpenSSL linkage 2026-07-08 09:57:49 +02:00
.gitignore Redesign launcher icon with phone-in-talk glyph 2026-07-08 22:36:42 +02:00
build.gradle.kts Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00
gradle.properties Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00
gradlew Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00
gradlew.bat Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00
LICENSE Add MIT license 2026-07-08 11:51:51 +02:00
README.md Improve call transfer and SIP connection reliability 2026-08-05 13:13:15 +02:00
settings.gradle.kts Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00
THIRD_PARTY_NOTICES.md Prepare Android SIP project for source control 2026-07-08 09:24:30 +02:00

AndroidSip

A small, understandable SIP softphone for Android — Kotlin + Jetpack Compose on top of the baresip SIP engine via a native JNI bridge.

License: MIT Platform Kotlin

Install

APKs are published on the releases page. To get automatic updates, add the app to Obtainium:

Get it on Obtainium

AndroidSip lets you use a normal SIP account on a phone without depending on Android's deprecated SipManager API. Most of the SIP heavy lifting is done by baresip; the Android side handles permissions, notifications, audio routing, account storage, and making the call screen feel like a phone.

It is deliberately not a huge phone-system app — it registers one account and makes or receives calls, with a clean Material 3 UI.

Screenshots

Dial (dark) Recents (dark) Dial (light) Recents (light)
Dial screen, dark theme Recent calls, dark theme Dial screen, light theme Recent calls, light theme

Features

  • 📞 Make outgoing calls from the dial screen
  • 📲 Receive incoming calls while the foreground service is running
  • 🔗 Opens sip:, sips:, and tel: links straight into the dialer
  • 🕐 Recent-calls history
  • 🎛️ Answer, reject, hang up, mute, hold, speaker, DTMF, and blind or attended call transfer
  • 🔌 UDP, TCP, or TLS transport
  • 🔐 SIP password stored encrypted with the Android Keystore
  • 🌐 Re-registers automatically when the default network changes (Wi-Fi, mobile, or VPN)
  • 🔁 Restores registration after reboot and recovers stalled registrations with backoff

Architecture

The app is written in Kotlin with Jetpack Compose. The native SIP engine is baresip, built as Android static libraries and linked into the app with CMake.

┌─────────────────────────────────────────────┐
│  Compose UI (dial / call / recents / setup) │
├─────────────────────────────────────────────┤
│  SipRuntime + SipForegroundService          │
├─────────────────────────────────────────────┤
│  SipEngine / NativeSipEngine (Kotlin)       │
├─────────────────────────────────────────────┤
│  JNI bridge (app/src/main/cpp)              │
├─────────────────────────────────────────────┤
│  baresip · libre · librem · OpenSSL         │
└─────────────────────────────────────────────┘

The Android package is dev.local.androidsip. Important parts of the project:

Path What it is
app/src/main/java/dev/local/androidsip/ Android app, UI, service, runtime
app/src/main/java/dev/local/androidsip/sip/ SIP engine wrapper and baresip config
app/src/main/cpp/ JNI bridge for baresip
scripts/build_baresip_distribution.sh downloads and builds the native libraries
THIRD_PARTY_NOTICES.md notes about baresip and the vendored bridge code

Building

1. Build the native libraries

Before the Android app can build, the distribution/ folder must exist. It is created from juha-h/libbaresip-android by running:

scripts/build_baresip_distribution.sh

You need these tools installed:

  • JDK
  • Android SDK 36
  • Android NDK 29.0.14206865
  • CMake
  • make, git, wget, pkg-config, automake, autoconf, libtool, unzip

If the NDK is not found automatically, set ANDROID_NDK_HOME to the NDK path.

2. Build the app

./gradlew testDebugUnitTest
./gradlew assembleDebug

If the Gradle wrapper JAR is missing, create it once from a machine that already has Gradle installed:

gradle wrapper --gradle-version 9.4.1

Known limitations

  • Incoming calls only work while the foreground service is running.
  • No Android Telecom integration yet.
  • Android Doze suspends ordinary SIP sockets. For reliable idle-time calls, use Settings → Allow background calls to exempt AndroidSip from battery optimization. Some vendor-specific battery managers may need a similar manual exception.
  • WebSocket SIP transports are not exposed — the pinned native build does not include the baresip websocket transport modules.
  • netroam.so is not used; AndroidSip listens to Android network callbacks and asks baresip to re-register when the network changes.

Status

This is still an early personal project. The main call flow works, but it is not finished or polished yet. It should be a good base if you want to experiment with baresip on Android or need a small SIP client that is easy to understand.

License

AndroidSip is released under the MIT License. The bundled baresip, libre, librem, and OpenSSL libraries keep their own licenses — see THIRD_PARTY_NOTICES.md.