Skip to content

Commit

Permalink
Validate SipCallTo in CreateSIPParticipantRequest.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Sep 25, 2024
1 parent a601adc commit ae701da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions livekit/sip.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ func (p *CreateSIPParticipantRequest) Validate() error {
}
if p.SipCallTo == "" {
return errors.New("missing sip callee number")
} else if strings.Contains(p.SipCallTo, "@") {
return errors.New("SipCallTo should be a phone number or SIP user, not a full SIP URI")
}
if p.RoomName == "" {
return errors.New("missing room name")
Expand Down

0 comments on commit ae701da

Please sign in to comment.