sipaudit

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CapacityLoss = "sip-association-capacity; RTP candidate only, association unavailable"
View Source
const MaxBody = 256 << 10
View Source
const MaxHeader = 32 << 10

Variables

View Source
var ErrIncomplete = errors.New("incomplete SIP message")
View Source
var ErrMalformed = errors.New("malformed SIP message")

Functions

func Analyze

func Analyze(msg *types.SIP)

Analyze runs after endpoint attribution, before optional body suppression.

func Parse

func Parse(data []byte, tcp bool) (*layers.SIP, int, error)

Parse frames one message. TCP requires Content-Length; a UDP datagram without it owns the remaining bytes. Conflicting/duplicate lengths are never guessed.

func Record

func Record(sip *layers.SIP, timestamp int64) *types.SIP

Types

type AssociationCoverage

type AssociationCoverage struct {
	Status               string `json:"status"`
	Policy               string `json:"policy"`
	LimitBytes           int    `json:"limitBytes"`
	RetainedBytes        int    `json:"retainedBytes"`
	RetainedCalls        int    `json:"retainedCalls"`
	RetainedDescriptions int    `json:"retainedDescriptions"`
	RejectedDescriptions uint64 `json:"rejectedDescriptions"`
	UntrustedFrom        int64  `json:"untrustedFromNs"`
}

type Associations

type Associations struct {
	// contains filtered or unexported fields
}

Associations stores signaling metadata only. Capture-time intervals, rather than arrival order or wall time, also support UDP replay after TCP readers drain.

func NewAssociations

func NewAssociations() *Associations

func NewAssociationsWithBudget

func NewAssociationsWithBudget(bytes int) *Associations

NewAssociationsWithBudget bounds retained signaling metadata, never packet buffers.

func (*Associations) Coverage

func (a *Associations) Coverage() AssociationCoverage

func (*Associations) Lookup

func (a *Associations) Lookup(scope, src, dst string, sport, dport int32, pt uint32, at int64) (string, Codec, bool)

Lookup requires both advertised endpoints and a matching offer/answer codec. Ambiguous overlapping calls fail closed; NAT port guessing is not performed.

func (*Associations) Observe

func (a *Associations) Observe(s *types.SIP)

func (*Associations) Qualification

func (a *Associations) Qualification(at int64) string

func (*Associations) Reset

func (a *Associations) Reset()

type Codec

type Codec struct {
	Encoding string
	Rate     uint32
	Events   string
}

func (Codec) AllowsEvent

func (c Codec) AllowsEvent(event uint32) bool

Jump to

Keyboard shortcuts

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