@@ -71,6 +71,32 @@ func (s *SIPClient) CreateSIPOutboundTrunk(ctx context.Context, in *livekit.Crea
7171 return s .sipClient .CreateSIPOutboundTrunk (ctx , in )
7272}
7373
74+ // UpdateSIPInboundTrunk updates an existing SIP Inbound Trunk.
75+ func (s * SIPClient ) UpdateSIPInboundTrunk (ctx context.Context , in * livekit.UpdateSIPInboundTrunkRequest ) (* livekit.SIPInboundTrunkInfo , error ) {
76+ if in == nil || in .Action == nil || in .SipTrunkId == "" {
77+ return nil , ErrInvalidParameter
78+ }
79+
80+ ctx , err := s .withAuth (ctx , withSIPGrant {Admin : true })
81+ if err != nil {
82+ return nil , err
83+ }
84+ return s .sipClient .UpdateSIPInboundTrunk (ctx , in )
85+ }
86+
87+ // UpdateSIPOutboundTrunk updates an existing SIP Outbound Trunk.
88+ func (s * SIPClient ) UpdateSIPOutboundTrunk (ctx context.Context , in * livekit.UpdateSIPOutboundTrunkRequest ) (* livekit.SIPOutboundTrunkInfo , error ) {
89+ if in == nil || in .Action == nil || in .SipTrunkId == "" {
90+ return nil , ErrInvalidParameter
91+ }
92+
93+ ctx , err := s .withAuth (ctx , withSIPGrant {Admin : true })
94+ if err != nil {
95+ return nil , err
96+ }
97+ return s .sipClient .UpdateSIPOutboundTrunk (ctx , in )
98+ }
99+
74100// GetSIPInboundTrunksByIDs gets SIP Inbound Trunks by ID.
75101// Returned slice is in the same order as the IDs. Missing IDs will have nil in the corresponding position.
76102func (s * SIPClient ) GetSIPInboundTrunksByIDs (ctx context.Context , ids []string ) ([]* livekit.SIPInboundTrunkInfo , error ) {
@@ -182,6 +208,19 @@ func (s *SIPClient) CreateSIPDispatchRule(ctx context.Context, in *livekit.Creat
182208 return s .sipClient .CreateSIPDispatchRule (ctx , in )
183209}
184210
211+ // UpdateSIPDispatchRule updates an existing SIP Dispatch Rule.
212+ func (s * SIPClient ) UpdateSIPDispatchRule (ctx context.Context , in * livekit.UpdateSIPDispatchRuleRequest ) (* livekit.SIPDispatchRuleInfo , error ) {
213+ if in == nil || in .Action == nil || in .SipDispatchRuleId == "" {
214+ return nil , ErrInvalidParameter
215+ }
216+
217+ ctx , err := s .withAuth (ctx , withSIPGrant {Admin : true })
218+ if err != nil {
219+ return nil , err
220+ }
221+ return s .sipClient .UpdateSIPDispatchRule (ctx , in )
222+ }
223+
185224// GetSIPDispatchRulesByIDs gets SIP Dispatch Rules by ID.
186225// Returned slice is in the same order as the IDs. Missing IDs will have nil in the corresponding position.
187226func (s * SIPClient ) GetSIPDispatchRulesByIDs (ctx context.Context , ids []string ) ([]* livekit.SIPDispatchRuleInfo , error ) {
0 commit comments