Android Default Dialer App – Fix GSM ↔ SIP Audio Bridging (ConnectionService / Conference) ⸻ Background: We are developing a custom Android Default Dialer app that must handle both SIP and GSM calls. The intended flow is: 1. A SIP call arrives (INVITE from Asterisk/VoIP provider). 2. The app triggers a GSM call to the B number. 3. Once the GSM call is connected, the app answers the SIP call. 4. Both calls are then merged into a Conference so that audio flows between SIP ↔ GSM (two-way audio bridge). ⸻ What works now: • SIP registration and incoming SIP calls (using Linphone/PJSIP). • Outgoing GSM call initiation via TelecomManager.placeCall(). • SIP and GSM calls connect separately. • Call states and control logic are functioning (answer, reject, hang up). ⸻ Problem: • When we merge SIP and GSM legs, no audio is passed in either direction (SIP ↔ GSM). • Sometimes we see Cannot merge AUDIO in logs. • We already tried: • TinyALSA / PCM hooks • Native JNI audio hooks • Java AudioRecord/AudioTrack bridging • LSPosed/system-level modules • ConnectionService + Conference.addConnection() None of these approaches resulted in two-way audio bridging on stock Android (non-rooted). ⸻ Goal: We need an expert Android telecom developer who can: • Debug the current ConnectionService + Conference implementation. • Fix the audio path so SIP ↔ GSM works (two-way audio). • Provide a working proof-of-concept APK (with source code). • Explain the changes so our in-house team can continue development. ⸻ Environment: • Device: OnePlus 5T (Android 9) – stock ROM. • SIP Server: Asterisk (we will provide account & config). • Test SIM card inserted in device. • Remote debugging access available via AnyDesk. ⸻ Deliverables: • Working two-way audio bridge between SIP and GSM inside the app. • Clean, reproducible code (Java or Kotlin). • Documentation or notes explaining the solution. ⸻ What we provide: • Test phone with SIM and SIP account. • AnyDesk live access for real-time debugging. • Full logs (adb logcat, Asterisk traces, SIP traces).