diff --git a/gradle.properties b/gradle.properties index 9ead7b37..b1755edf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,5 +19,6 @@ android.useAndroidX=true android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official +android.suppressUnsupportedCompileSdk=34 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2bb285c7..23468c4b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Aug 02 12:25:37 IST 2022 +#Tue Aug 27 14:50:55 GMT 2024 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/telnyx_rtc/build.gradle b/telnyx_rtc/build.gradle index 4367544f..1e37e42c 100644 --- a/telnyx_rtc/build.gradle +++ b/telnyx_rtc/build.gradle @@ -82,7 +82,7 @@ android { - compileSdkVersion 34 + compileSdk 34 defaultConfig { minSdkVersion 23 diff --git a/telnyx_rtc/src/main/java/com/telnyx/webrtc/sdk/TelnyxClient.kt b/telnyx_rtc/src/main/java/com/telnyx/webrtc/sdk/TelnyxClient.kt index cfd40a26..1e095339 100644 --- a/telnyx_rtc/src/main/java/com/telnyx/webrtc/sdk/TelnyxClient.kt +++ b/telnyx_rtc/src/main/java/com/telnyx/webrtc/sdk/TelnyxClient.kt @@ -83,6 +83,7 @@ class TelnyxClient( private var providedPort: Int? = null internal var providedTurn: String? = null internal var providedStun: String? = null + private var voiceSDKID: String? = null internal var debugReportStarted = false @@ -370,6 +371,11 @@ class TelnyxClient( } + + if (voiceSDKID != null){ + pushMetaData = PushMetaData(callerName = "", callerNumber = "", callId = "", voiceSdkId = voiceSDKID) + } + // Connect to new socket socket.connect(this@TelnyxClient, providedHostAddress, providedPort, pushMetaData) { @@ -518,6 +524,9 @@ class TelnyxClient( providedStun = providedServerConfig.stun if (ConnectivityHelper.isNetworkEnabled(context)) { Timber.d("Provided Host Address: $providedHostAddress") + if (voiceSDKID != null){ + pushMetaData = PushMetaData(callerName = "", callerNumber = "", callId = "", voiceSdkId = voiceSDKID) + } socket.connect(this, providedHostAddress, providedPort, pushMetaData) { if (autoLogin) { credentialLogin(credentialConfig) @@ -559,6 +568,9 @@ class TelnyxClient( providedStun = providedServerConfig.stun if (ConnectivityHelper.isNetworkEnabled(context)) { Timber.d("Provided Host Address: $providedHostAddress") + if (voiceSDKID != null){ + pushMetaData = PushMetaData(callerName = "", callerNumber = "", callId = "", voiceSdkId = voiceSDKID) + } socket.connect(this, providedHostAddress, providedPort, pushMetaData) { if (autoLogin) { tokenLogin(tokenConfig) @@ -1357,6 +1369,11 @@ class TelnyxClient( val params = jsonObject.getAsJsonObject("params") val offerCallId = UUID.fromString(params.get("callID").asString) val remoteSdp = params.get("sdp").asString + val voiceSdkID = params.get("voice_sdk_id")?.asString + if (voiceSdkID != null) { + this@TelnyxClient.voiceSDKID = voiceSdkID + } + val callerName = params.get("caller_id_name").asString val callerNumber = params.get("caller_id_number").asString telnyxSessionId = UUID.fromString(params.get("telnyx_session_id").asString)