@@ -40,8 +40,8 @@ import java.util.function.Supplier
40
40
*/
41
41
class SipServiceClient (
42
42
private val service : SipService ,
43
- private val apiKey : String ,
44
- private val secret : String ,
43
+ apiKey : String ,
44
+ secret : String ,
45
45
) : ServiceClientBase(apiKey, secret) {
46
46
47
47
/* *
@@ -50,6 +50,7 @@ class SipServiceClient(
50
50
* See: [SIP Inbound Trunk](https://docs.livekit.io/sip/trunk-inbound/)
51
51
*/
52
52
@JvmOverloads
53
+ @Suppress(" unused" )
53
54
fun createSipInboundTrunk (
54
55
name : String ,
55
56
numbers : List <String >,
@@ -82,6 +83,7 @@ class SipServiceClient(
82
83
* See: [SIP Outbound Trunk](https://docs.livekit.io/sip/trunk-outbound/)
83
84
*/
84
85
@JvmOverloads
86
+ @Suppress(" unused" )
85
87
fun createSipOutboundTrunk (
86
88
name : String ,
87
89
address : String ,
@@ -115,6 +117,7 @@ class SipServiceClient(
115
117
* UpdateSIPInboundTrunk updates an existing SIP Inbound Trunk.
116
118
*/
117
119
@JvmOverloads
120
+ @Suppress(" unused" )
118
121
fun updateSipInboundTrunk (
119
122
sipTrunkId : String ,
120
123
options : UpdateSipInboundTrunkOptions ? = null
@@ -145,6 +148,7 @@ class SipServiceClient(
145
148
* UpdateSIPOutboundTrunk updates an existing SIP Outbound Trunk.
146
149
*/
147
150
@JvmOverloads
151
+ @Suppress(" unused" )
148
152
fun updateSipOutboundTrunk (
149
153
sipTrunkId : String ,
150
154
options : UpdateSipOutboundTrunkOptions ? = null,
@@ -178,6 +182,7 @@ class SipServiceClient(
178
182
* See: [SIP Inbound Trunk](https://docs.livekit.io/sip/trunk-inbound/)
179
183
*/
180
184
@JvmOverloads
185
+ @Suppress(" unused" )
181
186
fun listSipInboundTrunk (): Call <List <LivekitSip .SIPInboundTrunkInfo >> {
182
187
val request = LivekitSip .ListSIPInboundTrunkRequest .newBuilder().build()
183
188
@@ -192,6 +197,7 @@ class SipServiceClient(
192
197
* See: [SIP Outbound Trunk](https://docs.livekit.io/sip/trunk-outbound/)
193
198
*/
194
199
@JvmOverloads
200
+ @Suppress(" unused" )
195
201
fun listSipOutboundTrunk (): Call <List <LivekitSip .SIPOutboundTrunkInfo >> {
196
202
val request = LivekitSip .ListSIPOutboundTrunkRequest .newBuilder().build()
197
203
@@ -204,6 +210,7 @@ class SipServiceClient(
204
210
* Deletes a trunk.
205
211
*/
206
212
@JvmOverloads
213
+ @Suppress(" unused" )
207
214
fun deleteSipTrunk (sipTrunkId : String ): Call <SIPTrunkInfo > {
208
215
val request = with (LivekitSip .DeleteSIPTrunkRequest .newBuilder()) {
209
216
this .sipTrunkId = sipTrunkId
@@ -220,6 +227,7 @@ class SipServiceClient(
220
227
* See: [Dispatch Rules](https://docs.livekit.io/sip/dispatch-rule/)
221
228
*/
222
229
@JvmOverloads
230
+ @Suppress(" unused" )
223
231
fun createSipDispatchRule (
224
232
rule : SipDispatchRule ,
225
233
options : CreateSipDispatchRuleOptions ? = null
@@ -261,31 +269,33 @@ class SipServiceClient(
261
269
* UpdateSIPDispatchRule updates an existing SIP Dispatch Rule.
262
270
*/
263
271
@JvmOverloads
272
+ @Suppress(" unused" )
264
273
fun updateSipDispatchRule (
265
274
sipDispatchRuleId : String ,
266
275
options : UpdateSipDispatchRuleOptions ? = null
267
276
): Call <LivekitSip .SIPDispatchRuleInfo > {
268
277
val request = with (LivekitSip .UpdateSIPDispatchRuleRequest .newBuilder()) {
278
+ this .sipDispatchRuleId = sipDispatchRuleId
269
279
update = with (LivekitSip .SIPDispatchRuleUpdate .newBuilder()) {
270
280
options?.let { opt ->
271
281
opt.name?.let { this .name = it }
272
282
opt.metadata?.let { this .metadata = it }
273
283
opt.trunkIds?.let { this .trunkIds = buildListUpdate(it) }
274
- opt.rule?.let {
284
+ opt.rule?.let { optRule ->
275
285
this .rule = with (SIPDispatchRule .newBuilder()) {
276
- when (it ) {
286
+ when (optRule ) {
277
287
is SipDispatchRuleDirect -> {
278
288
dispatchRuleDirect = with (SIPDispatchRuleDirect .newBuilder()) {
279
- roomName = it .roomName
280
- it .pin?.let { this .pin = it }
289
+ roomName = optRule .roomName
290
+ optRule .pin?.let { this .pin = it }
281
291
build()
282
292
}
283
293
}
284
294
285
295
is SipDispatchRuleIndividual -> {
286
296
dispatchRuleIndividual = with (SIPDispatchRuleIndividual .newBuilder()) {
287
- roomPrefix = it .roomPrefix
288
- it .pin?.let { this .pin = it }
297
+ roomPrefix = optRule .roomPrefix
298
+ optRule .pin?.let { this .pin = it }
289
299
build()
290
300
}
291
301
}
@@ -308,6 +318,7 @@ class SipServiceClient(
308
318
*
309
319
* See: [Dispatch Rules](https://docs.livekit.io/sip/dispatch-rule/)
310
320
*/
321
+ @Suppress(" unused" )
311
322
fun listSipDispatchRule (): Call <List <SIPDispatchRuleInfo >> {
312
323
val request = LivekitSip .ListSIPDispatchRuleRequest .newBuilder().build()
313
324
val credentials = authHeader(emptyList(), listOf (SIPAdmin ()))
@@ -320,6 +331,7 @@ class SipServiceClient(
320
331
*
321
332
* See: [Dispatch Rules](https://docs.livekit.io/sip/dispatch-rule/)
322
333
*/
334
+ @Suppress(" unused" )
323
335
fun deleteSipDispatchRule (sipDispatchRuleId : String ): Call <SIPDispatchRuleInfo > {
324
336
val request = with (LivekitSip .DeleteSIPDispatchRuleRequest .newBuilder()) {
325
337
this .sipDispatchRuleId = sipDispatchRuleId
@@ -334,6 +346,7 @@ class SipServiceClient(
334
346
*
335
347
* See: [SIP Participant](https://docs.livekit.io/sip/sip-participant/)
336
348
*/
349
+ @Suppress(" unused" )
337
350
fun createSipParticipant (
338
351
sipTrunkId : String ,
339
352
number : String ,
@@ -377,6 +390,7 @@ class SipServiceClient(
377
390
*
378
391
* See: [SIP Participant](https://docs.livekit.io/sip/sip-participant/)
379
392
*/
393
+ @Suppress(" unused" )
380
394
fun transferSipParticipant (
381
395
roomName : String ,
382
396
participantIdentity : String ,
0 commit comments