diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index d0bb5c1..64a15a4 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -38,7 +38,7 @@ kotlin { iosSimulatorArm64() - version = "0.7.21" + version = "0.7.22" cocoapods { summary = "Janus-message-sdk" diff --git a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt index f4742ca..e77b1a1 100644 --- a/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt +++ b/shared/src/commonMain/kotlin/com/telnyx/janusmessagesdk/janus/Register.kt @@ -2,6 +2,7 @@ package com.telnyx.janusmessagesdk.janus import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlinx.uuid.UUID @Serializable @@ -13,21 +14,23 @@ data class Register( @SerialName("janus") val janus: String, @SerialName("session_id") - val sessionId: Long, + val sessionId: Long = UUID().timeStamp, @SerialName("transaction") - val transaction: String + val transaction: String = UUID().toString() ) @Serializable data class Body( - @SerialName("authuser") - val authuser: String, + @SerialName("display_name") + val displayName: String, @SerialName("proxy") val proxy: String = "sip:sipdev.telnyx.com:5060", @SerialName("request") val request: String = "register", - @SerialName("secret") - val secret: String, + @SerialName("login_token") + val loginToken: String, + @SerialName("login") + val login: String, @SerialName("username") - val username: String + val username: String = "sip:$login@sipdev.telnyx.com" ) \ No newline at end of file