Update protocol. Support SIP transports. (#2724)
This commit is contained in:
+1
-16
@@ -198,28 +198,13 @@ func (s *SIPService) CreateSIPParticipantWithToken(ctx context.Context, req *liv
|
||||
log := logger.GetLogger()
|
||||
log = log.WithValues("call-id", callID, "roomName", req.RoomName, "sip-trunk", req.SipTrunkId, "to-user", req.SipCallTo)
|
||||
|
||||
ireq := &rpc.InternalCreateSIPParticipantRequest{
|
||||
SipCallId: callID,
|
||||
CallTo: req.SipCallTo,
|
||||
RoomName: req.RoomName,
|
||||
ParticipantIdentity: req.ParticipantIdentity,
|
||||
ParticipantName: req.ParticipantName,
|
||||
ParticipantMetadata: req.ParticipantMetadata,
|
||||
Dtmf: req.Dtmf,
|
||||
PlayRingtone: req.PlayRingtone,
|
||||
WsUrl: wsUrl,
|
||||
Token: token,
|
||||
}
|
||||
trunk, err := s.store.LoadSIPTrunk(ctx, req.SipTrunkId)
|
||||
if err != nil {
|
||||
log.Errorw("cannot get trunk to update sip participant", err)
|
||||
return nil, err
|
||||
}
|
||||
log = log.WithValues("from-user", trunk.OutboundNumber, "to-host", trunk.OutboundAddress)
|
||||
ireq.Address = trunk.OutboundAddress
|
||||
ireq.Number = trunk.OutboundNumber
|
||||
ireq.Username = trunk.OutboundUsername
|
||||
ireq.Password = trunk.OutboundPassword
|
||||
ireq := rpc.NewCreateSIPParticipantRequest(callID, wsUrl, token, req, trunk)
|
||||
|
||||
// CreateSIPParticipant will wait for LiveKit Participant to be created and that can take some time.
|
||||
// Thus, we must set a higher deadline for it, if it's not set already.
|
||||
|
||||
Reference in New Issue
Block a user