In accounts file, moved ;extra from last to middle
Use UTF_8 in accounts byte array
This commit is contained in:
@@ -132,8 +132,6 @@ class Account(val accp: Long) {
|
|||||||
if (answerMode == Api.ANSWERMODE_AUTO)
|
if (answerMode == Api.ANSWERMODE_AUTO)
|
||||||
res += ";answermode=auto"
|
res += ";answermode=auto"
|
||||||
|
|
||||||
res += ";ptime=20;regint=${regint};regq=0.5;pubint=0;call_transfer=yes;100rel=no"
|
|
||||||
|
|
||||||
var extra = ""
|
var extra = ""
|
||||||
|
|
||||||
if (nickName != "")
|
if (nickName != "")
|
||||||
@@ -154,6 +152,8 @@ class Account(val accp: Long) {
|
|||||||
if (extra !="")
|
if (extra !="")
|
||||||
res += ";extra=\"" + extra.substringAfter(";") + "\""
|
res += ";extra=\"" + extra.substringAfter(";") + "\""
|
||||||
|
|
||||||
|
res += ";ptime=20;regint=${regint};regq=0.5;pubint=0;call_transfer=yes;100rel=no"
|
||||||
|
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,11 +135,9 @@ class AccountsActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
fun saveAccounts() {
|
fun saveAccounts() {
|
||||||
var accounts = ""
|
var accounts = ""
|
||||||
for (a in Account.accounts()) {
|
for (a in Account.accounts()) accounts = accounts + a.print() + "\n"
|
||||||
accounts = accounts + a.print() + "\n"
|
Utils.putFileContents(BaresipService.filesPath + "/accounts", accounts.toByteArray(Charsets.UTF_8))
|
||||||
}
|
// Log.d(TAG, "Saved accounts '${accounts}' to '${BaresipService.filesPath}/accounts'")
|
||||||
Utils.putFileContents(BaresipService.filesPath + "/accounts", accounts.toByteArray())
|
|
||||||
// Log.e(TAG, "Saved accounts '${accounts}' to '${BaresipService.filesPath}/accounts'")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun noAccounts(): Boolean {
|
fun noAccounts(): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user