Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Oct 2, 2024
1 parent 60bb31e commit 066f434
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/livekit/sip_service_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,34 @@ def delete_sip_dispatch_rule(sip_dispatch_rule_id)
headers: auth_header(nil, sip_grant: SIPGrant.new(admin: true)),
)
end

def create_sip_participant(
sip_trunk_id,
sip_call_to,
room_name,
participant_identity: nil,
participant_name: nil,
participant_metadata: nil,
dtmf: nil,
play_ringtone: nil,
hide_phone_number: nil
)
request = Proto::CreateSIPParticipantRequest.new(
sip_trunk_id: sip_trunk_id,
sip_call_to: sip_call_to,
room_name: room_name,
participant_identity: participant_identity,
participant_name: participant_name,
participant_metadata: participant_metadata,
dtmf: dtmf,
play_ringtone: play_ringtone,
hide_phone_number: hide_phone_number,
)
self.rpc(
:CreateSIPParticipant,
request,
headers: auth_header(nil, sip_grant: SIPGrant.new(call: true)),
)
end
end
end

0 comments on commit 066f434

Please sign in to comment.