Check if blocking rules match also to incoming mobile call
This commit is contained in:
@@ -2116,6 +2116,22 @@ class BaresipService: Service() {
|
|||||||
).add()
|
).add()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (isBlocked(uri)) {
|
||||||
|
Log.d(TAG, "Auto-rejecting incoming PSTN call from $uri by block rule")
|
||||||
|
telecomCall.disconnect()
|
||||||
|
toast(
|
||||||
|
String.format(getString(R.string.call_blocked),
|
||||||
|
Utils.friendlyUri(this, uri, ua.account))
|
||||||
|
)
|
||||||
|
if (ua.account.callHistory)
|
||||||
|
Blocked(
|
||||||
|
ua.account.aor,
|
||||||
|
uri,
|
||||||
|
"invite",
|
||||||
|
GregorianCalendar().timeInMillis
|
||||||
|
).add()
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val call = Call.ExternalCall(
|
val call = Call.ExternalCall(
|
||||||
|
|||||||
Reference in New Issue
Block a user