Versions in this module Expand all Collapse all v1 v1.0.0 Jul 3, 2025 Changes in this version + const DispatchRuleConflictGeneric + const TrunkConflictCalledNumber + const TrunkConflictCallingNumber + const TrunkConflictDefault + const TrunkFilteredCalledNumberDisallowed + const TrunkFilteredCallingNumberDisallowed + const TrunkFilteredInvalid + const TrunkFilteredSourceAddressDisallowed + func BuildSIPToken(params SIPTokenParams) (string, error) + func DispatchRulePriority(info *livekit.SIPDispatchRuleInfo) int32 + func EvaluateDispatchRule(projectID string, trunk *livekit.SIPInboundTrunkInfo, ...) (*rpc.EvaluateSIPDispatchRulesResponse, error) + func GetPinAndRoom(info *livekit.SIPDispatchRuleInfo) (room, pin string, err error) + func MatchDispatchRule(trunk *livekit.SIPInboundTrunkInfo, rules []*livekit.SIPDispatchRuleInfo, ...) (*livekit.SIPDispatchRuleInfo, error) + func MatchDispatchRuleIter(trunk *livekit.SIPInboundTrunkInfo, ...) (*livekit.SIPDispatchRuleInfo, error) + func MatchTrunk(trunks []*livekit.SIPInboundTrunkInfo, call *rpc.SIPCall, ...) (*livekit.SIPInboundTrunkInfo, error) + func MatchTrunkIter(it iters.Iter[*livekit.SIPInboundTrunkInfo], call *rpc.SIPCall, ...) (*livekit.SIPInboundTrunkInfo, error) + func NewCallID() string + func NormalizeNumber(num string) string + func SelectDispatchRule(rules []*livekit.SIPDispatchRuleInfo, req *rpc.EvaluateSIPDispatchRulesRequest, ...) (*livekit.SIPDispatchRuleInfo, error) + func SortDispatchRules(rules []*livekit.SIPDispatchRuleInfo) + func ValidateDispatchRules(rules []*livekit.SIPDispatchRuleInfo, opts ...MatchDispatchRuleOpt) error + func ValidateDispatchRulesIter(it iters.Iter[*livekit.SIPDispatchRuleInfo], opts ...MatchDispatchRuleOpt) (best *livekit.SIPDispatchRuleInfo, _ error) + func ValidateTrunks(trunks []*livekit.SIPInboundTrunkInfo, opts ...MatchTrunkOpt) error + func ValidateTrunksIter(it iters.Iter[*livekit.SIPInboundTrunkInfo], opts ...MatchTrunkOpt) error + type DispatchRuleConflictFunc func(r1, r2 *livekit.SIPDispatchRuleInfo, reason DispatchRuleConflictReason) + type DispatchRuleConflictReason int + func (i DispatchRuleConflictReason) String() string + type DispatchRuleReplaceFunc func(r *livekit.SIPDispatchRuleInfo) *livekit.SIPDispatchRuleInfo + type DispatchRuleValidator struct + func NewDispatchRuleValidator(opts ...MatchDispatchRuleOpt) *DispatchRuleValidator + func (v *DispatchRuleValidator) Validate(r *livekit.SIPDispatchRuleInfo) error + func (v *DispatchRuleValidator) ValidateIter(it iters.Iter[*livekit.SIPDispatchRuleInfo]) iters.Iter[*livekit.SIPDispatchRuleInfo] + type ErrNoDispatchMatched struct + CalledNumber string + NoRules bool + NoTrunks bool + func (e *ErrNoDispatchMatched) Error() string + type MatchDispatchRuleOpt func(opt *matchDispatchRuleOpts) + func WithAllowDispatchRuleConflicts() MatchDispatchRuleOpt + func WithDispatchRuleConflict(fnc DispatchRuleConflictFunc) MatchDispatchRuleOpt + func WithDispatchRuleReplace(fnc DispatchRuleReplaceFunc) MatchDispatchRuleOpt + type MatchTrunkOpt func(opt *matchTrunkOpts) + func WithAllowTrunkConflicts() MatchTrunkOpt + func WithTrunkConflict(fnc TrunkConflictFunc) MatchTrunkOpt + func WithTrunkFiltered(fnc TrunkFilteredFunc) MatchTrunkOpt + func WithTrunkReplace(fnc TrunkReplaceFunc) MatchTrunkOpt + type SIPTokenParams struct + APIKey string + APISecret string + ParticipantAttributes map[string]string + ParticipantIdentity string + ParticipantMetadata string + ParticipantName string + RoomConfig *livekit.RoomConfiguration + RoomName string + RoomPreset string + type TrunkConflictFunc func(t1, t2 *livekit.SIPInboundTrunkInfo, reason TrunkConflictReason) + type TrunkConflictReason int + func (i TrunkConflictReason) String() string + type TrunkFilteredFunc func(tr *livekit.SIPInboundTrunkInfo, reason TrunkFilteredReason) bool + type TrunkFilteredReason int + func (i TrunkFilteredReason) String() string + type TrunkMatchResult struct + DefaultTrunkCount int + MatchType TrunkMatchType + Trunk *livekit.SIPInboundTrunkInfo + func MatchTrunkDetailed(it iters.Iter[*livekit.SIPInboundTrunkInfo], call *rpc.SIPCall, ...) (*TrunkMatchResult, error) + type TrunkMatchType int + const TrunkMatchDefault + const TrunkMatchEmpty + const TrunkMatchNone + const TrunkMatchSpecific + type TrunkReplaceFunc func(t *livekit.SIPInboundTrunkInfo) *livekit.SIPInboundTrunkInfo