Skip to content

Commit

Permalink
Add play_dialtone
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Oct 22, 2024
1 parent 4fb6da2 commit bcf28e8
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/main/kotlin/io/livekit/server/SipServiceClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,17 @@ class SipServiceClient(
opts.participantName?.let { this.participantName = it }
opts.participantMetadata?.let { this.participantMetadata = it }
opts.dtmf?.let { this.dtmf = it }
opts.playRingtone?.let { this.playRingtone = it }
opts.hidePhoneNumber?.let { this.hidePhoneNumber = it }
opts.playRingtone?.let {
if (it) {
this.playRingtone = true
this.playDialtone = true
}
opts.playDialtone?.let {
if (it) {
this.playRingtone = true
this.playDialtone = true
}
}
build()
}
Expand All @@ -261,11 +270,16 @@ class SipServiceClient(
roomName: String,
participantIdentity: String,
transferTo: String,
options: TransferSipParticipantOptions? = null,
): Call<Void?> {
val request = with(LivekitSip.TransferSIPParticipantRequest.newBuilder()) {
this.roomName = roomName
this.participantIdentity = participantIdentity
this.transferTo = transferTo

options?.let { opts ->
opts.playDialtone?.let { this.playDialtone = it }
}
build()
}

Expand Down Expand Up @@ -357,6 +371,11 @@ data class CreateSipParticipantOptions(
var participantName: String? = null,
var participantMetadata: String? = null,
var dtmf: String? = null,
var playRingtone: Boolean? = null,
var playRingtone: Boolean? = null, // deprecated, use playDialtone instead
var playDialtone Boolean? = null,
var hidePhoneNumber: Boolean? = null,
)

data class TransferSipParticipantOptions(
var playDialtone Boolean? = null,
)

0 comments on commit bcf28e8

Please sign in to comment.