Added User Agent setting that can be used to set custom SIP request/response

User-Agent header value
This commit is contained in:
Juha Heinanen
2024-09-29 12:13:59 +03:00
parent b148833ef0
commit 74fa0c97e6
7 changed files with 107 additions and 27 deletions
@@ -441,12 +441,16 @@ class BaresipService: Service() {
activeNetwork = cm.activeNetwork
Log.i(TAG, "Active network: $activeNetwork")
val userAgent = Config.variable("user_agent")
Thread {
baresipStart(
filesPath,
addresses.removePrefix(";"),
logLevel,
"baresip v${BuildConfig.VERSION_NAME} " +
if (userAgent != "")
userAgent
else
"baresip v${BuildConfig.VERSION_NAME} " +
"(Android ${VERSION.RELEASE}/${System.getProperty("os.arch") ?: "?"})"
)
}.start()