Add possibly missing ;inreq_allowed=yes to accounts when baresip starts
This commit is contained in:
@@ -449,13 +449,21 @@ class BaresipService: Service() {
|
||||
|
||||
showStatusNotification()
|
||||
|
||||
if (AccountsActivity.noAccounts()) {
|
||||
val accounts = Utils.getFileContents("$filesPath/accounts")
|
||||
if ((accounts == null) || accounts.isEmpty()) {
|
||||
val newIntent = Intent(this, MainActivity::class.java)
|
||||
newIntent.flags =
|
||||
Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP or
|
||||
Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
newIntent.putExtra("action", "accounts")
|
||||
startActivity(newIntent)
|
||||
} else {
|
||||
Utils.putFileContents("$filesPath/accounts",
|
||||
accounts.toString(Charsets.UTF_8).replace(
|
||||
"pubint=0;call_transfer",
|
||||
"pubint=0;inreq_allowed=yes;call_transfer"
|
||||
).toByteArray(Charsets.UTF_8)
|
||||
)
|
||||
}
|
||||
|
||||
if (linkAddresses.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user