client

package
v0.0.0-...-4ede2c6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE = "tcp"

	AstManagerHeader = "Asterisk Call Manager"
)
View Source
const (
	AsteriskTimeOut = 60
)

Variables

This section is empty.

Functions

func ParseString

func ParseString(input string) (map[string]string, error)

Types

type Asterisk

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

func New

func New(c amilib.Config) *Asterisk

func (*Asterisk) Close

func (as *Asterisk) Close(ctx context.Context) error

Logoff closes the current session with AMI.

func (*Asterisk) Connect

func (as *Asterisk) Connect(ctx context.Context) error

func (*Asterisk) CoreSettings

func (ami *Asterisk) CoreSettings(ctx context.Context, actionID string, node *amitools.Node) (*amiresponses.ResponseData, error)

CoreSHowSettings

func (*Asterisk) Errors

func (as *Asterisk) Errors() <-chan error

func (*Asterisk) Events

func (as *Asterisk) Events() <-chan *amitools.Event

Events returns an channel with events received from AMI.

func (*Asterisk) Handle

func (ami *Asterisk) Handle(r *amitools.Request) (*amitools.Request, error)

func (*Asterisk) Listen

func (as *Asterisk) Listen(ctx context.Context) error

func (*Asterisk) Login

func (ami *Asterisk) Login(ctx context.Context, actionID string, node *amitools.Node) error

Login provides the login manager.

func (*Asterisk) Ping

func (ami *Asterisk) Ping(ctx context.Context, actionID string, node *amitools.Node) (*amiresponses.ResponseData, error)

func (*Asterisk) SetLogHandler

func (as *Asterisk) SetLogHandler(log zerolog.Logger)

func (*Asterisk) Ticket

func (as *Asterisk) Ticket() *time.Ticker

type AsteriskSettings

type AsteriskSettings struct {

	//Asterisk version we are running
	AsteriskVersion string

	//Asterisk AMI version
	Version string

	//System Name
	SystemName string

	//MaxCalls
	MaxCalls int
}

Jump to

Keyboard shortcuts

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