From a9bdbcbac8837bf23d1b3f0f19847e6b46da9be5 Mon Sep 17 00:00:00 2001 From: Benjamin Pracht Date: Wed, 2 Oct 2024 16:08:32 -0700 Subject: [PATCH] WiP --- lib/livekit/sip_service_client.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/livekit/sip_service_client.rb b/lib/livekit/sip_service_client.rb index bbcae73..cc89790 100644 --- a/lib/livekit/sip_service_client.rb +++ b/lib/livekit/sip_service_client.rb @@ -194,5 +194,23 @@ def create_sip_participant( headers: auth_header(nil, sip_grant: SIPGrant.new(call: true)), ) end + + def transfer_sip_participant( + room_name, + participant_identity, + transfer_to + ) + + request = Proto::TransferSIPParticipantRequest.new( + room_name: room_name, + participant_identity: participant_identity, + transfer_to: transfer_to, + ) + self.rpc( + :TransferSIPParticipant, + request, + headers: auth_header(VideoGrant.new(roomAdmin: true, room: room_name), sip_grant: SIPGrant.new(call: true)), + ) + end end end