sip

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSIPToken added in v1.9.4

func BuildSIPToken(apiKey, secret, roomName, participantIdentity, participantName string) (string, error)

func DispatchRulePriority

func DispatchRulePriority(info *livekit.SIPDispatchRuleInfo) int32

DispatchRulePriority returns sorting priority for dispatch rules. Lower value means higher priority.

func EvaluateDispatchRule

EvaluateDispatchRule checks a selected Dispatch Rule against the provided request.

func GetPinAndRoom

func GetPinAndRoom(info *livekit.SIPDispatchRuleInfo) (room, pin string, err error)

GetPinAndRoom returns a room name/prefix and the pin for a dispatch rule. Just a convenience wrapper.

func MatchDispatchRule

MatchDispatchRule finds the best dispatch rule matching the request parameters. Returns an error if no rule matched. Trunk parameter can be nil, in which case only wildcard dispatch rules will be effective (ones without Trunk IDs).

func MatchTrunk

func MatchTrunk(trunks []*livekit.SIPTrunkInfo, calling, called string) (*livekit.SIPTrunkInfo, error)

MatchTrunk finds a SIP Trunk definition matching the request. Returns nil if no rules matched or an error if there are conflicting definitions.

func SelectDispatchRule

SelectDispatchRule takes a list of dispatch rules, and takes the decision which one should be selected. It returns an error if there are conflicting rules. Returns nil if no rules match.

func SortDispatchRules

func SortDispatchRules(rules []*livekit.SIPDispatchRuleInfo)

SortDispatchRules predictably sorts dispatch rules by priority (first one is highest).

func ValidateDispatchRules added in v1.10.1

func ValidateDispatchRules(rules []*livekit.SIPDispatchRuleInfo) error

ValidateDispatchRules checks a set of dispatch rules for conflicts.

func ValidateTrunks added in v1.10.1

func ValidateTrunks(trunks []*livekit.SIPTrunkInfo) error

ValidateTrunks checks a set of trunks for conflicts.

Types

type ErrNoDispatchMatched added in v1.9.9

type ErrNoDispatchMatched struct {
	NoRules      bool
	NoTrunks     bool
	CalledNumber string
}

func (*ErrNoDispatchMatched) Error added in v1.9.9

func (e *ErrNoDispatchMatched) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL