Difuse Phone is a fork of linphone-android by Alchemilla Ventures & Difuse (Iridia Solutions Private Limited), tailored difuse's and other SIP infrastructure. It is fully SIP-based, for all calling and presence features.
ML-Powered QR Scanner — The upstream linphone QR scanner is replaced with a Google ML Kit + CameraX barcode scanner. QR codes encode JSON blobs containing PBX credentials (username, password, host, transport), allowing one-tap device provisioning.
Sentry — Go-Based Push & B2BUA Backend — The most significant architectural addition is Sentry, a production Go service that acts as a SIP Back-to-Back User Agent. Built with sipgo, Gin, and PostgreSQL (via SQLC), Sentry bridges upstream PBX systems (Difuse PBX, Asterisk, FreeSWITCH) to mobile devices via FCM/APNs push — all push events are handled with sub-millisecond latency. It handles SIP registration on behalf of sleeping devices, dispatches wake-up pushes, bridges calls, and exposes a REST API for interaction with the Difuse Phone. The Android app registers with Sentry on startup, maintains heartbeats, and manages dual SIP accounts — a direct PBX account for calls and a hidden "push-only" B2BUA account for incoming call wake-up.
Optimized for Calling — The experience is streamlined for voice and video calling with a custom dialer, a refined "difuse" blue UI theme, and pre-configured third-party SIP login that gets users connected faster.
Copyright © Belledonne Communications / Alchemilla Ventures Private Limited
Difuse Phone is available under a GNU/GPLv3 license (see LICENSE file for details).
This branch uses the Alchemilla Linphone SDK fork pinned in
gradle/libs.versions.toml. Before opening the project in Android Studio,
provide that SDK's local Maven repository as described below.
If you don't have Android Studio, you can build and install the app using gradle:
./gradlew assembleDebug
will compile the APK file (assembleRelease to instead if you want to build a release package), and then
./gradlew installDebug
to install the generated APK in the previous step (use installRelease instead if you built a release package).
APK files are stored within ./app/build/outputs/apk/debug/ and ./app/build/outputs/apk/release/ directories.
When building a release AppBundle, use releaseAppBundle target instead of release.
Also make sure you have a NDK installed and that you have an environment variable named ANDROID_NDK_HOME that contains the path to the NDK.
This is to be able to include native libraries symbols into app bundle for the Play Store.
- Clone the SDK fork into
linphone-sdk/if it is not already present:
git clone https://github.com/AlchemillaHQ/linphone-sdk.git --recursive
-
Check out the commit represented by the version in
gradle/libs.versions.toml. Either build it by followinglinphone-sdk/README.md, or download the matching successfulandroid-sdkworkflow artifact and extract its contents tolinphone-sdk/build/android/. -
The checked-in default points Gradle to
linphone-sdk/build/android/. To use another location, create or edit$GRADLE_USER_HOME/gradle.properties(usually~/.gradle/gradle.properties) and set an absolute path, for example:
LinphoneSdkBuildDir=/home/<username>/linphone-sdk/build/android/
- Confirm that the build prints
Using locally built SDKand the exact pinned version, then build the app in Android Studio or with Gradle.
-
Install LLDB from SDK Tools in Android-studio.
-
In Android-studio go to Run->Edit Configurations->Debugger.
-
Select 'Dual' or 'Native' and add the path to linphone-sdk debug libraries (build/libs-debug/ for example).
-
Open native file and put your breakpoint on it.
-
Make sure you are using the debug AAR in the app/build.gradle script and not the release one (to have faster builds by default the release AAR is used even for debug APK flavor).
-
Debug app.
-
If you have the following build issue
AAPT: error: resource drawable/linphone_logo_tinted (aka org.linphone:drawable/linphone_logo_tinted) not found, delete theapp/src/main/res/xml/contacts.xmlfile (you can do it simply withgit clean -fcommand) and start the build again. -
If you encounter the
couldn't find "libc++_shared.so"crash when the app starts, simply clean the project in Android Studio (under Build menu) and build again. Also check you have built the SDK for the right CPU architecture using the-DLINPHONESDK_ANDROID_ARCHS=armv7,arm64,x86,x86_64cmake parameter. -
Push notification might not work when app has been started by Android Studio consecutively to an install. Remove the app from the recent activity view and start it again using the launcher icon to resolve this.
When submitting an issue, please include the matching library logs.
Logs are always enabled and stored locally on the device, you can clear them/upload them by going into the Help → Troubleshooting page.
First of all, to be able to get a symbolized stack trace, you need the debug version of our libraries.
If you haven't built the SDK locally (see building a local SDK), here's how to get them:
-
Go to the linphone maven repository and find the directory that matches the version of the SDK.
-
Download the linphone-sdk-android-<version>-libs-debug.zip archive.
-
Extract the symbolized libraries somewhere on your computer, it will create a
libs-debugdirectory.
Now you need the ndk-stack tool and possibly adb logcat.
If your computer isn't used for Android development, you can download those tools from Google website, in the Command line tools only section.
Once you have the debug libraries and the proper tools installed, you can use the ndk-stack tool to symbolize your stacktrace. Note that you also need to know the architecture (armv7, arm64, x86, etc...) of the libraries that were used.
If you know the CPU architecture of your device (most probably arm64 if it's a recent device) you can use the following to get the stacktrace:
adb logcat -d | ndk-stack -sym ./libs-debug/arm64-v8a/
If you don't know the CPU architecture, use the following instead:
adb logcat -d | ndk-stack -sym ./libs-debug/`adb shell getprop ro.product.cpu.abi | tr -d '\r'`
Warning: This command won't print anything until you reproduce the crash!
Starting NDK r29 you will be able to directly use the libs-debug.zip file in ndk-stack -sym argument.
Firebase push notifications require a app/google-services.json file that contains the configuration.
If you have your own push server, replace this file with yours.
If you encounter
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'your package name'
error when building, make sure you have replaced the app/google-services.json file by yours (containing your package name).
Simply edit the app/build.gradle.kts file and change the value of the packageName variable.
The next build will automatically use this value everywhere thanks to manifestPlaceholders feature of gradle and Android.