voip

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 2 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

Overview

Package voip holds the call types shared by the session manager (which drives the engine) and the webhook layer (which turns them into call.* events), so neither has to import the other.

Index

Constants

View Source
const (
	DirectionIncoming = "incoming"
	DirectionOutgoing = "outgoing"
)

Variables

View Source
var (
	ErrCallsDisabled = errors.New("chamadas desativadas nesta instância")
	ErrCallNotFound  = errors.New("chamada não encontrada")
)

Functions

This section is empty.

Types

type Call

type Call struct {
	ID        string    `json:"callId"`
	Peer      string    `json:"peer"`
	Direction string    `json:"direction"`
	State     string    `json:"state"`
	StartedAt time.Time `json:"startedAt"`
}

Call is the public snapshot of a call the engine is tracking.

type StateEvent

type StateEvent struct {
	Call
	Reason string `json:"reason,omitempty"`
}

StateEvent is emitted on every engine phase change. Consumers must treat call webhooks as idempotent per callId: a peer hangup arrives both from whatsmeow (call.ended) and from the engine (state "ended").

Jump to

Keyboard shortcuts

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