Added auto-answer support to mobile account
This commit is contained in:
@ -1288,8 +1288,8 @@ private fun AccountContent(
|
||||
Rel100()
|
||||
Dtmf()
|
||||
Redirect()
|
||||
Answer()
|
||||
}
|
||||
Answer()
|
||||
Voicemail()
|
||||
CountryCode()
|
||||
if (!ua.account.isMobile)
|
||||
|
||||
@ -1828,14 +1828,19 @@ class BaresipService: Service() {
|
||||
setCallVolume()
|
||||
ensureCommunicationMode()
|
||||
|
||||
if (isIncoming)
|
||||
if (isIncoming) {
|
||||
handleIncomingCall(call)
|
||||
else
|
||||
if (ua.account.answerMode == Api.ANSWERMODE_AUTO) {
|
||||
Log.d(TAG, "Auto-answering external call ${call.callp}")
|
||||
call.answer()
|
||||
}
|
||||
} else {
|
||||
postServiceEvent(ServiceEvent(
|
||||
"call outgoing",
|
||||
arrayListOf(ua.uap, call.callp),
|
||||
System.nanoTime())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun handleExternalCallRemoved(telecomCall: android.telecom.Call) {
|
||||
|
||||
@ -2,7 +2,6 @@ package com.tutpro.baresip
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
|
||||
Reference in New Issue
Block a user