signalinglog

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package signalinglog provides optional logrus hooks for SIP signaling audit trails. Persistence (GORM/DB) is intentionally omitted — applications can wrap the hook.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Direction string // "in" | "out"
	Transport string // "udp" | "tcp" | "tls"
	Method    string
	Status    int
	CallID    string
	Remote    string
	Summary   string
}

Entry is one signaling message suitable for structured logging or external persistence.

type Hook

type Hook struct {
	Transport string
	Logger    *logrus.Logger
}

Hook logs SIP messages via logrus at Debug level.

func NewHook

func NewHook(transport string) *Hook

NewHook returns a hook that logs to logrus StandardLogger when logger is nil.

func (*Hook) LogRequest

func (h *Hook) LogRequest(msg *stack.Message, remote *net.UDPAddr)

LogRequest records an inbound SIP request.

func (*Hook) LogResponse

func (h *Hook) LogResponse(msg *stack.Message, remote *net.UDPAddr)

LogResponse records an inbound SIP response.

func (*Hook) LogSent

func (h *Hook) LogSent(msg *stack.Message, remote *net.UDPAddr)

LogSent records an outbound SIP message.

Jump to

Keyboard shortcuts

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