Skip to content

Commit

Permalink
Set default identity for CreateSIPParticipant.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Feb 18, 2025
1 parent bfe8101 commit 84b69cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rpc/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ func NewCreateSIPParticipantRequest(
if req.IncludeHeaders != 0 {
includeHeaders = req.IncludeHeaders
}
participantIdentity := req.ParticipantIdentity
if participantIdentity == "" {
participantIdentity = "sip_" + req.SipCallTo
}

return &InternalCreateSIPParticipantRequest{
ProjectId: projectID,
Expand All @@ -111,7 +115,7 @@ func NewCreateSIPParticipantRequest(
WsUrl: wsUrl,
Token: token,
RoomName: req.RoomName,
ParticipantIdentity: req.ParticipantIdentity,
ParticipantIdentity: participantIdentity,
ParticipantName: req.ParticipantName,
ParticipantMetadata: req.ParticipantMetadata,
ParticipantAttributes: attrs,
Expand Down

0 comments on commit 84b69cf

Please sign in to comment.