Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow requesting a dial tone during participant transfer #91

Merged
merged 9 commits into from
Oct 23, 2024
5 changes: 5 additions & 0 deletions .changeset/gold-flowers-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"server-sdk-kotlin": patch
---

Implement transferSipParticipant
2 changes: 1 addition & 1 deletion protocol
Submodule protocol updated 81 files
+0 −5 .changeset/wet-guests-eat.md
+38 −0 CHANGELOG.md
+7 −2 agent/token.go
+37 −0 auth/accesstoken.go
+73 −0 auth/accesstoken_test.go
+36 −3 auth/grants.go
+17 −75 infra/link.pb.go
+4 −0 livekit/attrs.go
+68 −294 livekit/livekit_agent.pb.go
+29 −129 livekit/livekit_agent_dispatch.pb.go
+447 −450 livekit/livekit_analytics.pb.go
+329 −714 livekit/livekit_egress.pb.go
+191 −188 livekit/livekit_egress.twirp.go
+53 −237 livekit/livekit_ingress.pb.go
+21 −93 livekit/livekit_internal.pb.go
+17 −75 livekit/livekit_metrics.pb.go
+180 −648 livekit/livekit_models.pb.go
+320 −601 livekit/livekit_room.pb.go
+82 −81 livekit/livekit_room.twirp.go
+169 −759 livekit/livekit_rtc.pb.go
+1,037 −1,047 livekit/livekit_sip.pb.go
+196 −448 livekit/livekit_sip.twirp.go
+5 −21 livekit/livekit_webhook.pb.go
+11 −14 livekit/types_test.go
+73 −30 logger/logger.go
+69 −8 logger/logger_test.go
+9 −4 logger/proto.go
+311 −0 logger/slice.go
+1 −1 package.json
+30 −0 packages/javascript/CHANGELOG.md
+1 −1 packages/javascript/package.json
+1 −0 packages/javascript/src/index.d.ts
+8 −6 packages/javascript/src/index.js
+2 −2 protobufs/livekit_agent.proto
+22 −4 protobufs/livekit_analytics.proto
+3 −2 protobufs/livekit_egress.proto
+4 −0 protobufs/livekit_models.proto
+10 −8 protobufs/livekit_room.proto
+51 −4 protobufs/livekit_sip.proto
+1 −1 protobufs/rpc/agent.proto
+1 −1 protobufs/rpc/agent_dispatch.proto
+4 −0 protobufs/rpc/egress.proto
+23 −1 protobufs/rpc/io.proto
+12 −3 protobufs/rpc/sip.proto
+1 −1 replay/cloud_replay.pb.go
+57 −129 rpc/agent.pb.go
+36 −35 rpc/agent.psrpc.go
+30 −31 rpc/agent_dispatch.pb.go
+15 −15 rpc/agent_dispatch.psrpc.go
+1 −1 rpc/analytics.pb.go
+66 −88 rpc/egress.pb.go
+35 −32 rpc/egress.psrpc.go
+33 −147 rpc/ingress.pb.go
+465 −437 rpc/io.pb.go
+107 −80 rpc/io.psrpc.go
+5 −21 rpc/keepalive.pb.go
+1 −1 rpc/participant.pb.go
+16 −16 rpc/participant.psrpc.go
+1 −1 rpc/room.pb.go
+12 −12 rpc/room.psrpc.go
+1 −1 rpc/roommanager.pb.go
+4 −4 rpc/roommanager.psrpc.go
+325 −0 rpc/rpcfakes/fake_typed_agent_dispatch_internal_client.go
+9 −39 rpc/signal.pb.go
+3 −1 rpc/sip.go
+127 −127 rpc/sip.pb.go
+53 −48 rpc/sip.psrpc.go
+3 −3 rpc/sip_test.go
+14 −9 sip/sip.go
+11 −2 sip/sip_test.go
+8 −0 utils/connectionquality.go
+0 −310 utils/event_emitter.go
+337 −0 utils/events/emitter.go
+12 −22 utils/events/emitter_test.go
+9 −3 utils/guid/id.go
+10 −0 utils/guid/id_test.go
+38 −0 utils/mono/mono.go
+4 −0 utils/must/must.go
+7 −7 utils/protoproxy.go
+1 −1 utils/protoproxy_test.go
+3 −2 utils/rate_test.go
1 change: 1 addition & 0 deletions src/main/kotlin/io/livekit/server/SipService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package io.livekit.server

import com.google.protobuf.Empty
import livekit.LivekitSip
import retrofit2.Call
import retrofit2.http.Body
Expand Down
25 changes: 23 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,19 @@ 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 +272,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 +373,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,
)
Loading