From 385ec810b3258503fd495912cb6045ebdbdbf27b Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 31 Aug 2019 10:52:28 +0300 Subject: [PATCH] - Added net debug to case when registration fails due to DNS lookup. --- app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt index 40283ebf..bf3f8fc5 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/BaresipService.kt @@ -360,6 +360,7 @@ class BaresipService: Service() { if ((ev.size > 1) && (ev[1] == "Invalid argument")) { // Most likely this error is due to DNS lookup failure newEvent = "registering failed,DNS lookup failed" + Api.net_debug() if (dynDns) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { val activeNetwork = cm.activeNetwork @@ -368,6 +369,8 @@ class BaresipService: Service() { Log.d(LOG_TAG, "Updating DNS Servers = $dnsServers") if (Config.updateDnsServers(dnsServers) != 0) Log.w(LOG_TAG, "Failed to update DNS servers '$dnsServers'") + else + Api.net_debug() } else { Log.d(LOG_TAG, "No active network!") }