Documentation
¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type Application
- type ApplicationMoveFailed
- type ApplicationReplaced
- type ApplicationsApiFilterOpts
- type ApplicationsApiService
- func (a *ApplicationsApiService) Filter(ctx context.Context, applicationName string, ...) (Application, *http.Response, error)
- func (a *ApplicationsApiService) Get(ctx context.Context, applicationName string) (Application, *http.Response, error)
- func (a *ApplicationsApiService) List(ctx context.Context) ([]Application, *http.Response, error)
- func (a *ApplicationsApiService) Subscribe(ctx context.Context, applicationName string, eventSource []string) (Application, *http.Response, error)
- func (a *ApplicationsApiService) Unsubscribe(ctx context.Context, applicationName string, eventSource []string) (Application, *http.Response, error)
- type AsteriskApiGetInfoOpts
- type AsteriskApiService
- func (a *AsteriskApiService) AddLog(ctx context.Context, logChannelName string, configuration string) (*http.Response, error)
- func (a *AsteriskApiService) DeleteLog(ctx context.Context, logChannelName string) (*http.Response, error)
- func (a *AsteriskApiService) DeleteObject(ctx context.Context, configClass string, objectType string, id string) (*http.Response, error)
- func (a *AsteriskApiService) GetGlobalVar(ctx context.Context, variable string) (Variable, *http.Response, error)
- func (a *AsteriskApiService) GetInfo(ctx context.Context, localVarOptionals *AsteriskApiGetInfoOpts) (AsteriskInfo, *http.Response, error)
- func (a *AsteriskApiService) GetModule(ctx context.Context, moduleName string) (Module, *http.Response, error)
- func (a *AsteriskApiService) GetObject(ctx context.Context, configClass string, objectType string, id string) ([]ConfigTuple, *http.Response, error)
- func (a *AsteriskApiService) ListLogChannels(ctx context.Context) ([]LogChannel, *http.Response, error)
- func (a *AsteriskApiService) ListModules(ctx context.Context) ([]Module, *http.Response, error)
- func (a *AsteriskApiService) LoadModule(ctx context.Context, moduleName string) (*http.Response, error)
- func (a *AsteriskApiService) Ping(ctx context.Context) (AsteriskPing, *http.Response, error)
- func (a *AsteriskApiService) ReloadModule(ctx context.Context, moduleName string) (*http.Response, error)
- func (a *AsteriskApiService) RotateLog(ctx context.Context, logChannelName string) (*http.Response, error)
- func (a *AsteriskApiService) SetGlobalVar(ctx context.Context, variable string, ...) (*http.Response, error)
- func (a *AsteriskApiService) UnloadModule(ctx context.Context, moduleName string) (*http.Response, error)
- func (a *AsteriskApiService) UpdateObject(ctx context.Context, configClass string, objectType string, id string, ...) ([]ConfigTuple, *http.Response, error)
- type AsteriskApiSetGlobalVarOpts
- type AsteriskApiUpdateObjectOpts
- type AsteriskInfo
- type AsteriskPing
- type BasicAuth
- type Binary
- type Bridge
- type BridgeAttendedTransfer
- type BridgeBlindTransfer
- type BridgeCreated
- type BridgeDestroyed
- type BridgeMerged
- type BridgeVideoSourceChanged
- type BridgesApiAddChannelOpts
- type BridgesApiCreateOpts
- type BridgesApiCreateWithIdOpts
- type BridgesApiPlayOpts
- type BridgesApiPlayWithIdOpts
- type BridgesApiRecordOpts
- type BridgesApiService
- func (a *BridgesApiService) AddChannel(ctx context.Context, bridgeId string, channel []string, ...) (*http.Response, error)
- func (a *BridgesApiService) ClearVideoSource(ctx context.Context, bridgeId string) (*http.Response, error)
- func (a *BridgesApiService) Create(ctx context.Context, localVarOptionals *BridgesApiCreateOpts) (Bridge, *http.Response, error)
- func (a *BridgesApiService) CreateWithId(ctx context.Context, bridgeId string, ...) (Bridge, *http.Response, error)
- func (a *BridgesApiService) Destroy(ctx context.Context, bridgeId string) (*http.Response, error)
- func (a *BridgesApiService) Getbridge(ctx context.Context, bridgeId string) (Bridge, *http.Response, error)
- func (a *BridgesApiService) Listbridges(ctx context.Context) ([]Bridge, *http.Response, error)
- func (a *BridgesApiService) Play(ctx context.Context, bridgeId string, media []string, ...) (Playback, *http.Response, error)
- func (a *BridgesApiService) PlayWithId(ctx context.Context, bridgeId string, playbackId string, media []string, ...) (Playback, *http.Response, error)
- func (a *BridgesApiService) Record(ctx context.Context, bridgeId string, name string, format string, ...) (LiveRecording, *http.Response, error)
- func (a *BridgesApiService) RemoveChannel(ctx context.Context, bridgeId string, channel []string) (*http.Response, error)
- func (a *BridgesApiService) SetVideoSource(ctx context.Context, bridgeId string, channelId string) (*http.Response, error)
- func (a *BridgesApiService) StartMoh(ctx context.Context, bridgeId string, ...) (*http.Response, error)
- func (a *BridgesApiService) StopMoh(ctx context.Context, bridgeId string) (*http.Response, error)
- type BridgesApiStartMohOpts
- type BuildInfo
- type CallerId
- type Channel
- type ChannelCallerId
- type ChannelConnectedLine
- type ChannelCreated
- type ChannelDestroyed
- type ChannelDialplan
- type ChannelDtmfReceived
- type ChannelEnteredBridge
- type ChannelHangupRequest
- type ChannelHold
- type ChannelLeftBridge
- type ChannelStateChange
- type ChannelTalkingFinished
- type ChannelTalkingStarted
- type ChannelUnhold
- type ChannelUserevent
- type ChannelVarset
- type ChannelsApiAddMohOpts
- type ChannelsApiContinueInDialplanOpts
- type ChannelsApiCreatechannelOpts
- type ChannelsApiDialOpts
- type ChannelsApiExternalMediaOpts
- type ChannelsApiHangupOpts
- type ChannelsApiMoveOpts
- type ChannelsApiMuteOpts
- type ChannelsApiOriginateOpts
- type ChannelsApiOriginateWithIdOpts
- type ChannelsApiPlaySoundWithIdOpts
- type ChannelsApiPlaysoundOpts
- type ChannelsApiRecordchannelOpts
- type ChannelsApiSendDTMFOpts
- type ChannelsApiService
- func (a *ChannelsApiService) AddMoh(ctx context.Context, channelId string, ...) (*http.Response, error)
- func (a *ChannelsApiService) Answer(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) ContinueInDialplan(ctx context.Context, channelId string, ...) (*http.Response, error)
- func (a *ChannelsApiService) Createchannel(ctx context.Context, endpoint string, app string, ...) (Channel, *http.Response, error)
- func (a *ChannelsApiService) Deletemoh(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) Dial(ctx context.Context, channelId string, localVarOptionals *ChannelsApiDialOpts) (*http.Response, error)
- func (a *ChannelsApiService) ExternalMedia(ctx context.Context, app string, externalHost string, format string, ...) (Channel, *http.Response, error)
- func (a *ChannelsApiService) GetChannelVar(ctx context.Context, channelId string, variable string) (Variable, *http.Response, error)
- func (a *ChannelsApiService) Getchannel(ctx context.Context, channelId string) (Channel, *http.Response, error)
- func (a *ChannelsApiService) Hangup(ctx context.Context, channelId string, ...) (*http.Response, error)
- func (a *ChannelsApiService) Hold(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) Listchannels(ctx context.Context) ([]Channel, *http.Response, error)
- func (a *ChannelsApiService) Move(ctx context.Context, channelId string, app string, ...) (*http.Response, error)
- func (a *ChannelsApiService) Mute(ctx context.Context, channelId string, localVarOptionals *ChannelsApiMuteOpts) (*http.Response, error)
- func (a *ChannelsApiService) Originate(ctx context.Context, endpoint string, ...) (Channel, *http.Response, error)
- func (a *ChannelsApiService) OriginateWithId(ctx context.Context, channelId string, endpoint string, ...) (Channel, *http.Response, error)
- func (a *ChannelsApiService) PlaySoundWithId(ctx context.Context, channelId string, playbackId string, media []string, ...) (Playback, *http.Response, error)
- func (a *ChannelsApiService) Playsound(ctx context.Context, channelId string, media []string, ...) (Playback, *http.Response, error)
- func (a *ChannelsApiService) Recordchannel(ctx context.Context, channelId string, name string, format string, ...) (LiveRecording, *http.Response, error)
- func (a *ChannelsApiService) Redirect(ctx context.Context, channelId string, endpoint string) (*http.Response, error)
- func (a *ChannelsApiService) Ring(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) RingStop(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) Rtpstatistics(ctx context.Context, channelId string) (RtPstat, *http.Response, error)
- func (a *ChannelsApiService) SendDTMF(ctx context.Context, channelId string, ...) (*http.Response, error)
- func (a *ChannelsApiService) SetChannelVar(ctx context.Context, channelId string, variable string, ...) (*http.Response, error)
- func (a *ChannelsApiService) SnoopChannel(ctx context.Context, channelId string, app string, ...) (Channel, *http.Response, error)
- func (a *ChannelsApiService) SnoopChannelWithId(ctx context.Context, channelId string, snoopId string, app string, ...) (Channel, *http.Response, error)
- func (a *ChannelsApiService) StartSilence(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) StopSilence(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) Unhold(ctx context.Context, channelId string) (*http.Response, error)
- func (a *ChannelsApiService) Unmute(ctx context.Context, channelId string, ...) (*http.Response, error)
- type ChannelsApiSetChannelVarOpts
- type ChannelsApiSnoopChannelOpts
- type ChannelsApiSnoopChannelWithIdOpts
- type ChannelsApiUnmuteOpts
- type ConfigInfo
- type ConfigTuple
- type Configuration
- type ContactInfo
- type ContactStatusChange
- type Containers
- type DeviceState
- type DeviceStateChanged
- type DeviceStatesApiService
- func (a *DeviceStatesApiService) Delete(ctx context.Context, deviceName string) (*http.Response, error)
- func (a *DeviceStatesApiService) Getdevicestate(ctx context.Context, deviceName string) (DeviceState, *http.Response, error)
- func (a *DeviceStatesApiService) ListDeviceStates(ctx context.Context) ([]DeviceState, *http.Response, error)
- func (a *DeviceStatesApiService) Update(ctx context.Context, deviceName string, deviceState string) (*http.Response, error)
- type Dial
- type Dialed
- type DialplanCep
- type Endpoint
- type EndpointStateChange
- type EndpointsApiSendMessageOpts
- type EndpointsApiSendMessageToEndpointOpts
- type EndpointsApiService
- func (a *EndpointsApiService) Getendpoint(ctx context.Context, tech string, resource string) (Endpoint, *http.Response, error)
- func (a *EndpointsApiService) ListByTech(ctx context.Context, tech string) ([]Endpoint, *http.Response, error)
- func (a *EndpointsApiService) Listendpoints(ctx context.Context) ([]Endpoint, *http.Response, error)
- func (a *EndpointsApiService) SendMessage(ctx context.Context, to string, from string, ...) (*http.Response, error)
- func (a *EndpointsApiService) SendMessageToEndpoint(ctx context.Context, tech string, resource string, from string, ...) (*http.Response, error)
- type Event
- type EventsApiEventWebsocketOpts
- type EventsApiService
- type EventsApiUserEventOpts
- type FormatLangPair
- type GenericSwaggerError
- type LiveRecording
- type LogChannel
- type Mailbox
- type MailboxesApiService
- func (a *MailboxesApiService) Deletemailbox(ctx context.Context, mailboxName string) (*http.Response, error)
- func (a *MailboxesApiService) Getmailbox(ctx context.Context, mailboxName string) (Mailbox, *http.Response, error)
- func (a *MailboxesApiService) Listmailboxes(ctx context.Context) ([]Mailbox, *http.Response, error)
- func (a *MailboxesApiService) Updatemailbox(ctx context.Context, mailboxName string, oldMessages int32, newMessages int32) (*http.Response, error)
- type Message
- type MissingParams
- type Module
- type Peer
- type PeerStatusChange
- type Playback
- type PlaybackContinuing
- type PlaybackFinished
- type PlaybackStarted
- type PlaybacksApiService
- func (a *PlaybacksApiService) Control(ctx context.Context, playbackId string, operation string) (*http.Response, error)
- func (a *PlaybacksApiService) Getplayback(ctx context.Context, playbackId string) (Playback, *http.Response, error)
- func (a *PlaybacksApiService) Stop(ctx context.Context, playbackId string) (*http.Response, error)
- type RecordingFailed
- type RecordingFinished
- type RecordingStarted
- type RecordingsApiService
- func (a *RecordingsApiService) Cancel(ctx context.Context, recordingName string) (*http.Response, error)
- func (a *RecordingsApiService) CopyStored(ctx context.Context, recordingName string, destinationRecordingName string) (StoredRecording, *http.Response, error)
- func (a *RecordingsApiService) DeleteStored(ctx context.Context, recordingName string) (*http.Response, error)
- func (a *RecordingsApiService) GetLive(ctx context.Context, recordingName string) (LiveRecording, *http.Response, error)
- func (a *RecordingsApiService) GetStored(ctx context.Context, recordingName string) (StoredRecording, *http.Response, error)
- func (a *RecordingsApiService) GetStoredFile(ctx context.Context, recordingName string) (string, *http.Response, error)
- func (a *RecordingsApiService) ListStored(ctx context.Context) ([]StoredRecording, *http.Response, error)
- func (a *RecordingsApiService) Muterecording(ctx context.Context, recordingName string) (*http.Response, error)
- func (a *RecordingsApiService) Pause(ctx context.Context, recordingName string) (*http.Response, error)
- func (a *RecordingsApiService) Stoprecording(ctx context.Context, recordingName string) (*http.Response, error)
- func (a *RecordingsApiService) Unmuterecording(ctx context.Context, recordingName string) (*http.Response, error)
- func (a *RecordingsApiService) Unpause(ctx context.Context, recordingName string) (*http.Response, error)
- type RtPstat
- type SetId
- type Sound
- type SoundsApiListsoundsOpts
- type SoundsApiService
- type StasisEnd
- type StasisEvent
- type StasisStart
- type StasisTimestampEvent
- type StatusInfo
- type StoredRecording
- type SystemInfo
- type TextMessage
- type TextMessageReceived
- type Variable
- type WebsocketApiService
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { ApplicationsApi *ApplicationsApiService AsteriskApi *AsteriskApiService BridgesApi *BridgesApiService ChannelsApi *ChannelsApiService DeviceStatesApi *DeviceStatesApiService EndpointsApi *EndpointsApiService EventsApi *EventsApiService MailboxesApi *MailboxesApiService PlaybacksApi *PlaybacksApiService RecordingsApi *RecordingsApiService SoundsApi *SoundsApiService WebsocketApi *WebsocketApiService // contains filtered or unexported fields }
APIClient manages communication with the localhost:8088 API v6.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration, logger ...*logrus.Logger) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type Application ¶
type Application struct { // Id's for bridges subscribed to. BridgeIds []string `json:"bridge_ids"` // Id's for channels subscribed to. ChannelIds []string `json:"channel_ids"` // Names of the devices subscribed to. DeviceNames []string `json:"device_names"` // {tech}/{resource} for endpoints subscribed to. EndpointIds []string `json:"endpoint_ids"` // Event types sent to the application. EventsAllowed []interface{} `json:"events_allowed"` // Event types not sent to the application. EventsDisallowed []interface{} `json:"events_disallowed"` // Name of this application Name string `json:"name"` }
Details of a Stasis application
type ApplicationMoveFailed ¶
type ApplicationMoveFailed struct { }
type ApplicationReplaced ¶
type ApplicationReplaced struct { }
type ApplicationsApiService ¶
type ApplicationsApiService service
func (*ApplicationsApiService) Filter ¶
func (a *ApplicationsApiService) Filter(ctx context.Context, applicationName string, localVarOptionals *ApplicationsApiFilterOpts) (Application, *http.Response, error)
func (*ApplicationsApiService) Get ¶
func (a *ApplicationsApiService) Get(ctx context.Context, applicationName string) (Application, *http.Response, error)
ApplicationsApiService Get details of an application.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param applicationName Application's name
@return Application
func (*ApplicationsApiService) List ¶
func (a *ApplicationsApiService) List(ctx context.Context) ([]Application, *http.Response, error)
ApplicationsApiService List all applications.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Application
func (*ApplicationsApiService) Subscribe ¶
func (a *ApplicationsApiService) Subscribe(ctx context.Context, applicationName string, eventSource []string) (Application, *http.Response, error)
ApplicationsApiService Subscribe an application to a event source. Returns the state of the application after the subscriptions have changed
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param applicationName Application's name
- @param eventSource URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}
@return Application
func (*ApplicationsApiService) Unsubscribe ¶
func (a *ApplicationsApiService) Unsubscribe(ctx context.Context, applicationName string, eventSource []string) (Application, *http.Response, error)
ApplicationsApiService Unsubscribe an application from an event source. Returns the state of the application after the subscriptions have changed
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param applicationName Application's name
- @param eventSource URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}[/{resource}], deviceState:{deviceName}
@return Application
type AsteriskApiGetInfoOpts ¶
type AsteriskApiService ¶
type AsteriskApiService service
func (*AsteriskApiService) AddLog ¶
func (a *AsteriskApiService) AddLog(ctx context.Context, logChannelName string, configuration string) (*http.Response, error)
AddLog Adds a log channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param logChannelName The log channel to add
- @param configuration levels of the log channel
func (*AsteriskApiService) DeleteLog ¶
func (a *AsteriskApiService) DeleteLog(ctx context.Context, logChannelName string) (*http.Response, error)
DeleteLog Deletes a log channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param logChannelName Log channels name
func (*AsteriskApiService) DeleteObject ¶
func (a *AsteriskApiService) DeleteObject(ctx context.Context, configClass string, objectType string, id string) (*http.Response, error)
DeleteObject Delete a dynamic configuration object.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param configClass The configuration class containing dynamic configuration objects.
- @param objectType The type of configuration object to delete.
- @param id The unique identifier of the object to delete.
func (*AsteriskApiService) GetGlobalVar ¶
func (a *AsteriskApiService) GetGlobalVar(ctx context.Context, variable string) (Variable, *http.Response, error)
GetGlobalVar Get the value of a global variable.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param variable The variable to get
@return Variable
func (*AsteriskApiService) GetInfo ¶
func (a *AsteriskApiService) GetInfo(ctx context.Context, localVarOptionals *AsteriskApiGetInfoOpts) (AsteriskInfo, *http.Response, error)
func (*AsteriskApiService) GetModule ¶
func (a *AsteriskApiService) GetModule(ctx context.Context, moduleName string) (Module, *http.Response, error)
GetModule Get Asterisk module information.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param moduleName Module's name
@return Module
func (*AsteriskApiService) GetObject ¶
func (a *AsteriskApiService) GetObject(ctx context.Context, configClass string, objectType string, id string) ([]ConfigTuple, *http.Response, error)
GetObject Retrieve a dynamic configuration object.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param configClass The configuration class containing dynamic configuration objects.
- @param objectType The type of configuration object to retrieve.
- @param id The unique identifier of the object to retrieve.
@return []ConfigTuple
func (*AsteriskApiService) ListLogChannels ¶
func (a *AsteriskApiService) ListLogChannels(ctx context.Context) ([]LogChannel, *http.Response, error)
ListLogChannels Gets Asterisk log channel information.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []LogChannel
func (*AsteriskApiService) ListModules ¶
ListModules List Asterisk modules.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Module
func (*AsteriskApiService) LoadModule ¶
func (a *AsteriskApiService) LoadModule(ctx context.Context, moduleName string) (*http.Response, error)
LoadModule Load an Asterisk module.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param moduleName Module's name
func (*AsteriskApiService) Ping ¶
func (a *AsteriskApiService) Ping(ctx context.Context) (AsteriskPing, *http.Response, error)
Ping Response pong message.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return AsteriskPing
func (*AsteriskApiService) ReloadModule ¶
func (a *AsteriskApiService) ReloadModule(ctx context.Context, moduleName string) (*http.Response, error)
ReloadModule Reload an Asterisk module.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param moduleName Module's name
func (*AsteriskApiService) RotateLog ¶
func (a *AsteriskApiService) RotateLog(ctx context.Context, logChannelName string) (*http.Response, error)
RotateLog Rotates a log channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param logChannelName Log channel's name
func (*AsteriskApiService) SetGlobalVar ¶
func (a *AsteriskApiService) SetGlobalVar(ctx context.Context, variable string, localVarOptionals *AsteriskApiSetGlobalVarOpts) (*http.Response, error)
func (*AsteriskApiService) UnloadModule ¶
func (a *AsteriskApiService) UnloadModule(ctx context.Context, moduleName string) (*http.Response, error)
UnloadModule Unload an Asterisk module.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param moduleName Module's name
func (*AsteriskApiService) UpdateObject ¶
func (a *AsteriskApiService) UpdateObject(ctx context.Context, configClass string, objectType string, id string, localVarOptionals *AsteriskApiUpdateObjectOpts) ([]ConfigTuple, *http.Response, error)
type AsteriskInfo ¶
type AsteriskInfo struct { // Info about how Asterisk was built Build *BuildInfo `json:"build,omitempty"` // Info about Asterisk configuration Config *ConfigInfo `json:"config,omitempty"` // Info about Asterisk status Status *StatusInfo `json:"status,omitempty"` // Info about the system running Asterisk System *SystemInfo `json:"system,omitempty"` }
Asterisk system information
type AsteriskPing ¶
type AsteriskPing struct { // Asterisk id info AsteriskId string `json:"asterisk_id"` // Always string value is pong Ping string `json:"ping"` // The timestamp string of request received time Timestamp string `json:"timestamp"` }
Asterisk ping information
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Bridge ¶
type Bridge struct { // Bridging class BridgeClass string `json:"bridge_class"` // Type of bridge technology BridgeType string `json:"bridge_type"` // Ids of channels participating in this bridge Channels []string `json:"channels"` // Timestamp when bridge was created Creationtime string `json:"creationtime"` // Entity that created the bridge Creator string `json:"creator"` // Unique identifier for this bridge Id string `json:"id"` // Name the creator gave the bridge Name string `json:"name"` // Name of the current bridging technology Technology string `json:"technology"` // The video mode the bridge is using. One of 'none', 'talker', or 'single'. VideoMode string `json:"video_mode,omitempty"` // The ID of the channel that is the source of video in this bridge, if one exists. VideoSourceId string `json:"video_source_id,omitempty"` }
The merging of media from one or more channels. Everyone on the bridge receives the same audio.
type BridgeAttendedTransfer ¶
type BridgeAttendedTransfer struct { }
type BridgeBlindTransfer ¶
type BridgeBlindTransfer struct { }
type BridgeCreated ¶
type BridgeCreated struct { }
type BridgeDestroyed ¶
type BridgeDestroyed struct { }
type BridgeMerged ¶
type BridgeMerged struct { }
type BridgeVideoSourceChanged ¶
type BridgeVideoSourceChanged struct { }
type BridgesApiCreateOpts ¶
type BridgesApiPlayOpts ¶
type BridgesApiRecordOpts ¶
type BridgesApiService ¶
type BridgesApiService service
func (*BridgesApiService) AddChannel ¶
func (a *BridgesApiService) AddChannel(ctx context.Context, bridgeId string, channel []string, localVarOptionals *BridgesApiAddChannelOpts) (*http.Response, error)
func (*BridgesApiService) ClearVideoSource ¶
func (a *BridgesApiService) ClearVideoSource(ctx context.Context, bridgeId string) (*http.Response, error)
BridgesApiService Removes any explicit video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants. When no explicit video source is set, talk detection will be used to determine the active video stream.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param bridgeId Bridge's id
func (*BridgesApiService) Create ¶
func (a *BridgesApiService) Create(ctx context.Context, localVarOptionals *BridgesApiCreateOpts) (Bridge, *http.Response, error)
func (*BridgesApiService) CreateWithId ¶
func (a *BridgesApiService) CreateWithId(ctx context.Context, bridgeId string, localVarOptionals *BridgesApiCreateWithIdOpts) (Bridge, *http.Response, error)
func (*BridgesApiService) Destroy ¶
BridgesApiService Shut down a bridge. If any channels are in this bridge, they will be removed and resume whatever they were doing beforehand.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param bridgeId Bridge's id
func (*BridgesApiService) Getbridge ¶
func (a *BridgesApiService) Getbridge(ctx context.Context, bridgeId string) (Bridge, *http.Response, error)
BridgesApiService Get bridge details.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param bridgeId Bridge's id
@return Bridge
func (*BridgesApiService) Listbridges ¶
BridgesApiService List all active bridges in Asterisk.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Bridge
func (*BridgesApiService) Play ¶
func (a *BridgesApiService) Play(ctx context.Context, bridgeId string, media []string, localVarOptionals *BridgesApiPlayOpts) (Playback, *http.Response, error)
func (*BridgesApiService) PlayWithId ¶
func (*BridgesApiService) Record ¶
func (a *BridgesApiService) Record(ctx context.Context, bridgeId string, name string, format string, localVarOptionals *BridgesApiRecordOpts) (LiveRecording, *http.Response, error)
func (*BridgesApiService) RemoveChannel ¶
func (a *BridgesApiService) RemoveChannel(ctx context.Context, bridgeId string, channel []string) (*http.Response, error)
BridgesApiService Remove a channel from a bridge.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param bridgeId Bridge's id
- @param channel Ids of channels to remove from bridge
func (*BridgesApiService) SetVideoSource ¶
func (a *BridgesApiService) SetVideoSource(ctx context.Context, bridgeId string, channelId string) (*http.Response, error)
BridgesApiService Set a channel as the video source in a multi-party mixing bridge. This operation has no effect on bridges with two or fewer participants.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param bridgeId Bridge's id
- @param channelId Channel's id
func (*BridgesApiService) StartMoh ¶
func (a *BridgesApiService) StartMoh(ctx context.Context, bridgeId string, localVarOptionals *BridgesApiStartMohOpts) (*http.Response, error)
func (*BridgesApiService) StopMoh ¶
BridgesApiService Stop playing music on hold to a bridge. This will only stop music on hold being played via POST bridges/{bridgeId}/moh.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param bridgeId Bridge's id
type BridgesApiStartMohOpts ¶
type BuildInfo ¶
type BuildInfo struct { // Date and time when Asterisk was built. Date string `json:"date"` // Kernel version Asterisk was built on. Kernel string `json:"kernel"` // Machine architecture (x86_64, i686, ppc, etc.) Machine string `json:"machine"` // Compile time options, or empty string if default. Options string `json:"options"` // OS Asterisk was built on. Os string `json:"os"` // Username that build Asterisk User string `json:"user"` }
Info about how Asterisk was built
type Channel ¶
type Channel struct { Accountcode string `json:"accountcode"` Caller *CallerId `json:"caller"` // Channel variables Channelvars interface{} `json:"channelvars,omitempty"` Connected *CallerId `json:"connected"` // Timestamp when channel was created Creationtime string `json:"creationtime"` // Current location in the dialplan Dialplan *DialplanCep `json:"dialplan"` // Unique identifier of the channel. This is the same as the Uniqueid field in AMI. Id string `json:"id"` // The default spoken language Language string `json:"language"` // Name of the channel (i.e. SIP/foo-0000a7e3) Name string `json:"name"` State string `json:"state"` }
A specific communication connection between Asterisk and an Endpoint.
type ChannelCallerId ¶
type ChannelCallerId struct { }
type ChannelConnectedLine ¶
type ChannelConnectedLine struct { }
type ChannelCreated ¶
type ChannelCreated struct { }
type ChannelDestroyed ¶
type ChannelDestroyed struct { }
type ChannelDialplan ¶
type ChannelDialplan struct { }
type ChannelDtmfReceived ¶
type ChannelDtmfReceived struct { }
type ChannelEnteredBridge ¶
type ChannelEnteredBridge struct { }
type ChannelHangupRequest ¶
type ChannelHangupRequest struct { }
type ChannelHold ¶
type ChannelHold struct { }
type ChannelLeftBridge ¶
type ChannelLeftBridge struct { }
type ChannelStateChange ¶
type ChannelStateChange struct { }
type ChannelTalkingFinished ¶
type ChannelTalkingFinished struct { }
type ChannelTalkingStarted ¶
type ChannelTalkingStarted struct { }
type ChannelUnhold ¶
type ChannelUnhold struct { }
type ChannelUserevent ¶
type ChannelUserevent struct { }
type ChannelVarset ¶
type ChannelVarset struct { }
type ChannelsApiAddMohOpts ¶
type ChannelsApiDialOpts ¶
type ChannelsApiHangupOpts ¶
type ChannelsApiMoveOpts ¶
type ChannelsApiMuteOpts ¶
type ChannelsApiOriginateOpts ¶
type ChannelsApiOriginateOpts struct { Extension optional.String Context optional.String Priority optional.Int64 Label optional.String App optional.String AppArgs optional.String CallerId optional.String Timeout optional.Int32 Variables optional.Interface ChannelId optional.String OtherChannelId optional.String Originator optional.String Formats optional.String }
type ChannelsApiOriginateWithIdOpts ¶
type ChannelsApiOriginateWithIdOpts struct { Extension optional.String Context optional.String Priority optional.Int64 Label optional.String App optional.String AppArgs optional.String CallerId optional.String Timeout optional.Int32 Variables optional.Interface OtherChannelId optional.String Originator optional.String Formats optional.String }
type ChannelsApiSendDTMFOpts ¶
type ChannelsApiService ¶
type ChannelsApiService service
func (*ChannelsApiService) AddMoh ¶
func (a *ChannelsApiService) AddMoh(ctx context.Context, channelId string, localVarOptionals *ChannelsApiAddMohOpts) (*http.Response, error)
func (*ChannelsApiService) Answer ¶
ChannelsApiService Answer a channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) ContinueInDialplan ¶
func (a *ChannelsApiService) ContinueInDialplan(ctx context.Context, channelId string, localVarOptionals *ChannelsApiContinueInDialplanOpts) (*http.Response, error)
func (*ChannelsApiService) Createchannel ¶
func (a *ChannelsApiService) Createchannel(ctx context.Context, endpoint string, app string, localVarOptionals *ChannelsApiCreatechannelOpts) (Channel, *http.Response, error)
func (*ChannelsApiService) Deletemoh ¶
func (a *ChannelsApiService) Deletemoh(ctx context.Context, channelId string) (*http.Response, error)
ChannelsApiService Stop playing music on hold to a channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) Dial ¶
func (a *ChannelsApiService) Dial(ctx context.Context, channelId string, localVarOptionals *ChannelsApiDialOpts) (*http.Response, error)
func (*ChannelsApiService) ExternalMedia ¶
func (*ChannelsApiService) GetChannelVar ¶
func (a *ChannelsApiService) GetChannelVar(ctx context.Context, channelId string, variable string) (Variable, *http.Response, error)
ChannelsApiService Get the value of a channel variable or function.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
- @param variable The channel variable or function to get
@return Variable
func (*ChannelsApiService) Getchannel ¶
func (a *ChannelsApiService) Getchannel(ctx context.Context, channelId string) (Channel, *http.Response, error)
ChannelsApiService Channel details.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
@return Channel
func (*ChannelsApiService) Hangup ¶
func (a *ChannelsApiService) Hangup(ctx context.Context, channelId string, localVarOptionals *ChannelsApiHangupOpts) (*http.Response, error)
func (*ChannelsApiService) Hold ¶
ChannelsApiService Hold a channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) Listchannels ¶
ChannelsApiService List all active channels in Asterisk.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Channel
func (*ChannelsApiService) Move ¶
func (a *ChannelsApiService) Move(ctx context.Context, channelId string, app string, localVarOptionals *ChannelsApiMoveOpts) (*http.Response, error)
func (*ChannelsApiService) Mute ¶
func (a *ChannelsApiService) Mute(ctx context.Context, channelId string, localVarOptionals *ChannelsApiMuteOpts) (*http.Response, error)
func (*ChannelsApiService) Originate ¶
func (a *ChannelsApiService) Originate(ctx context.Context, endpoint string, localVarOptionals *ChannelsApiOriginateOpts) (Channel, *http.Response, error)
func (*ChannelsApiService) OriginateWithId ¶
func (a *ChannelsApiService) OriginateWithId(ctx context.Context, channelId string, endpoint string, localVarOptionals *ChannelsApiOriginateWithIdOpts) (Channel, *http.Response, error)
func (*ChannelsApiService) PlaySoundWithId ¶
func (*ChannelsApiService) Playsound ¶
func (a *ChannelsApiService) Playsound(ctx context.Context, channelId string, media []string, localVarOptionals *ChannelsApiPlaysoundOpts) (Playback, *http.Response, error)
func (*ChannelsApiService) Recordchannel ¶
func (a *ChannelsApiService) Recordchannel(ctx context.Context, channelId string, name string, format string, localVarOptionals *ChannelsApiRecordchannelOpts) (LiveRecording, *http.Response, error)
func (*ChannelsApiService) Redirect ¶
func (a *ChannelsApiService) Redirect(ctx context.Context, channelId string, endpoint string) (*http.Response, error)
ChannelsApiService Redirect the channel to a different location.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
- @param endpoint The endpoint to redirect the channel to
func (*ChannelsApiService) Ring ¶
ChannelsApiService Indicate ringing to a channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) RingStop ¶
func (a *ChannelsApiService) RingStop(ctx context.Context, channelId string) (*http.Response, error)
ChannelsApiService Stop ringing indication on a channel if locally generated.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) Rtpstatistics ¶
func (a *ChannelsApiService) Rtpstatistics(ctx context.Context, channelId string) (RtPstat, *http.Response, error)
ChannelsApiService RTP stats on a channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
@return RtPstat
func (*ChannelsApiService) SendDTMF ¶
func (a *ChannelsApiService) SendDTMF(ctx context.Context, channelId string, localVarOptionals *ChannelsApiSendDTMFOpts) (*http.Response, error)
func (*ChannelsApiService) SetChannelVar ¶
func (a *ChannelsApiService) SetChannelVar(ctx context.Context, channelId string, variable string, localVarOptionals *ChannelsApiSetChannelVarOpts) (*http.Response, error)
func (*ChannelsApiService) SnoopChannel ¶
func (a *ChannelsApiService) SnoopChannel(ctx context.Context, channelId string, app string, localVarOptionals *ChannelsApiSnoopChannelOpts) (Channel, *http.Response, error)
func (*ChannelsApiService) SnoopChannelWithId ¶
func (*ChannelsApiService) StartSilence ¶
func (a *ChannelsApiService) StartSilence(ctx context.Context, channelId string) (*http.Response, error)
ChannelsApiService Play silence to a channel. Using media operations such as /play on a channel playing silence in this manner will suspend silence without resuming automatically.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) StopSilence ¶
func (a *ChannelsApiService) StopSilence(ctx context.Context, channelId string) (*http.Response, error)
ChannelsApiService Stop playing silence to a channel.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) Unhold ¶
ChannelsApiService Remove a channel from hold.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param channelId Channel's id
func (*ChannelsApiService) Unmute ¶
func (a *ChannelsApiService) Unmute(ctx context.Context, channelId string, localVarOptionals *ChannelsApiUnmuteOpts) (*http.Response, error)
type ChannelsApiUnmuteOpts ¶
type ConfigInfo ¶
type ConfigInfo struct { // Default language for media playback. DefaultLanguage string `json:"default_language"` // Maximum number of simultaneous channels. MaxChannels int32 `json:"max_channels,omitempty"` // Maximum load avg on system. MaxLoad float64 `json:"max_load,omitempty"` // Maximum number of open file handles (files, sockets). MaxOpenFiles int32 `json:"max_open_files,omitempty"` // Asterisk system name. Name string `json:"name"` // Effective user/group id for running Asterisk. Setid *SetId `json:"setid"` }
Info about Asterisk configuration
type ConfigTuple ¶
type ConfigTuple struct { // A configuration object attribute. Attribute string `json:"attribute"` // The value for the attribute. Value string `json:"value"` }
A key/value pair that makes up part of a configuration object.
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration(basePath string) *Configuration
NewConfiguration creates a new Configuration object to be passed to the client. DO NOT INCLUDE "/ari" in the basePath.
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type ContactInfo ¶
type ContactInfo struct { // The Address of Record this contact belongs to. Aor string `json:"aor"` // The current status of the contact. ContactStatus string `json:"contact_status"` // Current round trip time, in microseconds, for the contact. RoundtripUsec string `json:"roundtrip_usec,omitempty"` // The location of the contact. Uri string `json:"uri"` }
Detailed information about a contact on an endpoint.
type ContactStatusChange ¶
type ContactStatusChange struct { }
type DeviceState ¶
type DeviceState struct { // Name of the device. Name string `json:"name"` // Device's state State string `json:"state"` }
Represents the state of a device.
type DeviceStateChanged ¶
type DeviceStateChanged struct { }
type DeviceStatesApiService ¶
type DeviceStatesApiService service
func (*DeviceStatesApiService) Delete ¶
func (a *DeviceStatesApiService) Delete(ctx context.Context, deviceName string) (*http.Response, error)
DeviceStatesApiService Destroy a device-state controlled by ARI.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceName Name of the device
func (*DeviceStatesApiService) Getdevicestate ¶
func (a *DeviceStatesApiService) Getdevicestate(ctx context.Context, deviceName string) (DeviceState, *http.Response, error)
DeviceStatesApiService Retrieve the current state of a device.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceName Name of the device
@return DeviceState
func (*DeviceStatesApiService) ListDeviceStates ¶
func (a *DeviceStatesApiService) ListDeviceStates(ctx context.Context) ([]DeviceState, *http.Response, error)
DeviceStatesApiService List all ARI controlled device states.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []DeviceState
func (*DeviceStatesApiService) Update ¶
func (a *DeviceStatesApiService) Update(ctx context.Context, deviceName string, deviceState string) (*http.Response, error)
DeviceStatesApiService Change the state of a device controlled by ARI. (Note - implicitly creates the device state).
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param deviceName Name of the device
- @param deviceState Device state value
type DialplanCep ¶
type DialplanCep struct { // Parameter of current dialplan application AppData string `json:"app_data"` // Name of current dialplan application AppName string `json:"app_name"` // Context in the dialplan Context string `json:"context"` // Extension in the dialplan Exten string `json:"exten"` // Priority in the dialplan Priority int64 `json:"priority"` }
Dialplan location (context/extension/priority)
type Endpoint ¶
type Endpoint struct { // Id's of channels associated with this endpoint ChannelIds []string `json:"channel_ids"` // Identifier of the endpoint, specific to the given technology. Resource string `json:"resource"` // Endpoint's state State string `json:"state,omitempty"` // Technology of the endpoint Technology string `json:"technology"` }
An external device that may offer/accept calls to/from Asterisk. Unlike most resources, which have a single unique identifier, an endpoint is uniquely identified by the technology/resource pair.
type EndpointStateChange ¶
type EndpointStateChange struct { }
type EndpointsApiService ¶
type EndpointsApiService service
func (*EndpointsApiService) Getendpoint ¶
func (a *EndpointsApiService) Getendpoint(ctx context.Context, tech string, resource string) (Endpoint, *http.Response, error)
EndpointsApiService Details for an endpoint.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tech Technology of the endpoint
- @param resource ID of the endpoint
@return Endpoint
func (*EndpointsApiService) ListByTech ¶
func (a *EndpointsApiService) ListByTech(ctx context.Context, tech string) ([]Endpoint, *http.Response, error)
EndpointsApiService List available endoints for a given endpoint technology.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param tech Technology of the endpoints (sip,iax2,...)
@return []Endpoint
func (*EndpointsApiService) Listendpoints ¶
func (a *EndpointsApiService) Listendpoints(ctx context.Context) ([]Endpoint, *http.Response, error)
EndpointsApiService List all endpoints.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Endpoint
func (*EndpointsApiService) SendMessage ¶
func (a *EndpointsApiService) SendMessage(ctx context.Context, to string, from string, localVarOptionals *EndpointsApiSendMessageOpts) (*http.Response, error)
func (*EndpointsApiService) SendMessageToEndpoint ¶
func (a *EndpointsApiService) SendMessageToEndpoint(ctx context.Context, tech string, resource string, from string, localVarOptionals *EndpointsApiSendMessageToEndpointOpts) (*http.Response, error)
type EventsApiService ¶
type EventsApiService service
func (*EventsApiService) EventWebsocket ¶
func (a *EventsApiService) EventWebsocket(ctx context.Context, app []string, localVarOptionals *EventsApiEventWebsocketOpts) (Message, *http.Response, error)
type EventsApiUserEventOpts ¶
type FormatLangPair ¶
Identifies the format and language of a sound file
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type LiveRecording ¶
type LiveRecording struct { // Cause for recording failure if failed Cause string `json:"cause,omitempty"` // Duration in seconds of the recording Duration int32 `json:"duration,omitempty"` // Recording format (wav, gsm, etc.) Format string `json:"format"` // Base name for the recording Name string `json:"name"` // Duration of silence, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. SilenceDuration int32 `json:"silence_duration,omitempty"` State string `json:"state"` // Duration of talking, in seconds, detected in the recording. This is only available if the recording was initiated with a non-zero maxSilenceSeconds. TalkingDuration int32 `json:"talking_duration,omitempty"` // URI for the channel or bridge being recorded TargetUri string `json:"target_uri"` }
A recording that is in progress
type LogChannel ¶
type LogChannel struct { // The log channel path Channel string `json:"channel"` // The various log levels Configuration string `json:"configuration"` // Whether or not a log type is enabled Status string `json:"status"` // Types of logs for the log channel Type_ string `json:"type"` }
Details of an Asterisk log channel
type Mailbox ¶
type Mailbox struct { // Name of the mailbox. Name string `json:"name"` // Count of new messages in the mailbox. NewMessages int32 `json:"new_messages"` // Count of old messages in the mailbox. OldMessages int32 `json:"old_messages"` }
Represents the state of a mailbox.
type MailboxesApiService ¶
type MailboxesApiService service
func (*MailboxesApiService) Deletemailbox ¶
func (a *MailboxesApiService) Deletemailbox(ctx context.Context, mailboxName string) (*http.Response, error)
MailboxesApiService Destroy a mailbox.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mailboxName Name of the mailbox
func (*MailboxesApiService) Getmailbox ¶
func (a *MailboxesApiService) Getmailbox(ctx context.Context, mailboxName string) (Mailbox, *http.Response, error)
MailboxesApiService Retrieve the current state of a mailbox.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mailboxName Name of the mailbox
@return Mailbox
func (*MailboxesApiService) Listmailboxes ¶
MailboxesApiService List all mailboxes.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []Mailbox
func (*MailboxesApiService) Updatemailbox ¶
func (a *MailboxesApiService) Updatemailbox(ctx context.Context, mailboxName string, oldMessages int32, newMessages int32) (*http.Response, error)
MailboxesApiService Change the state of a mailbox. (Note - implicitly creates the mailbox).
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param mailboxName Name of the mailbox
- @param oldMessages Count of old messages in the mailbox
- @param newMessages Count of new messages in the mailbox
type Message ¶
type Message struct { // The unique ID for the Asterisk instance that raised this event. AsteriskId string `json:"asterisk_id,omitempty"` // Indicates the type of this message. Type_ string `json:"type"` }
Base type for errors and events
type MissingParams ¶
type Module ¶
type Module struct { // The description of this module Description string `json:"description"` // The name of this module Name string `json:"name"` // The running status of this module Status string `json:"status"` // The support state of this module SupportLevel string `json:"support_level"` // The number of times this module is being used UseCount int32 `json:"use_count"` }
Details of an Asterisk module
type Peer ¶
type Peer struct { // The IP address of the peer. Address string `json:"address,omitempty"` // An optional reason associated with the change in peer_status. Cause string `json:"cause,omitempty"` // The current state of the peer. Note that the values of the status are dependent on the underlying peer technology. PeerStatus string `json:"peer_status"` // The port of the peer. Port string `json:"port,omitempty"` // The last known time the peer was contacted. Time string `json:"time,omitempty"` }
Detailed information about a remote peer that communicates with Asterisk.
type PeerStatusChange ¶
type PeerStatusChange struct { }
type Playback ¶
type Playback struct { // ID for this playback operation Id string `json:"id"` // For media types that support multiple languages, the language requested for playback. Language string `json:"language,omitempty"` // The URI for the media currently being played back. MediaUri string `json:"media_uri"` // If a list of URIs is being played, the next media URI to be played back. NextMediaUri string `json:"next_media_uri,omitempty"` // Current state of the playback operation. State string `json:"state"` // URI for the channel or bridge to play the media on TargetUri string `json:"target_uri"` }
Object representing the playback of media to a channel
type PlaybackContinuing ¶
type PlaybackContinuing struct { }
type PlaybackFinished ¶
type PlaybackFinished struct { }
type PlaybackStarted ¶
type PlaybackStarted struct { }
type PlaybacksApiService ¶
type PlaybacksApiService service
func (*PlaybacksApiService) Control ¶
func (a *PlaybacksApiService) Control(ctx context.Context, playbackId string, operation string) (*http.Response, error)
PlaybacksApiService Control a playback.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param playbackId Playback's id
- @param operation Operation to perform on the playback.
func (*PlaybacksApiService) Getplayback ¶
func (a *PlaybacksApiService) Getplayback(ctx context.Context, playbackId string) (Playback, *http.Response, error)
PlaybacksApiService Get a playback's details.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param playbackId Playback's id
@return Playback
type RecordingFailed ¶
type RecordingFailed struct { }
type RecordingFinished ¶
type RecordingFinished struct { }
type RecordingStarted ¶
type RecordingStarted struct { }
type RecordingsApiService ¶
type RecordingsApiService service
func (*RecordingsApiService) Cancel ¶
func (a *RecordingsApiService) Cancel(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Stop a live recording and discard it.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
func (*RecordingsApiService) CopyStored ¶
func (a *RecordingsApiService) CopyStored(ctx context.Context, recordingName string, destinationRecordingName string) (StoredRecording, *http.Response, error)
RecordingsApiService Copy a stored recording.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording to copy
- @param destinationRecordingName The destination name of the recording
@return StoredRecording
func (*RecordingsApiService) DeleteStored ¶
func (a *RecordingsApiService) DeleteStored(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Delete a stored recording.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
func (*RecordingsApiService) GetLive ¶
func (a *RecordingsApiService) GetLive(ctx context.Context, recordingName string) (LiveRecording, *http.Response, error)
RecordingsApiService List live recordings.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
@return LiveRecording
func (*RecordingsApiService) GetStored ¶
func (a *RecordingsApiService) GetStored(ctx context.Context, recordingName string) (StoredRecording, *http.Response, error)
RecordingsApiService Get a stored recording's details.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
@return StoredRecording
func (*RecordingsApiService) GetStoredFile ¶
func (a *RecordingsApiService) GetStoredFile(ctx context.Context, recordingName string) (string, *http.Response, error)
RecordingsApiService Get the file associated with the stored recording.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
@return string
func (*RecordingsApiService) ListStored ¶
func (a *RecordingsApiService) ListStored(ctx context.Context) ([]StoredRecording, *http.Response, error)
RecordingsApiService List recordings that are complete.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return []StoredRecording
func (*RecordingsApiService) Muterecording ¶
func (a *RecordingsApiService) Muterecording(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Mute a live recording. Muting a recording suspends silence detection, which will be restarted when the recording is unmuted.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
func (*RecordingsApiService) Pause ¶
func (a *RecordingsApiService) Pause(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Pause a live recording. Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
func (*RecordingsApiService) Stoprecording ¶
func (a *RecordingsApiService) Stoprecording(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Stop a live recording and store it.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
func (*RecordingsApiService) Unmuterecording ¶
func (a *RecordingsApiService) Unmuterecording(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Unmute a live recording.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
func (*RecordingsApiService) Unpause ¶
func (a *RecordingsApiService) Unpause(ctx context.Context, recordingName string) (*http.Response, error)
RecordingsApiService Unpause a live recording.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param recordingName The name of the recording
type RtPstat ¶
type RtPstat struct { // The Asterisk channel's unique ID that owns this instance. ChannelUniqueid string `json:"channel_uniqueid"` // Maximum jitter on local side. LocalMaxjitter float64 `json:"local_maxjitter,omitempty"` // Maximum number of packets lost on local side. LocalMaxrxploss float64 `json:"local_maxrxploss,omitempty"` // Minimum jitter on local side. LocalMinjitter float64 `json:"local_minjitter,omitempty"` // Minimum number of packets lost on local side. LocalMinrxploss float64 `json:"local_minrxploss,omitempty"` // Average jitter on local side. LocalNormdevjitter float64 `json:"local_normdevjitter,omitempty"` // Average number of packets lost on local side. LocalNormdevrxploss float64 `json:"local_normdevrxploss,omitempty"` // Our SSRC. LocalSsrc int32 `json:"local_ssrc"` // Standard deviation jitter on local side. LocalStdevjitter float64 `json:"local_stdevjitter,omitempty"` // Standard deviation packets lost on local side. LocalStdevrxploss float64 `json:"local_stdevrxploss,omitempty"` // Maximum round trip time. Maxrtt float64 `json:"maxrtt,omitempty"` // Minimum round trip time. Minrtt float64 `json:"minrtt,omitempty"` // Average round trip time. Normdevrtt float64 `json:"normdevrtt,omitempty"` // Maximum jitter on remote side. RemoteMaxjitter float64 `json:"remote_maxjitter,omitempty"` // Maximum number of packets lost on remote side. RemoteMaxrxploss float64 `json:"remote_maxrxploss,omitempty"` // Minimum jitter on remote side. RemoteMinjitter float64 `json:"remote_minjitter,omitempty"` // Minimum number of packets lost on remote side. RemoteMinrxploss float64 `json:"remote_minrxploss,omitempty"` // Average jitter on remote side. RemoteNormdevjitter float64 `json:"remote_normdevjitter,omitempty"` // Average number of packets lost on remote side. RemoteNormdevrxploss float64 `json:"remote_normdevrxploss,omitempty"` // Their SSRC. RemoteSsrc int32 `json:"remote_ssrc"` // Standard deviation jitter on remote side. RemoteStdevjitter float64 `json:"remote_stdevjitter,omitempty"` // Standard deviation packets lost on remote side. RemoteStdevrxploss float64 `json:"remote_stdevrxploss,omitempty"` // Total round trip time. Rtt float64 `json:"rtt,omitempty"` // Number of packets received. Rxcount int32 `json:"rxcount"` // Jitter on received packets. Rxjitter float64 `json:"rxjitter,omitempty"` // Number of octets received. Rxoctetcount int32 `json:"rxoctetcount"` // Number of received packets lost. Rxploss int32 `json:"rxploss"` // Standard deviation round trip time. Stdevrtt float64 `json:"stdevrtt,omitempty"` // Number of packets transmitted. Txcount int32 `json:"txcount"` // Jitter on transmitted packets. Txjitter float64 `json:"txjitter,omitempty"` // Number of octets transmitted. Txoctetcount int32 `json:"txoctetcount"` // Number of transmitted packets lost. Txploss int32 `json:"txploss"` }
A statistics of a RTP.
type SetId ¶
type SetId struct { // Effective group id. Group string `json:"group"` // Effective user id. User string `json:"user"` }
Effective user/group id
type Sound ¶
type Sound struct { // The formats and languages in which this sound is available. Formats []FormatLangPair `json:"formats"` // Sound's identifier. Id string `json:"id"` // Text description of the sound, usually the words spoken. Text string `json:"text,omitempty"` }
A media file that may be played back.
type SoundsApiListsoundsOpts ¶
type SoundsApiService ¶
type SoundsApiService service
func (*SoundsApiService) Getsound ¶
func (a *SoundsApiService) Getsound(ctx context.Context, soundId string) (Sound, *http.Response, error)
SoundsApiService Get a sound's details.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param soundId Sound's id
@return Sound
func (*SoundsApiService) Listsounds ¶
func (a *SoundsApiService) Listsounds(ctx context.Context, localVarOptionals *SoundsApiListsoundsOpts) ([]Sound, *http.Response, error)
type StasisEvent ¶
type StasisEvent struct { Application string `json:"application"` // Application name Args []string `json:"args,omitempty"` // Optional arguments AsteriskID string `json:"asterisk_id"` // Asterisk instance ID Channel Channel `json:"channel"` // Channel information Timestamp StasisTimestampEvent `json:"timestamp"` // Event timestamp Type string `json:"type"` // Event type Value string `json:"value,omitempty"` // Optional value Variable string `json:"variable,omitempty"` // Optional variable }
StasisEvent represents an event in the Stasis application.
type StasisStart ¶
type StasisStart struct { }
type StasisTimestampEvent ¶
type StasisTimestampEvent struct {
Timestamp time.Time `json:"timestamp"` // Timestamp of the event
}
StasisTimestampEvent represents a timestamp for a Stasis event.
func (*StasisTimestampEvent) UnmarshalJSON ¶
func (s *StasisTimestampEvent) UnmarshalJSON(b []byte) error
UnmarshalJSON custom parsing for the timestamp UnmarshalJSON parses the JSON-encoded data and stores the result in the value pointed to by s.
type StatusInfo ¶
type StatusInfo struct { // Time when Asterisk was last reloaded. LastReloadTime string `json:"last_reload_time"` // Time when Asterisk was started. StartupTime string `json:"startup_time"` }
Info about Asterisk status
type StoredRecording ¶
A past recording that may be played back.
type SystemInfo ¶
type SystemInfo struct { EntityId string `json:"entity_id"` // Asterisk version. Version string `json:"version"` }
Info about Asterisk
type TextMessage ¶
type TextMessage struct { // The text of the message. Body string `json:"body"` // A technology specific URI specifying the source of the message. For sip and pjsip technologies, any SIP URI can be specified. For xmpp, the URI must correspond to the client connection being used to send the message. From string `json:"from"` // A technology specific URI specifying the destination of the message. Valid technologies include sip, pjsip, and xmp. The destination of a message should be an endpoint. To string `json:"to"` // Technology specific key/value pairs (JSON object) associated with the message. Variables interface{} `json:"variables,omitempty"` }
A text message.
type TextMessageReceived ¶
type TextMessageReceived struct { }
type Variable ¶
type Variable struct { // The value of the variable requested Value string `json:"value"` }
The value of a channel variable
type WebsocketApiService ¶
type WebsocketApiService service
WebsocketApiService represents a service for managing WebSocket connections.
func (*WebsocketApiService) WebsocketConnect ¶
func (a *WebsocketApiService) WebsocketConnect(ctx context.Context, app []string, auth []string) (*websocket.Conn, *http.Response, error)
WebsocketConnect establishes a WebSocket connection for events. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. @param app []string - Applications to subscribe to. @param auth []string - Authentication credentials. @return *websocket.Conn - WebSocket connection. @return *http.Response - HTTP response. @return error - Error, if any.
Source Files
¶
- api_applications.go
- api_asterisk.go
- api_bridges.go
- api_channels.go
- api_device_states.go
- api_endpoints.go
- api_events.go
- api_mailboxes.go
- api_playbacks.go
- api_recordings.go
- api_sounds.go
- api_websocket.go
- client.go
- configuration.go
- model_application.go
- model_application_move_failed.go
- model_application_replaced.go
- model_asterisk_info.go
- model_asterisk_ping.go
- model_binary.go
- model_bridge.go
- model_bridge_attended_transfer.go
- model_bridge_blind_transfer.go
- model_bridge_created.go
- model_bridge_destroyed.go
- model_bridge_merged.go
- model_bridge_video_source_changed.go
- model_build_info.go
- model_caller_id.go
- model_channel.go
- model_channel_caller_id.go
- model_channel_connected_line.go
- model_channel_created.go
- model_channel_destroyed.go
- model_channel_dialplan.go
- model_channel_dtmf_received.go
- model_channel_entered_bridge.go
- model_channel_hangup_request.go
- model_channel_hold.go
- model_channel_left_bridge.go
- model_channel_state_change.go
- model_channel_talking_finished.go
- model_channel_talking_started.go
- model_channel_unhold.go
- model_channel_userevent.go
- model_channel_varset.go
- model_config_info.go
- model_config_tuple.go
- model_contact_info.go
- model_contact_status_change.go
- model_containers.go
- model_device_state.go
- model_device_state_changed.go
- model_dial.go
- model_dialed.go
- model_dialplan_cep.go
- model_endpoint.go
- model_endpoint_state_change.go
- model_event.go
- model_format_lang_pair.go
- model_live_recording.go
- model_log_channel.go
- model_mailbox.go
- model_message.go
- model_missing_params.go
- model_module.go
- model_peer.go
- model_peer_status_change.go
- model_playback.go
- model_playback_continuing.go
- model_playback_finished.go
- model_playback_started.go
- model_recording_failed.go
- model_recording_finished.go
- model_recording_started.go
- model_rt_pstat.go
- model_set_id.go
- model_sound.go
- model_stasis_end.go
- model_stasis_start.go
- model_status_info.go
- model_stored_recording.go
- model_system_info.go
- model_text_message.go
- model_text_message_received.go
- model_variable.go
- response.go