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 2c22161
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sip-outbound-identity-opt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"github.com/livekit/protocol": patch
---

Remove SIP outbound number normalization for Telnyx.
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 2c22161

Please sign in to comment.