Skip to main content

🛠️ Android Troubleshooting Guide

This guide provides solutions for common issues encountered when integrating and running the Pitel VoIP Android SDK.


📋 Quick Diagnostic Checklist​

CategoryCommon SymptomLikely Cause & Solution
SIP RegistrationError code 401 / 403Incorrect extension, password, or domain. Verify credentials on PBX portal.
SIP RegistrationError code 408 / 504Network timeout reaching SBC proxy. Verify SBC proxy address, port 50061 / 5061, and internet firewall.
Push NotificationIncoming call does not ring when app is killedFCM token not saved or Service Account not configured on Pitel Portal. Check PUSH_NOTIF.md.
Incoming Call UICall shows heads-up notification instead of full screenAndroid 14+ requires USE_FULL_SCREEN_INTENT declared and granted. See FULL_SCREEN_INTENT.md.
AudioNo voice audio or microphone mutedRECORD_AUDIO permission not granted at runtime.
BluetoothAudio fails to route to Bluetooth headsetBLUETOOTH_CONNECT permission missing on Android 12+ (API 31+).
R8 / ProguardCrashes in release build with ClassNotFoundExceptionProguard keep rules stripped native PJSIP bindings.

1. SIP Account & Registration Issues​

❌ Error 401 Unauthorized / 403 Forbidden​

  • Cause: The SIP registrar rejected the extension credentials.
  • Solution:
    • Verify that extension, password, and domain match exactly with PBX configuration.
    • Check whether the extension is already assigned or restricted on the PBX server.

❌ Error 408 Request Timeout / 504 Gateway Timeout​

  • Cause: The device sent a SIP REGISTER request but received no response before timeout.
  • Solution:
    • Verify the SBC proxy address and port (e.g., proxy = "sip:proxy.domain.com:5061").
    • Verify whether your corporate Wi-Fi or carrier network blocks SIP/TLS ports (5060, 5061, 50061). Test switching between 4G/5G and Wi-Fi.

2. Push Notification & Wake-up Issues​

❌ Incoming calls ring when app is open, but fail when app is closed / killed​

  • Cause 1: FCM token has not been delivered to the SDK.
    • Fix: Ensure PitelClient.saveFcmToken(token) is called immediately upon obtaining the token in FirebaseMessaging.getInstance().token and onNewToken.
  • Cause 2: Firebase Service Account JSON is missing or invalid on Pitel Portal.
    • Fix: Re-check PORTAL_GUIDE.md and ensure the Firebase project ID matches the one configured on the Portal.
  • Cause 3: Cloud Messaging API not enabled in Google Cloud Console.
    • Fix: Open Google Cloud Console $\rightarrow$ APIs & Services $\rightarrow$ Enable Firebase Cloud Messaging API.

3. Full-Screen Lockscreen Call Presentation (Android 14+)​

❌ Calls appear only as notification banners on the lockscreen​

  • Cause: Starting in Android 14 (API 34), Google restricts full-screen intent (USE_FULL_SCREEN_INTENT) as a special app access.
  • Solution:
    1. Declare <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" /> in your app manifest.
    2. Use PitelClient.getFullScreenIntentStatus(context) to check permission.
    3. If status is NOT_GRANTED, guide users to open settings via PitelClient.openFullScreenIntentSettings(context).
    4. See complete details in FULL_SCREEN_INTENT.md.

4. Audio Routing & Microphone Permissions​

❌ Caller cannot be heard or outgoing audio is silent​

  • Ensure RECORD_AUDIO and MODIFY_AUDIO_SETTINGS permissions are declared in AndroidManifest.xml and requested at runtime before registering or making calls:
    if (!PitelClient.hasRequiredPermissions(this)) {
    PitelClient.requestPermissions(this, requestCode = 100)
    }

❌ Bluetooth headset routing does not work on Android 12+ (API 31+)​

  • Android 12 requires runtime Bluetooth permissions for audio routing:
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
  • Request BLUETOOTH_CONNECT permission dynamically at runtime on Android 12+ devices.

5. Proguard / R8 Optimization in Release Builds​

The SDK package automatically bundles consumer R8 rules (consumer-rules.pro). If you encounter issues in obfuscated builds, verify your app's proguard-rules.pro includes:

-keep class com.pitel.voip.sdk.** { *; }
-keep class org.pjsip.pjsua2.** { *; }
-keepclassmembers class * extends org.pjsip.pjsua2.** { *; }