Documentation
¶
Index ¶
- Constants
- type CallDir
- type CallMonitor
- func (c *CallMonitor) CallDur() func() time.Duration
- func (c *CallMonitor) CallEnd()
- func (c *CallMonitor) CallStart()
- func (c *CallMonitor) CallTerminate(t Termination)
- func (c *CallMonitor) CallTerminationFailure()
- func (c *CallMonitor) CheckDur() func(dt time.Duration)
- func (c *CallMonitor) InviteAccept()
- func (c *CallMonitor) InviteError(reason string)
- func (c *CallMonitor) InviteErrorShort(t Termination)
- func (c *CallMonitor) InviteReq()
- func (c *CallMonitor) JoinDur() func() time.Duration
- func (c *CallMonitor) RTPPacketRecv(payloadType string)
- func (c *CallMonitor) RTPPacketSend(payloadType string)
- func (c *CallMonitor) SDPSize(sz int, isOffer bool)
- func (c *CallMonitor) SessionDur() func() time.Duration
- func (c *CallMonitor) StageDur(stage string) prometheus.Observer
- func (c *CallMonitor) StageDurTimer(stage string) func() time.Duration
- type HealthStatus
- type Monitor
- func (m *Monitor) Health() HealthStatus
- func (m *Monitor) IdleCPU() float64
- func (m *Monitor) InviteReqRaw(dir CallDir)
- func (m *Monitor) NewCall(dir CallDir, fromHost, toHost string) *CallMonitor
- func (m *Monitor) Shutdown()
- func (m *Monitor) Start(conf *config.Config) error
- func (m *Monitor) Stop()
- func (m *Monitor) TransferFailed(dir CallDir, reason string, changeActive bool)
- func (m *Monitor) TransferStarted(dir CallDir)
- func (m *Monitor) TransferSucceeded(dir CallDir)
- type Termination
- type TerminationResult
Constants ¶
View Source
const ( Inbound = CallDir(false) Outbound = CallDir(true) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallMonitor ¶
type CallMonitor struct {
// contains filtered or unexported fields
}
func (*CallMonitor) CallDur ¶
func (c *CallMonitor) CallDur() func() time.Duration
func (*CallMonitor) CallEnd ¶
func (c *CallMonitor) CallEnd()
func (*CallMonitor) CallStart ¶
func (c *CallMonitor) CallStart()
func (*CallMonitor) CallTerminate ¶
func (c *CallMonitor) CallTerminate(t Termination)
func (*CallMonitor) CallTerminationFailure ¶ added in v1.3.0
func (c *CallMonitor) CallTerminationFailure()
func (*CallMonitor) CheckDur ¶
func (c *CallMonitor) CheckDur() func(dt time.Duration)
func (*CallMonitor) InviteAccept ¶
func (c *CallMonitor) InviteAccept()
func (*CallMonitor) InviteError ¶
func (c *CallMonitor) InviteError(reason string)
InviteError records a SIP INVITE rejection after the trunk is known. Used by outbound INVITE failure paths where CallTerminate also fires for the same call, so this only writes to the legacy invite_error counter.
func (*CallMonitor) InviteErrorShort ¶
func (c *CallMonitor) InviteErrorShort(t Termination)
InviteErrorShort records a SIP INVITE rejection that occurred before a call object existed (no validated trunk). Writes to the legacy invite_error counter (kept for back-compat) and routes through CallTerminate so the unified calls_terminated counter has consistent classification.
func (*CallMonitor) InviteReq ¶
func (c *CallMonitor) InviteReq()
func (*CallMonitor) JoinDur ¶
func (c *CallMonitor) JoinDur() func() time.Duration
func (*CallMonitor) RTPPacketRecv ¶
func (c *CallMonitor) RTPPacketRecv(payloadType string)
func (*CallMonitor) RTPPacketSend ¶
func (c *CallMonitor) RTPPacketSend(payloadType string)
func (*CallMonitor) SDPSize ¶
func (c *CallMonitor) SDPSize(sz int, isOffer bool)
func (*CallMonitor) SessionDur ¶
func (c *CallMonitor) SessionDur() func() time.Duration
func (*CallMonitor) StageDur ¶ added in v1.3.0
func (c *CallMonitor) StageDur(stage string) prometheus.Observer
func (*CallMonitor) StageDurTimer ¶ added in v1.3.0
func (c *CallMonitor) StageDurTimer(stage string) func() time.Duration
type HealthStatus ¶
type HealthStatus int
const ( HealthOK HealthStatus = iota HealthNotStarted HealthStopped HealthUnderLoad HealthDisabled )
func (HealthStatus) String ¶
func (i HealthStatus) String() string
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func (*Monitor) Health ¶
func (m *Monitor) Health() HealthStatus
func (*Monitor) InviteReqRaw ¶
func (*Monitor) NewCall ¶
func (m *Monitor) NewCall(dir CallDir, fromHost, toHost string) *CallMonitor
func (*Monitor) TransferFailed ¶
func (*Monitor) TransferStarted ¶
func (*Monitor) TransferSucceeded ¶
type Termination ¶ added in v1.3.1
type Termination struct {
Result TerminationResult
Reason string
}
func ClientError ¶ added in v1.3.1
func ClientError(reason string) Termination
func ServerError ¶ added in v1.3.1
func ServerError(reason string) Termination
func Success ¶ added in v1.3.1
func Success(reason string) Termination
type TerminationResult ¶ added in v1.3.1
type TerminationResult string
const ( ResultSuccess TerminationResult = "success" ResultServerError TerminationResult = "server_error" ResultClientError TerminationResult = "client_error" )
Click to show internal directories.
Click to hide internal directories.