Skip to content

Commit

Permalink
SipPlugin sessionId Update
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacakakpo1 committed Apr 4, 2024
1 parent 0037b9f commit 6496878
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ import kotlinx.uuid.UUID

@Serializable
data class KeepAliveAck(
@SerialName("session_id")
val sessionId: Long,
@SerialName("transaction")
val transaction: String
) : JanusBase() {

@SerialName("session_id")
var sessionId: Long = 0
fun encode(): String {
return json.encodeToString(this)
}

fun default(sessionId: Long): KeepAliveAck {
return KeepAliveAck(
sessionId = sessionId,
transaction = UUID().toString()
).apply {
this.sessionId = sessionId
janus = Janus.KEEP_ALIVE.value
}
}
Expand Down

0 comments on commit 6496878

Please sign in to comment.