Support SIP DTMF data messages. (#2559)
This commit is contained in:
@@ -24,8 +24,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
|
||||
"github.com/livekit/livekit-server/version"
|
||||
"github.com/livekit/mediatransportutil/pkg/rtcconfig"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
@@ -41,6 +39,8 @@ import (
|
||||
"github.com/livekit/livekit-server/pkg/rtc"
|
||||
"github.com/livekit/livekit-server/pkg/rtc/types"
|
||||
"github.com/livekit/livekit-server/pkg/telemetry"
|
||||
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
|
||||
"github.com/livekit/livekit-server/version"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -753,13 +753,18 @@ func (r *RoomManager) SendData(ctx context.Context, req *livekit.SendDataRequest
|
||||
}
|
||||
|
||||
room.Logger.Debugw("api send data", "size", len(req.Data))
|
||||
up := &livekit.UserPacket{
|
||||
Payload: req.Data,
|
||||
DestinationSids: req.DestinationSids,
|
||||
room.SendDataPacket(&livekit.DataPacket{
|
||||
Kind: req.Kind,
|
||||
DestinationIdentities: req.DestinationIdentities,
|
||||
Topic: req.Topic,
|
||||
}
|
||||
room.SendDataPacket(up, req.Kind)
|
||||
Value: &livekit.DataPacket_User{
|
||||
User: &livekit.UserPacket{
|
||||
Payload: req.Data,
|
||||
DestinationSids: req.DestinationSids,
|
||||
DestinationIdentities: req.DestinationIdentities,
|
||||
Topic: req.Topic,
|
||||
},
|
||||
},
|
||||
}, req.Kind)
|
||||
return &livekit.SendDataResponse{}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user