Versions in this module Expand all Collapse all v6 v6.0.2 Jul 25, 2023 Changes in this version + var Logger = log15.New() + var MaxIdleConnections = 20 + var RequestTimeout = 2 * time.Second + func CodeFromError(err error) int + func Connect(opts *Options) (ari.Client, error) + func ConnectWithContext(ctx context.Context, chanMsgConnected chan bool, opts *Options) (ari.Client, error) + type Application struct + func (a *Application) Data(key *ari.Key) (*ari.ApplicationData, error) + func (a *Application) Get(key *ari.Key) *ari.ApplicationHandle + func (a *Application) List(filter *ari.Key) (ax []*ari.Key, err error) + func (a *Application) Subscribe(key *ari.Key, eventSource string) error + func (a *Application) Unsubscribe(key *ari.Key, eventSource string) error + type Asterisk struct + func (a *Asterisk) Config() ari.Config + func (a *Asterisk) Info(key *ari.Key) (*ari.AsteriskInfo, error) + func (a *Asterisk) Logging() ari.Logging + func (a *Asterisk) Modules() ari.Modules + func (a *Asterisk) Variables() ari.AsteriskVariables + type AsteriskVariables struct + func (a *AsteriskVariables) Get(key *ari.Key) (string, error) + func (a *AsteriskVariables) Set(key *ari.Key, value string) (err error) + type Bridge struct + func (b *Bridge) AddChannel(key *ari.Key, channelID string) (err error) + func (b *Bridge) AddChannelWithOptions(key *ari.Key, channelID string, options *ari.BridgeAddChannelOptions) error + func (b *Bridge) Create(key *ari.Key, t string, name string) (bh *ari.BridgeHandle, err error) + func (b *Bridge) Data(key *ari.Key) (*ari.BridgeData, error) + func (b *Bridge) Delete(key *ari.Key) (err error) + func (b *Bridge) Get(key *ari.Key) *ari.BridgeHandle + func (b *Bridge) List(filter *ari.Key) (bx []*ari.Key, err error) + func (b *Bridge) MOH(key *ari.Key, class string) error + func (b *Bridge) Play(key *ari.Key, playbackID string, mediaURI ...string) (*ari.PlaybackHandle, error) + func (b *Bridge) Record(key *ari.Key, name string, opts *ari.RecordingOptions) (*ari.LiveRecordingHandle, error) + func (b *Bridge) RemoveChannel(key *ari.Key, channelID string) (err error) + func (b *Bridge) StageCreate(key *ari.Key, btype, name string) (*ari.BridgeHandle, error) + func (b *Bridge) StagePlay(key *ari.Key, playbackID string, mediaURI ...string) (*ari.PlaybackHandle, error) + func (b *Bridge) StageRecord(key *ari.Key, name string, opts *ari.RecordingOptions) (*ari.LiveRecordingHandle, error) + func (b *Bridge) StopMOH(key *ari.Key) error + func (b *Bridge) Subscribe(key *ari.Key, n ...string) ari.Subscription + func (b *Bridge) VideoSource(key *ari.Key, channelID string) error + func (b *Bridge) VideoSourceDelete(key *ari.Key) error + type Channel struct + func (c *Channel) Answer(key *ari.Key) error + func (c *Channel) Busy(key *ari.Key) error + func (c *Channel) Congestion(key *ari.Key) error + func (c *Channel) Continue(key *ari.Key, context, extension string, priority int) (err error) + func (c *Channel) Create(key *ari.Key, req ari.ChannelCreateRequest) (*ari.ChannelHandle, error) + func (c *Channel) Data(key *ari.Key) (*ari.ChannelData, error) + func (c *Channel) Dial(key *ari.Key, callingChannelID string, timeout time.Duration) error + func (c *Channel) ExternalMedia(key *ari.Key, opts ari.ExternalMediaOptions) (*ari.ChannelHandle, error) + func (c *Channel) Get(key *ari.Key) *ari.ChannelHandle + func (c *Channel) GetVariable(key *ari.Key, name string) (string, error) + func (c *Channel) Hangup(key *ari.Key, reason string) error + func (c *Channel) Hold(key *ari.Key) error + func (c *Channel) List(filter *ari.Key) (cx []*ari.Key, err error) + func (c *Channel) MOH(key *ari.Key, class string) error + func (c *Channel) Mute(key *ari.Key, dir ari.Direction) error + func (c *Channel) Originate(referenceKey *ari.Key, req ari.OriginateRequest) (*ari.ChannelHandle, error) + func (c *Channel) Play(key *ari.Key, playbackID string, mediaURI ...string) (*ari.PlaybackHandle, error) + func (c *Channel) Record(key *ari.Key, name string, opts *ari.RecordingOptions) (*ari.LiveRecordingHandle, error) + func (c *Channel) Ring(key *ari.Key) error + func (c *Channel) SendDTMF(key *ari.Key, dtmf string, opts *ari.DTMFOptions) error + func (c *Channel) SetVariable(key *ari.Key, name, value string) error + func (c *Channel) Silence(key *ari.Key) error + func (c *Channel) Snoop(key *ari.Key, snoopID string, opts *ari.SnoopOptions) (*ari.ChannelHandle, error) + func (c *Channel) StageExternalMedia(key *ari.Key, opts ari.ExternalMediaOptions) (*ari.ChannelHandle, error) + func (c *Channel) StageOriginate(referenceKey *ari.Key, req ari.OriginateRequest) (*ari.ChannelHandle, error) + func (c *Channel) StagePlay(key *ari.Key, playbackID string, mediaURI ...string) (*ari.PlaybackHandle, error) + func (c *Channel) StageRecord(key *ari.Key, name string, opts *ari.RecordingOptions) (*ari.LiveRecordingHandle, error) + func (c *Channel) StageSnoop(key *ari.Key, snoopID string, opts *ari.SnoopOptions) (*ari.ChannelHandle, error) + func (c *Channel) StopHold(key *ari.Key) (err error) + func (c *Channel) StopMOH(key *ari.Key) error + func (c *Channel) StopRing(key *ari.Key) error + func (c *Channel) StopSilence(key *ari.Key) error + func (c *Channel) Subscribe(key *ari.Key, n ...string) ari.Subscription + func (c *Channel) Unmute(key *ari.Key, dir ari.Direction) (err error) + func (c *Channel) UserEvent(key *ari.Key, ue *ari.ChannelUserevent) error + type Client struct + Options *Options + WSConfig *websocket.Config + func New(opts *Options, chanMsgConnected chan bool) *Client + func (c *Client) Application() ari.Application + func (c *Client) ApplicationName() string + func (c *Client) Asterisk() ari.Asterisk + func (c *Client) Bridge() ari.Bridge + func (c *Client) Bus() ari.Bus + func (c *Client) Channel() ari.Channel + func (c *Client) Close() + func (c *Client) Connect() error + func (c *Client) ConnectWithContext(ctx context.Context) error + func (c *Client) Connected() bool + func (c *Client) DeviceState() ari.DeviceState + func (c *Client) Endpoint() ari.Endpoint + func (c *Client) LiveRecording() ari.LiveRecording + func (c *Client) Mailbox() ari.Mailbox + func (c *Client) Playback() ari.Playback + func (c *Client) Sound() ari.Sound + func (c *Client) StoredRecording() ari.StoredRecording + func (c *Client) TextMessage() ari.TextMessage + type Config struct + func (c *Config) Data(key *ari.Key) (*ari.ConfigData, error) + func (c *Config) Delete(key *ari.Key) error + func (c *Config) Get(key *ari.Key) *ari.ConfigHandle + func (c *Config) Update(key *ari.Key, tuples []ari.ConfigTuple) (err error) + type DeviceState struct + func (ds *DeviceState) Data(key *ari.Key) (*ari.DeviceStateData, error) + func (ds *DeviceState) Delete(key *ari.Key) error + func (ds *DeviceState) Get(key *ari.Key) *ari.DeviceStateHandle + func (ds *DeviceState) List(filter *ari.Key) (dx []*ari.Key, err error) + func (ds *DeviceState) Update(key *ari.Key, state string) error + type Endpoint struct + func (e *Endpoint) Data(key *ari.Key) (*ari.EndpointData, error) + func (e *Endpoint) Get(key *ari.Key) *ari.EndpointHandle + func (e *Endpoint) List(filter *ari.Key) (ex []*ari.Key, err error) + func (e *Endpoint) ListByTech(tech string, filter *ari.Key) (ex []*ari.Key, err error) + type LiveRecording struct + func (lr *LiveRecording) Data(key *ari.Key) (d *ari.LiveRecordingData, err error) + func (lr *LiveRecording) Get(key *ari.Key) (h *ari.LiveRecordingHandle) + func (lr *LiveRecording) Mute(key *ari.Key) error + func (lr *LiveRecording) Pause(key *ari.Key) error + func (lr *LiveRecording) Resume(key *ari.Key) error + func (lr *LiveRecording) Scrap(key *ari.Key) error + func (lr *LiveRecording) Stop(key *ari.Key) error + func (lr *LiveRecording) Stored(key *ari.Key) *ari.StoredRecordingHandle + func (lr *LiveRecording) Subscribe(key *ari.Key, n ...string) ari.Subscription + func (lr *LiveRecording) Unmute(key *ari.Key) error + type Logging struct + func (l *Logging) Create(key *ari.Key, levels string) (*ari.LogHandle, error) + func (l *Logging) Data(key *ari.Key) (*ari.LogData, error) + func (l *Logging) Delete(key *ari.Key) error + func (l *Logging) Get(key *ari.Key) *ari.LogHandle + func (l *Logging) List(filter *ari.Key) ([]*ari.Key, error) + func (l *Logging) Rotate(key *ari.Key) error + type Mailbox struct + func (m *Mailbox) Data(key *ari.Key) (*ari.MailboxData, error) + func (m *Mailbox) Delete(key *ari.Key) error + func (m *Mailbox) Get(key *ari.Key) *ari.MailboxHandle + func (m *Mailbox) List(filter *ari.Key) (mx []*ari.Key, err error) + func (m *Mailbox) Update(key *ari.Key, oldMessages int, newMessages int) error + type MissingParams struct + Params []string + Type string + type Modules struct + func (m *Modules) Data(key *ari.Key) (*ari.ModuleData, error) + func (m *Modules) Get(key *ari.Key) *ari.ModuleHandle + func (m *Modules) List(filter *ari.Key) (ret []*ari.Key, err error) + func (m *Modules) Load(key *ari.Key) error + func (m *Modules) Reload(key *ari.Key) error + func (m *Modules) Unload(key *ari.Key) error + type Options struct + Application string + Password string + SubscribeAll bool + URL string + Username string + WebsocketOrigin string + WebsocketURL string + type Playback struct + func (a *Playback) Control(key *ari.Key, op string) error + func (a *Playback) Data(key *ari.Key) (*ari.PlaybackData, error) + func (a *Playback) Get(key *ari.Key) *ari.PlaybackHandle + func (a *Playback) Stop(key *ari.Key) error + func (a *Playback) Subscribe(key *ari.Key, n ...string) ari.Subscription + type RequestError interface + Code func() int + type Sound struct + func (s *Sound) Data(key *ari.Key) (*ari.SoundData, error) + func (s *Sound) List(filters map[string]string, keyFilter *ari.Key) (sh []*ari.Key, err error) + type StoredRecording struct + func (sr *StoredRecording) Copy(key *ari.Key, dest string) (*ari.StoredRecordingHandle, error) + func (sr *StoredRecording) Data(key *ari.Key) (*ari.StoredRecordingData, error) + func (sr *StoredRecording) Delete(key *ari.Key) error + func (sr *StoredRecording) Get(key *ari.Key) *ari.StoredRecordingHandle + func (sr *StoredRecording) List(filter *ari.Key) (sx []*ari.Key, err error) + func (sr *StoredRecording) StageCopy(key *ari.Key, dest string) (*ari.StoredRecordingHandle, error) + type TextMessage struct + func (t *TextMessage) Send(from, tech, resource, body string, vars map[string]string) error + func (t *TextMessage) SendByURI(from, to, body string, vars map[string]string) error