Skip to content

Commit

Permalink
Support new Callee dispatch type for SIP. (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc authored Aug 31, 2024
1 parent e1602b5 commit 5bf9338
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions cmd/lk/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,16 @@ func listSipDispatchRule(ctx context.Context, cmd *cli.Command) error {
pin = r.DispatchRuleDirect.Pin
typ = "Direct"
case *livekit.SIPDispatchRule_DispatchRuleIndividual:
room = r.DispatchRuleIndividual.RoomPrefix + "*"
room = r.DispatchRuleIndividual.RoomPrefix + "_<caller>_<random>"
pin = r.DispatchRuleIndividual.Pin
typ = "Individual"
typ = "Individual (Caller)"
case *livekit.SIPDispatchRule_DispatchRuleCallee:
room = r.DispatchRuleCallee.RoomPrefix + "<callee>"
if r.DispatchRuleCallee.Randomize {
room += "_<random>"
}
pin = r.DispatchRuleCallee.Pin
typ = "Callee"
}
trunks := strings.Join(item.TrunkIds, ",")
if trunks == "" {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/go-logr/logr v1.4.2
github.com/go-task/task/v3 v3.38.0
github.com/joho/godotenv v1.5.1
github.com/livekit/protocol v1.19.4-0.20240808180722-581b59b65309
github.com/livekit/protocol v1.20.2-0.20240831163355-2454665245fd
github.com/livekit/server-sdk-go/v2 v2.2.1
github.com/pion/rtcp v1.2.14
github.com/pion/rtp v1.8.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
github.com/livekit/mediatransportutil v0.0.0-20240730083616-559fa5ece598 h1:yLlkHk2feSLHstD9n4VKg7YEBR4rLODTI4WE8gNBEnQ=
github.com/livekit/mediatransportutil v0.0.0-20240730083616-559fa5ece598/go.mod h1:jwKUCmObuiEDH0iiuJHaGMXwRs3RjrB4G6qqgkr/5oE=
github.com/livekit/protocol v1.19.4-0.20240808180722-581b59b65309 h1:iGGiQkgRkDND59LZDPDNsRNBEWF/rpLfaH6BGy4KqWI=
github.com/livekit/protocol v1.19.4-0.20240808180722-581b59b65309/go.mod h1:oU5XbEaQlywdgXcSQDzrI5CPnwuGn/HuRXuQaDxVryQ=
github.com/livekit/protocol v1.20.2-0.20240831163355-2454665245fd h1:NeZFjd/4Zb/xxwDdHBbue18wj3+eunBu+BYB3KOKR34=
github.com/livekit/protocol v1.20.2-0.20240831163355-2454665245fd/go.mod h1:AFuwk3+uIWFeO5ohKjx5w606Djl940+wktaZ441VoCI=
github.com/livekit/psrpc v0.5.3-0.20240616012458-ac39c8549a0a h1:EQAHmcYEGlc6V517cQ3Iy0+jHgP6+tM/B4l2vGuLpQo=
github.com/livekit/psrpc v0.5.3-0.20240616012458-ac39c8549a0a/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0=
github.com/livekit/server-sdk-go/v2 v2.2.1 h1:MK6H52X/k5FA3d613qAawAVvWPwyzxS5CLpxfKd/pD4=
Expand Down

0 comments on commit 5bf9338

Please sign in to comment.