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 99de1f3 commit 1502c1d
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions lib/livekit/sip_service_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,59 @@ def create_sip_outbound_trunk(
headers: auth_header(nil, sip_grant: SIPGrant.new(admin: true)),
)
end

def list_sip_inbound_trunk
request = Proto::ListSIPInboundTrunkRequest.new
self.rpc(
:ListSIPInboundTrunk,
request,
headers: auth_header(nil, sip_grant: SIPGrant.new(admin: true)),
)
end

def list_sip_outbound_trunk
request = Proto::ListSIPOutboundTrunkRequest.new
self.rpc(
:ListSIPOutboundTrunk,
request,
headers: auth_header(nil, sip_grant: SIPGrant.new(admin: true)),
)
end

def delete_sip_trunk(sip_trunk_id)
request = Proto::DeleteSIPTrunkRequest.new(
sip_trunk_id: sip_trunk_id,
)
self.rpc(
:DeleteSIPTrunk,
request,
headers: auth_header(nil, sip_grant: SIPGrant.new(admin: true)),
)
end

def create_sip_dispatch_rule(
rule,
name: nil,
trunk_ids: nil,
inbound_numbers: nil,
hide_phone_number: nil,
metadata: nil,
attributes: nil
)
request = Proto::CreateSIPDispatchRuleRequest.new(
rule: rule,
name: name,
trunk_ids: trunk_ids,
inbound_numbers: inbound_numbers,
hide_phone_number: hide_phone_number,
metadata: metadata,
attributes: attributes,
)
self.rpc(
:CreateSIPDispatchRule,
request,
headers: auth_header(nil, sip_grant: SIPGrant.new(admin: true)),
)
end
end
end

0 comments on commit 1502c1d

Please sign in to comment.