Fixed call.rejected settings

This commit is contained in:
Juha Heinanen
2023-05-13 16:23:06 +03:00
parent bf2f79168e
commit 58ce2f5dce
2 changed files with 1 additions and 3 deletions
@@ -895,7 +895,7 @@ class BaresipService: Service() {
call.rejected = call.startTime == null && call.rejected = call.startTime == null &&
!reason.startsWith("408") && !reason.startsWith("408") &&
!reason.startsWith("480") && !reason.startsWith("480") &&
!reason.startsWith("Connection reset by peer") !reason.startsWith("Connection reset by")
val missed = call.dir == "in" && call.startTime == null && !call.rejected val missed = call.dir == "in" && call.startTime == null && !call.rejected
if (ua.account.callHistory) { if (ua.account.callHistory) {
val history = CallHistoryNew(aor, call.peerUri, call.dir) val history = CallHistoryNew(aor, call.peerUri, call.dir)
@@ -384,8 +384,6 @@ class MainActivity : AppCompatActivity() {
val callp = call.callp val callp = call.callp
Log.d(TAG, "AoR $aor hanging up call $callp with ${callUri.text}") Log.d(TAG, "AoR $aor hanging up call $callp with ${callUri.text}")
hangupButton.isEnabled = false hangupButton.isEnabled = false
if (call.status == "answered")
call.rejected = true
Api.ua_hangup(ua.uap, callp, 0, "") Api.ua_hangup(ua.uap, callp, 0, "")
} }
} }