Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add play-dialtone option to sip transfer #452

Merged
merged 6 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/lk/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ var (
Required: true,
Usage: "`SIP URL` to transfer the call to. Use 'tel:<phone number>' to transfer to a phone",
},
&cli.BoolFlag{
Name: "play-dialtone",
Usage: "if set, a dial tone will be played to the SIP participant while the transfer is being attempted",
},
},
},
},
Expand Down Expand Up @@ -478,11 +482,13 @@ func createSIPParticipantLegacy(ctx context.Context, cmd *cli.Command) error {
func transferSIPParticipant(ctx context.Context, cmd *cli.Command) error {
roomName, identity := participantInfoFromArgOrFlags(cmd)
to := cmd.String("to")
dialtone := cmd.Bool("play-dialtone")

req := livekit.TransferSIPParticipantRequest{
RoomName: roomName,
ParticipantIdentity: identity,
TransferTo: to,
PlayDialtone: dialtone,
}

cli, err := createSIPClient(cmd)
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.39.2
github.com/joho/godotenv v1.5.1
github.com/livekit/protocol v1.26.0
github.com/livekit/protocol v1.26.1-0.20241022031344-538889e5de0a
github.com/livekit/server-sdk-go/v2 v2.3.0
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 @@ -125,8 +125,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.26.0 h1:BAA2mKOHsJEEQCfgkllNyKpNpC0136A0pDiCvr7JYV4=
github.com/livekit/protocol v1.26.0/go.mod h1:nxRzmQBKSYK64gqr7ABWwt78hvrgiO2wYuCojRYb7Gs=
github.com/livekit/protocol v1.26.1-0.20241022031344-538889e5de0a h1:31YXXJLEwCflp7KEe9rRAwmONyCwHFujTl4MdxegTxw=
github.com/livekit/protocol v1.26.1-0.20241022031344-538889e5de0a/go.mod h1:nxRzmQBKSYK64gqr7ABWwt78hvrgiO2wYuCojRYb7Gs=
github.com/livekit/psrpc v0.6.1-0.20240924010758-9f0a4268a3b9 h1:33oBjGpVD9tYkDXQU42tnHl8eCX9G6PVUToBVuCUyOs=
github.com/livekit/psrpc v0.6.1-0.20240924010758-9f0a4268a3b9/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0=
github.com/livekit/server-sdk-go/v2 v2.3.0 h1:k6kpBwJNZYUypv9567hfmLpxQumL463dNGUBfoF0bzQ=
Expand Down