[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] No audio on incoming cell call

From: Phelan, Tom
Subject: [Linphone-developers] No audio on incoming cell call
Date: Wed, 31 Aug 2022 10:38:21 -0400

I'm developing a liblinphone app for android and am having trouble interacting with incoming cell calls while the app is on a call. When an incoming cell call comes in while the app is in an active call and I choose 'Answer', android puts my app's call on hold and answers the cell call.

Fine so far, but there's no audio in the cell call. If I put the cell call on hold and resume it, the audio works.

This is true for vice versa too -- on a cell call and incoming app call. Answering the app call puts the cell call on hold, but no audio in the answered app call. Putting the app call on hold and resuming fixes the audio.

These scenarios work properly:
Any idea what I'm doing wrong?

Here's some code:

Core initialization:
fun initLinphone(appContext: Context) {
this.appContext = appContext
val config = factory.createConfigFromString(linphoneConfig)
lcore = factory.createCoreWithConfig(config, appContext)
coreVersion = lcore.version
uoLog("CoreContext.initLinphone: starting liblinphone core, version $coreVersion")

fun initAndroidAccount() {
uoLog("CoreContext.initAndroidAccount: connection service class name: ${}")
val compName = ComponentName(appContext,
phoneAccountHandle = PhoneAccountHandle(compName, "UOPhone")
val builder = PhoneAccount.builder(phoneAccountHandle, "UOPhone")
phoneAccount =
telecomManager = appContext.getSystemService(Context.TELECOM_SERVICE) as TelecomManager

fun login() {
if (UOSettings.tcn == "") return
uoLog("CoreContext.login: Registering...")
domain = "${UOSettings.tcn}"
val authInfo = factory.createAuthInfo(UOSettings.deviceid, null, UOSettings.secret, null, null, domain, null)
val accountParams = lcore.createAccountParams()
val identity = factory.createAddress("sip:${UOSettings.deviceid}@${domain}")
val address = factory.createAddress("sip:${domain}")
accountParams.pushNotificationAllowed = true
accountParams.isRegisterEnabled = true
val account = lcore.createAccount(accountParams)
lcore.defaultAccount = account
lcore.setUserAgent("Unified Office UOPhone Android", BuildConfig.VERSION_NAME)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]