From 06f670545079c13902c0ef063a83f69dd9950073 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Tue, 18 Aug 2026 12:44:36 +0300 Subject: [PATCH] Show contact name and SIP URI in call URI field if label has not been given --- app/src/main/kotlin/com/tutpro/baresip/Contact.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/Contact.kt b/app/src/main/kotlin/com/tutpro/baresip/Contact.kt index c68d9310..de613c12 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/Contact.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/Contact.kt @@ -69,8 +69,9 @@ sealed class Contact { val name = contactWithUri.first.name() if (includeLabel) { val label = contactWithUri.second.label - if (label.isNotEmpty()) return "$name $label" - if (unique && contactWithUri.first.uris().size > 1) + if (label.isNotEmpty() && !listOf("SIP", "TEL").contains(label.uppercase())) + return "$name $label" + if (unique || contactWithUri.first.uris().size > 1) return "$name ${uri.substringAfter(":")}" return name } @@ -83,8 +84,9 @@ sealed class Contact { val name = telContactWithUri.first.name() if (includeLabel) { val label = telContactWithUri.second.label - if (label.isNotEmpty()) return "$name $label" - if (unique && telContactWithUri.first.uris().size > 1) + if (label.isNotEmpty() && !listOf("SIP", "TEL").contains(label.uppercase())) + return "$name $label" + if (unique || telContactWithUri.first.uris().size > 1) return "$name $userPart" return name }