Improved call and message implementation

This commit is contained in:
Juha Heinanen
2025-04-26 09:07:29 +03:00
parent 7f31397a2d
commit b60ba2263a
5 changed files with 33 additions and 31 deletions
@@ -452,7 +452,7 @@ class BaresipService: Service() {
new.stopTime = old.stopTime
new.startTime = old.startTime
new.recording = old.recording
callHistory.add(new)
new.add()
}
CallHistoryNew.save()
}
@@ -826,8 +826,7 @@ class BaresipService: Service() {
Log.e(TAG, "Callwaiting tone $name.wav not found\")")
}
if (ua.account.callHistory) {
CallHistoryNew.add(CallHistoryNew(aor, peerUri, "in"))
CallHistoryNew.save()
CallHistoryNew(aor, peerUri, "in").add()
ua.account.missedCalls = true
}
return
@@ -839,7 +838,7 @@ class BaresipService: Service() {
"call incoming" -> {
val peerUri = ev[1]
Log.d(TAG, "Incoming call $uap/$callp/$peerUri")
Call(callp, ua, peerUri, "in", "incoming", null).add()
Call(callp, ua, peerUri, "in", "incoming").add()
if (speakerPhone && !Utils.isSpeakerPhoneOn(am))
Utils.toggleSpeakerPhone(ContextCompat.getMainExecutor(this), am)
if (ua.account.answerMode == Api.ANSWERMODE_MANUAL) {
@@ -1036,8 +1035,7 @@ class BaresipService: Service() {
history.rejected = call.rejected
if (call.startTime != null && call.dumpfiles[0] != "")
history.recording = call.dumpfiles
CallHistoryNew.add(history)
CallHistoryNew.save()
history.add()
ua.account.missedCalls = ua.account.missedCalls || missed
}
if (!Utils.isVisible()) {