Added Telephony Provider account configuration item
Added support for Contact tel URIs Show account's STUN configuration items only if needed Avoid some lint warnings in baresip.c
This commit is contained in:
@@ -3,6 +3,8 @@ package com.tutpro.baresip
|
||||
import android.content.Context
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
import java.net.URLEncoder
|
||||
import java.net.URLDecoder
|
||||
|
||||
class Account(val accp: String) {
|
||||
|
||||
@@ -28,6 +30,7 @@ class Account(val accp: String) {
|
||||
var missedCalls = false
|
||||
var unreadMessages = false
|
||||
var callHistory = true
|
||||
var telProvider = Utils.aorDomain(aor)
|
||||
var resumeUri = ""
|
||||
|
||||
init {
|
||||
@@ -56,6 +59,10 @@ class Account(val accp: String) {
|
||||
|
||||
val extra = Api.account_extra(accp)
|
||||
callHistory = Utils.paramValue(extra,"call_history") == ""
|
||||
telProvider = if (Utils.paramExists(extra, "tel_provider"))
|
||||
URLDecoder.decode(Utils.paramValue(extra,"tel_provider"), "UTF-8")
|
||||
else
|
||||
Utils.aorDomain(aor)
|
||||
|
||||
}
|
||||
|
||||
@@ -119,6 +126,8 @@ class Account(val accp: String) {
|
||||
if (!callHistory)
|
||||
extra += ";call_history=no"
|
||||
|
||||
extra += ";tel_provider=${URLEncoder.encode(telProvider, "UTF-8")}"
|
||||
|
||||
if (extra != "")
|
||||
res += ";extra=\"" + extra.substringAfter(";") + "\""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user