Documentation ¶
Index ¶
- Constants
- func Connect(ctx context.Context, client Client) (bool, error)
- func GetUUID() (string, error)
- func Login(ctx context.Context, client Client, user, secret, events, actionID string) error
- func Logoff(ctx context.Context, client Client, actionID string) error
- func Ping(ctx context.Context, client Client, actionID string) error
- type AGIControl
- type AOCData
- type CallData
- type Client
- type ExtensionData
- type KhompSMSData
- type MessageData
- type OriginateData
- type QueueData
- type Response
- func AGI(ctx context.Context, client Client, ...) (Response, error)
- func AOCMessage(ctx context.Context, client Client, actionID string, aocData AOCData) (Response, error)
- func AbsoluteTimeout(ctx context.Context, client Client, actionID, channel string, timeout int) (Response, error)
- func AgentLogoff(ctx context.Context, client Client, actionID, agent string, soft bool) (Response, error)
- func Agents(ctx context.Context, client Client, actionID string) ([]Response, error)
- func Atxfer(ctx context.Context, client Client, actionID, channel, exten, context string) (Response, error)
- func BlindTransfer(ctx context.Context, client Client, ...) (Response, error)
- func Bridge(ctx context.Context, client Client, actionID, channel1, channel2 string, ...) (Response, error)
- func BridgeDestroy(ctx context.Context, client Client, actionID, bridgeUniqueID string) (Response, error)
- func BridgeInfo(ctx context.Context, client Client, actionID, bridgeUniqueID string) (Response, error)
- func BridgeKick(ctx context.Context, client Client, actionID, bridgeUniqueID, channel string) (Response, error)
- func BridgeList(ctx context.Context, client Client, actionID, bridgeType string) (Response, error)
- func BridgeTechnologyList(ctx context.Context, client Client, actionID string) ([]Response, error)
- func BridgeTechnologySuspend(ctx context.Context, client Client, actionID, bridgeTechnology string) (Response, error)
- func BridgeTechnologyUnsuspend(ctx context.Context, client Client, actionID, bridgeTechnology string) (Response, error)
- func CancelAtxfer(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func Challenge(ctx context.Context, client Client, actionID string) (Response, error)
- func ChangeMonitor(ctx context.Context, client Client, actionID, channel, file string) (Response, error)
- func Command(ctx context.Context, client Client, actionID, cmd string) (Response, error)
- func ConfbridgeKick(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ConfbridgeList(ctx context.Context, client Client, actionID string, conference string) ([]Response, error)
- func ConfbridgeListRooms(ctx context.Context, client Client, actionID string) ([]Response, error)
- func ConfbridgeLock(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ConfbridgeMute(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ConfbridgeSetSingleVideoSrc(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ConfbridgeStartRecord(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ConfbridgeStopRecord(ctx context.Context, client Client, actionID string, conference string) (Response, error)
- func ConfbridgeUnlock(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ConfbridgeUnmute(ctx context.Context, client Client, actionID string, conference string, ...) (Response, error)
- func ControlPlayback(ctx context.Context, client Client, actionID, channel string, ...) (Response, error)
- func CoreSettings(ctx context.Context, client Client, actionID string) (Response, error)
- func CoreShowChannels(ctx context.Context, client Client, actionID string) ([]Response, error)
- func CoreStatus(ctx context.Context, client Client, actionID string) (Response, error)
- func CreateConfig(ctx context.Context, client Client, actionID, filename string) (Response, error)
- func DAHDIDNDoff(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func DAHDIDNDon(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func DAHDIDialOffhook(ctx context.Context, client Client, actionID, channel, number string) (Response, error)
- func DAHDIHangup(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func DAHDIRestart(ctx context.Context, client Client, actionID string) (Response, error)
- func DAHDIShowChannels(ctx context.Context, client Client, actionID, channel string) ([]Response, error)
- func DAHDITransfer(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func DBDel(ctx context.Context, client Client, actionID, family, key string) (Response, error)
- func DBDelTree(ctx context.Context, client Client, actionID, family, key string) (Response, error)
- func DBGet(ctx context.Context, client Client, actionID, family, key string) (Response, error)
- func DBPut(ctx context.Context, client Client, actionID, family, key, val string) (Response, error)
- func DataGet(ctx context.Context, client Client, actionID, path, search, filter string) (Response, error)
- func DeviceStateList(ctx context.Context, client Client, actionID string) ([]Response, error)
- func DialplanExtensionAdd(ctx context.Context, client Client, actionID string, extension ExtensionData) (Response, error)
- func DialplanExtensionRemove(ctx context.Context, client Client, actionID string, extension ExtensionData) (Response, error)
- func EventFlow(ctx context.Context, client Client, actionID, eventMask string) (Response, error)
- func Events(ctx context.Context, client Client) (Response, error)
- func ExtensionState(ctx context.Context, client Client, actionID, exten, context string) (Response, error)
- func ExtensionStateList(ctx context.Context, client Client, actionID string) ([]Response, error)
- func FAXSession(ctx context.Context, client Client, actionID, sessionNumber string) (Response, error)
- func FAXSessions(ctx context.Context, client Client, actionID string) ([]Response, error)
- func FAXStats(ctx context.Context, client Client, actionID string) (Response, error)
- func Filter(ctx context.Context, client Client, actionID, operation, filter string) (Response, error)
- func GetConfig(ctx context.Context, client Client, ...) (Response, error)
- func GetConfigJSON(ctx context.Context, client Client, ...) (Response, error)
- func Getvar(ctx context.Context, client Client, actionID, channel, variable string) (Response, error)
- func Hangup(ctx context.Context, client Client, actionID, channel, cause string) (Response, error)
- func IAXnetstats(ctx context.Context, client Client, actionID string) ([]Response, error)
- func IAXpeerlist(ctx context.Context, client Client, actionID string) ([]Response, error)
- func IAXpeers(ctx context.Context, client Client, actionID string) ([]Response, error)
- func IAXregistry(ctx context.Context, client Client, actionID string) ([]Response, error)
- func JabberSend(ctx context.Context, client Client, actionID, jabber, jid, message string) (Response, error)
- func KSendSMS(ctx context.Context, client Client, actionID string, data KhompSMSData) (Response, error)
- func ListCategories(ctx context.Context, client Client, actionID, filename string) (Response, error)
- func ListCommands(ctx context.Context, client Client, actionID string) (Response, error)
- func LocalOptimizeAway(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func LoggerRotate(ctx context.Context, client Client, actionID string) (Response, error)
- func MWIDelete(ctx context.Context, client Client, actionID, mailbox string) (Response, error)
- func MWIGet(ctx context.Context, client Client, actionID, mailbox string) (Response, error)
- func MWIUpdate(ctx context.Context, client Client, ...) (Response, error)
- func MailboxCount(ctx context.Context, client Client, actionID, mailbox string) (Response, error)
- func MailboxStatus(ctx context.Context, client Client, actionID, mailbox string) (Response, error)
- func MeetmeList(ctx context.Context, client Client, actionID, conference string) ([]Response, error)
- func MeetmeListRooms(ctx context.Context, client Client, actionID string) ([]Response, error)
- func MeetmeMute(ctx context.Context, client Client, actionID, meetme, usernum string) (Response, error)
- func MeetmeUnMute(ctx context.Context, client Client, actionID, meetme, usernum string) (Response, error)
- func MessageSend(ctx context.Context, client Client, actionID string, message MessageData) (Response, error)
- func MixMonitor(ctx context.Context, client Client, ...) (Response, error)
- func MixMonitorMute(ctx context.Context, client Client, actionID, channel, direction string, ...) (Response, error)
- func ModuleCheck(ctx context.Context, client Client, actionID, module string) (Response, error)
- func ModuleLoad(ctx context.Context, client Client, actionID, module, loadType string) (Response, error)
- func Monitor(ctx context.Context, client Client, actionID, channel, file, format string, ...) (Response, error)
- func MuteAudio(ctx context.Context, client Client, actionID, channel, direction string, ...) (Response, error)
- func Originate(ctx context.Context, client Client, actionID string, originate OriginateData) (Response, error)
- func PJSIPNotify(ctx context.Context, client Client, actionID, endpoint, uri, variable string) (Response, error)
- func PJSIPQualify(ctx context.Context, client Client, actionID, endpoint string) (Response, error)
- func PJSIPRegister(ctx context.Context, client Client, actionID, registration string) (Response, error)
- func PJSIPShowEndpoint(ctx context.Context, client Client, actionID, endpoint string) ([]Response, error)
- func PJSIPShowEndpoints(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPShowRegistrationInboundContactStatuses(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPShowRegistrationsInbound(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPShowRegistrationsOutbound(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPShowResourceLists(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPShowSubscriptionsInbound(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPShowSubscriptionsOutbound(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PJSIPUnregister(ctx context.Context, client Client, actionID, registration string) (Response, error)
- func PRIDebugFileSet(ctx context.Context, client Client, actionID, filename string) (Response, error)
- func PRIDebugFileUnset(ctx context.Context, client Client, actionID string) (Response, error)
- func PRIDebugSet(ctx context.Context, client Client, actionID, span, level string) (Response, error)
- func PRIShowSpans(ctx context.Context, client Client, actionID, span string) ([]Response, error)
- func Park(ctx context.Context, client Client, actionID, channel1, channel2 string, ...) (Response, error)
- func ParkedCalls(ctx context.Context, client Client, actionID string) ([]Response, error)
- func Parkinglots(ctx context.Context, client Client, actionID string) ([]Response, error)
- func PauseMonitor(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func PlayDTMF(ctx context.Context, client Client, actionID, channel, digit string, ...) (Response, error)
- func PresenceState(ctx context.Context, client Client, actionID, provider string) (Response, error)
- func PresenceStateList(ctx context.Context, client Client, actionID string) ([]Response, error)
- func QueueAdd(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
- func QueueLog(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
- func QueueMemberRingInUse(ctx context.Context, client Client, actionID, iface, ringInUse, queue string) (Response, error)
- func QueuePause(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
- func QueuePenalty(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
- func QueueReload(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
- func QueueRemove(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
- func QueueReset(ctx context.Context, client Client, actionID, queue string) (Response, error)
- func QueueRule(ctx context.Context, client Client, actionID, rule string) (Response, error)
- func QueueStatus(ctx context.Context, client Client, actionID, queue, member string) (Response, error)
- func QueueStatuses(ctx context.Context, client Client, actionID, queue string) ([]Response, error)
- func QueueSummary(ctx context.Context, client Client, actionID, queue string) ([]Response, error)
- func Redirect(ctx context.Context, client Client, actionID string, call CallData) (Response, error)
- func Reload(ctx context.Context, client Client, actionID, module string) (Response, error)
- func SIPNotify(ctx context.Context, client Client, actionID string, channel string, ...) (Response, error)
- func SIPPeerStatus(ctx context.Context, client Client, actionID string, peer string) ([]Response, error)
- func SIPPeers(ctx context.Context, client Client, actionID string) ([]Response, error)
- func SIPQualifyPeer(ctx context.Context, client Client, actionID string, peer string) (Response, error)
- func SIPShowPeer(ctx context.Context, client Client, actionID string, peer string) (Response, error)
- func SIPShowRegistry(ctx context.Context, client Client, actionID string) ([]Response, error)
- func SKINNYdevices(ctx context.Context, client Client, actionID string) ([]Response, error)
- func SKINNYlines(ctx context.Context, client Client, actionID string) ([]Response, error)
- func SKINNYshowdevice(ctx context.Context, client Client, actionID, device string) (Response, error)
- func SKINNYshowline(ctx context.Context, client Client, actionID, line string) (Response, error)
- func SendText(ctx context.Context, client Client, actionID, channel, msg string) (Response, error)
- func Setvar(ctx context.Context, client Client, actionID, channel, variable, value string) (Response, error)
- func ShowDialPlan(ctx context.Context, client Client, actionID, extension, context string) ([]Response, error)
- func SorceryMemoryCacheExpire(ctx context.Context, client Client, actionID, cache string) (Response, error)
- func SorceryMemoryCacheExpireObject(ctx context.Context, client Client, actionID, cache, object string) (Response, error)
- func SorceryMemoryCachePopulate(ctx context.Context, client Client, actionID, cache string) (Response, error)
- func SorceryMemoryCacheStale(ctx context.Context, client Client, actionID, cache string) (Response, error)
- func SorceryMemoryCacheStaleObject(ctx context.Context, client Client, actionID, cache, object string, ...) (Response, error)
- func Status(ctx context.Context, client Client, actionID, channel, variables string) (Response, error)
- func StopMixMonitor(ctx context.Context, client Client, actionID, channel, mixMonitorID string) (Response, error)
- func StopMonitor(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func UnpauseMonitor(ctx context.Context, client Client, actionID, channel string) (Response, error)
- func UpdateConfig(ctx context.Context, client Client, actionID, srcFilename, dstFilename string, ...) (Response, error)
- func VoicemailRefresh(ctx context.Context, client Client, actionID, context, mailbox string) (Response, error)
- func VoicemailUsersList(ctx context.Context, client Client, actionID string) ([]Response, error)
- type Socket
- type UpdateConfigAction
Constants ¶
const ( // Stop the playback operation Stop AGIControl = "stop" // Forward move the current position in the media forward. Forward = "forward" // Reverse move the current poistion in the media backward. Reverse = "reverse" // Pause pause/unpause the playback operation. Pause = "pause" // Restart the playback operation. Restart = "restart" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AOCData ¶
type AOCData struct { Channel string `ami:"Channel"` ChannelPrefix string `ami:"ChannelPrefix"` MsgType string `ami:"MsgType"` ChargeType string `ami:"ChargeType"` UnitAmount string `ami:"UnitAmount(0)"` UnitType string `ami:"UnitType(0)"` CurrencyName string `ami:"CurrencyName"` CurrencyAmount string `ami:"CurrencyAmount"` CurrencyMultiplier string `ami:"CurrencyMultiplier"` TotalType string `ami:"TotalType"` AOCBillingID string `ami:"AOCBillingId"` ChargingAssociationID string `ami:"ChargingAssociationId"` ChargingAssociationNumber string `ami:"ChargingAssociationNumber"` ChargingAssociationPlan string `ami:"ChargingAssociationPlan"` }
AOCData holds the information to generate an Advice of Charge message on a channel.
Channel - Channel name to generate the AOC message on. ChannelPrefix - Partial channel prefix. By using this option one can match the beginning part of a channel name without having to put the entire name in. For example if a channel name is SIP/snom-00000001 and this value is set to SIP/snom, then that channel matches and the message will be sent. Note however that only the first matched channel has the message sent on it. MsgType - Defines what type of AOC message to create, AOC-D or AOC-E D E ChargeType - Defines what kind of charge this message represents. NA FREE Currency Unit UnitAmount(0) - This represents the amount of units charged. The ETSI AOC standard specifies that this value along with the optional UnitType value are entries in a list. To accommodate this these values take an index value starting at 0 which can be used to generate this list of unit entries. For Example, If two unit entires were required this could be achieved by setting the paramter UnitAmount(0)=1234 and UnitAmount(1)=5678. Note that UnitAmount at index 0 is required when ChargeType=Unit, all other entries in the list are optional. UnitType(0) - Defines the type of unit. ETSI AOC standard specifies this as an integer value between 1 and 16, but this value is left open to accept any positive integer. Like the UnitAmount parameter, this value represents a list entry and has an index parameter that starts at 0. CurrencyName - Specifies the currency's name. Note that this value is truncated after 10 characters. CurrencyAmount - Specifies the charge unit amount as a positive integer. This value is required when ChargeType==Currency. CurrencyMultiplier - Specifies the currency multiplier. This value is required when ChargeType==Currency. OneThousandth OneHundredth OneTenth One Ten Hundred Thousand TotalType - Defines what kind of AOC-D total is represented. Total SubTotal AOCBillingId - Represents a billing ID associated with an AOC-D or AOC-E message. Note that only the first 3 items of the enum are valid AOC-D billing IDs Normal ReverseCharge CreditCard CallFwdUnconditional CallFwdBusy CallFwdNoReply CallDeflection CallTransfer ChargingAssociationId - Charging association identifier. This is optional for AOC-E and can be set to any value between -32768 and 32767 ChargingAssociationNumber - Represents the charging association party number. This value is optional for AOC-E. ChargingAssociationPlan - Integer representing the charging plan associated with the ChargingAssociationNumber. The value is bits 7 through 1 of the Q.931 octet containing the type-of-number and numbering-plan-identification fields.
type CallData ¶
type CallData struct { Channel string `ami:"Channel"` ExtraChannel string `ami:"ExtraChannel,omitempty"` Exten string `ami:"Exten"` ExtraExten string `ami:"ExtraExten,omitempty"` Context string `ami:"Context"` ExtraContext string `ami:"ExtraContext,omitempty"` Priority string `ami:"Priority"` ExtraPriority string `ami:"ExtraPriority,omitempty"` }
CallData holds the call data to transfer.
type Client ¶
type Client interface { // Connected returns the client status. Connected() bool // Close closes the client connection. Close(ctx context.Context) error // Send sends data from client to server. Send(message string) error // Recv receives a string from server. Recv(ctx context.Context) (string, error) }
Client defines an interface to client socket.
type ExtensionData ¶
type ExtensionData struct { Context string `ami:"Context"` Extension string `ami:"Extension"` Priority string `ami:"Priority,omitempty"` Application string `ami:"Application,omitempty"` ApplicationData string `ami:"ApplicationData,omitempty"` Replace string `ami:"Replace,omitempty"` }
ExtensionData holds the extension data to dialplan.
type KhompSMSData ¶
type KhompSMSData struct { Device string `ami:"Device"` Destination string `ami:"Destination"` Confirmation bool `ami:"Confirmation"` Message string `ami:"Message"` }
KhompSMSData holds the Khomp SMS information.
type MessageData ¶
type MessageData struct { To string `ami:"To"` From string `ami:"From"` Body string `ami:"Body"` Base64Body string `ami:"Base64Body,omitempty"` Variable string `ami:"Variable"` }
MessageData holds the message data to message send command.
type OriginateData ¶
type OriginateData struct { Channel string `ami:"Channel,omitempty"` Exten string `ami:"Exten,omitempty"` Context string `ami:"Context,omitempty"` Priority int `ami:"Priority,omitempty"` Application string `ami:"Application,omitempty"` Data string `ami:"Data,omitempty"` Timeout int `ami:"Timeout,omitempty"` CallerID string `ami:"CallerID,omitempty"` Variable []string `ami:"Variable,omitempty"` Account string `ami:"Account,omitempty"` EarlyMedia string `ami:"EarlyMedia,omitempty"` Async string `ami:"Async,omitempty"` Codecs string `ami:"Codecs,omitempty"` ChannelID string `ami:"ChannelId,omitempty"` OtherChannelID string `ami:"OtherChannelId,omitempty"` }
OriginateData holds information used to originate outgoing calls.
Channel - Channel name to call. Exten - Extension to use (requires Context and Priority) Context - Context to use (requires Exten and Priority) Priority - Priority to use (requires Exten and Context) Application - Application to execute. Data - Data to use (requires Application). Timeout - How long to wait for call to be answered (in ms.). CallerID - Caller ID to be set on the outgoing channel. Variable - Channel variable to set, multiple Variable: headers are allowed. Account - Account code. EarlyMedia - Set to true to force call bridge on early media. Async - Set to true for fast origination. Codecs - Comma-separated list of codecs to use for this call. ChannelId - Channel UniqueId to be set on the channel. OtherChannelId - Channel UniqueId to be set on the second local channel.
type QueueData ¶
type QueueData struct { Queue string `ami:"Queue,omitempty"` Interface string `ami:"Interface,omitempty"` Penalty string `ami:"Penalty,omitempty"` Paused string `ami:"Paused,omitempty"` MemberName string `ami:"MemberName,omitempty"` StateInterface string `ami:"StateInterface,omitempty"` Event string `ami:"Event,omitempty"` UniqueID string `ami:"UniqueID,omitempty"` Message string `ami:"Message,omitempty"` Reason string `ami:"Reason,omitempty"` Members string `ami:"Members,omitempty"` Rules string `ami:"Rules,omitempty"` Parameters string `ami:"Parameters,omitempty"` }
QueueData holds to queue calls. used in functions:
QueueAdd, QueueLog, QueuePause, QueuePenalty, QueueReload, QueueRemove, QueueReset
type Response ¶
Response maps a string key to a list of values.
func AGI ¶
func AGI(ctx context.Context, client Client, actionID, channel, agiCommand, agiCommandID string) (Response, error)
AGI add an AGI command to execute by Async AGI.
func AOCMessage ¶
func AOCMessage(ctx context.Context, client Client, actionID string, aocData AOCData) (Response, error)
AOCMessage generates an Advice of Charge message on a channel.
func AbsoluteTimeout ¶
func AbsoluteTimeout(ctx context.Context, client Client, actionID, channel string, timeout int) (Response, error)
AbsoluteTimeout set absolute timeout. Hangup a channel after a certain time. Acknowledges set time with Timeout Set message.
func AgentLogoff ¶
func AgentLogoff(ctx context.Context, client Client, actionID, agent string, soft bool) (Response, error)
AgentLogoff sets an agent as no longer logged in.
func Atxfer ¶
func Atxfer(ctx context.Context, client Client, actionID, channel, exten, context string) (Response, error)
Atxfer attended transfer.
func BlindTransfer ¶
func BlindTransfer(ctx context.Context, client Client, actionID, channel, context, extension string) (Response, error)
BlindTransfer blind transfer channel(s) to the given destination.
func Bridge ¶
func Bridge(ctx context.Context, client Client, actionID, channel1, channel2 string, tone string) (Response, error)
Bridge bridges two channels already in the PBX.
func BridgeDestroy ¶
func BridgeDestroy(ctx context.Context, client Client, actionID, bridgeUniqueID string) (Response, error)
BridgeDestroy destroy a bridge.
func BridgeInfo ¶
func BridgeInfo(ctx context.Context, client Client, actionID, bridgeUniqueID string) (Response, error)
BridgeInfo get information about a bridge.
func BridgeKick ¶
func BridgeKick(ctx context.Context, client Client, actionID, bridgeUniqueID, channel string) (Response, error)
BridgeKick kick a channel from a bridge.
func BridgeList ¶
BridgeList get a list of bridges in the system.
func BridgeTechnologyList ¶
BridgeTechnologyList list available bridging technologies and their statuses.
func BridgeTechnologySuspend ¶
func BridgeTechnologySuspend(ctx context.Context, client Client, actionID, bridgeTechnology string) (Response, error)
BridgeTechnologySuspend suspend a bridging technology.
func BridgeTechnologyUnsuspend ¶
func BridgeTechnologyUnsuspend(ctx context.Context, client Client, actionID, bridgeTechnology string) (Response, error)
BridgeTechnologyUnsuspend unsuspend a bridging technology.
func CancelAtxfer ¶
CancelAtxfer cancel an attended transfer.
func ChangeMonitor ¶
func ChangeMonitor(ctx context.Context, client Client, actionID, channel, file string) (Response, error)
ChangeMonitor changes monitoring filename of a channel. This action may be used to change the file started by a previous 'Monitor' action.
func ConfbridgeKick ¶
func ConfbridgeKick(ctx context.Context, client Client, actionID string, conference string, channel string) (Response, error)
ConfbridgeKick removes a specified user from a specified conference.
func ConfbridgeList ¶
func ConfbridgeList(ctx context.Context, client Client, actionID string, conference string) ([]Response, error)
ConfbridgeList lists all users in a particular ConfBridge conference.
func ConfbridgeListRooms ¶
ConfbridgeListRooms lists data about all active conferences.
func ConfbridgeLock ¶
func ConfbridgeLock(ctx context.Context, client Client, actionID string, conference string, channel string) (Response, error)
ConfbridgeLock locks a specified conference.
func ConfbridgeMute ¶
func ConfbridgeMute(ctx context.Context, client Client, actionID string, conference string, channel string) (Response, error)
ConfbridgeMute mutes a specified user in a specified conference.
func ConfbridgeSetSingleVideoSrc ¶
func ConfbridgeSetSingleVideoSrc(ctx context.Context, client Client, actionID string, conference string, channel string) (Response, error)
ConfbridgeSetSingleVideoSrc sets a conference user as the single video source distributed to all other video-capable participants.
func ConfbridgeStartRecord ¶
func ConfbridgeStartRecord(ctx context.Context, client Client, actionID string, conference string, recordFile string) (Response, error)
ConfbridgeStartRecord starts a recording in the context of given conference and creates a file with the name specified by recordFile
func ConfbridgeStopRecord ¶
func ConfbridgeStopRecord(ctx context.Context, client Client, actionID string, conference string) (Response, error)
ConfbridgeStopRecord stops a recording pertaining to the given conference
func ConfbridgeUnlock ¶
func ConfbridgeUnlock(ctx context.Context, client Client, actionID string, conference string, channel string) (Response, error)
ConfbridgeUnlock unlocks a specified conference.
func ConfbridgeUnmute ¶
func ConfbridgeUnmute(ctx context.Context, client Client, actionID string, conference string, channel string) (Response, error)
ConfbridgeUnmute unmutes a specified user in a specified conferene.
func ControlPlayback ¶
func ControlPlayback(ctx context.Context, client Client, actionID, channel string, control AGIControl) (Response, error)
ControlPlayback control the playback of a file being played to a channel.
func CoreSettings ¶
CoreSettings shows PBX core settings (version etc).
func CoreShowChannels ¶
CoreShowChannels list currently active channels.
func CoreStatus ¶
CoreStatus shows PBX core status variables.
func CreateConfig ¶
CreateConfig creates an empty file in the configuration directory. This action will create an empty file in the configuration directory. This action is intended to be used before an UpdateConfig action.
func DAHDIDNDoff ¶
DAHDIDNDoff toggles DAHDI channel Do Not Disturb status OFF.
func DAHDIDNDon ¶
DAHDIDNDon toggles DAHDI channel Do Not Disturb status ON.
func DAHDIDialOffhook ¶
func DAHDIDialOffhook(ctx context.Context, client Client, actionID, channel, number string) (Response, error)
DAHDIDialOffhook dials over DAHDI channel while offhook. Generate DTMF control frames to the bridged peer.
func DAHDIHangup ¶
DAHDIHangup hangups DAHDI Channel.
func DAHDIRestart ¶
DAHDIRestart fully Restart DAHDI channels (terminates calls).
func DAHDIShowChannels ¶
func DAHDIShowChannels(ctx context.Context, client Client, actionID, channel string) ([]Response, error)
DAHDIShowChannels show status of DAHDI channels.
func DAHDITransfer ¶
DAHDITransfer transfers DAHDI Channel.
func DataGet ¶
func DataGet(ctx context.Context, client Client, actionID, path, search, filter string) (Response, error)
DataGet retrieves the data api tree.
func DeviceStateList ¶
DeviceStateList list the current known device states.
func DialplanExtensionAdd ¶
func DialplanExtensionAdd(ctx context.Context, client Client, actionID string, extension ExtensionData) (Response, error)
DialplanExtensionAdd add an extension to the dialplan.
func DialplanExtensionRemove ¶
func DialplanExtensionRemove(ctx context.Context, client Client, actionID string, extension ExtensionData) (Response, error)
DialplanExtensionRemove remove an extension from the dialplan.
func EventFlow ¶
EventFlow control Event Flow. Enable/Disable sending of events to this manager client.
func Events ¶
Events gets events from current client connection It is mandatory set 'events' of ami.Login with "system,call,all,user", to received events.
func ExtensionState ¶
func ExtensionState(ctx context.Context, client Client, actionID, exten, context string) (Response, error)
ExtensionState checks extension status.
func ExtensionStateList ¶
ExtensionStateList list the current known extension states.
func FAXSession ¶
func FAXSession(ctx context.Context, client Client, actionID, sessionNumber string) (Response, error)
FAXSession responds with a detailed description of a single FAX session.
func FAXSessions ¶
FAXSessions list active FAX sessions.
func Filter ¶
func Filter(ctx context.Context, client Client, actionID, operation, filter string) (Response, error)
Filter dinamically add filters for the current manager session.
func GetConfig ¶
func GetConfig(ctx context.Context, client Client, actionID, filename, category, filter string) (Response, error)
GetConfig retrieves configuration. This action will dump the contents of a configuration file by category and contents or optionally by specified category only.
func GetConfigJSON ¶
func GetConfigJSON(ctx context.Context, client Client, actionID, filename, category, filter string) (Response, error)
GetConfigJSON retrieves configuration (JSON format). This action will dump the contents of a configuration file by category and contents in JSON format. This only makes sense to be used using rawman over the HTTP interface.
func Getvar ¶
func Getvar(ctx context.Context, client Client, actionID, channel, variable string) (Response, error)
Getvar gets a channel variable.
func IAXnetstats ¶
IAXnetstats show IAX channels network statistics.
func IAXpeerlist ¶
IAXpeerlist show IAX channels network statistics.
func IAXregistry ¶
IAXregistry show IAX registrations.
func JabberSend ¶
func JabberSend(ctx context.Context, client Client, actionID, jabber, jid, message string) (Response, error)
JabberSend sends a message to a Jabber Client
func KSendSMS ¶
func KSendSMS(ctx context.Context, client Client, actionID string, data KhompSMSData) (Response, error)
KSendSMS sends a SMS using KHOMP device.
func ListCategories ¶
func ListCategories(ctx context.Context, client Client, actionID, filename string) (Response, error)
ListCategories lists categories in configuration file.
func ListCommands ¶
ListCommands lists available manager commands. Returns the action name and synopsis for every action that is available to the user
func LocalOptimizeAway ¶
func LocalOptimizeAway(ctx context.Context, client Client, actionID, channel string) (Response, error)
LocalOptimizeAway optimize away a local channel when possible. A local channel created with "/n" will not automatically optimize away. Calling this command on the local channel will clear that flag and allow it to optimize away if it's bridged or when it becomes bridged.
func LoggerRotate ¶
LoggerRotate reload and rotate the Asterisk logger.
func MWIUpdate ¶
func MWIUpdate(ctx context.Context, client Client, actionID, mailbox, oldMessages, newMessages string) (Response, error)
MWIUpdate update the mailbox message counts.
func MailboxCount ¶
MailboxCount checks Mailbox Message Count.
func MailboxStatus ¶
MailboxStatus checks Mailbox Message Count.
func MeetmeList ¶
func MeetmeList(ctx context.Context, client Client, actionID, conference string) ([]Response, error)
MeetmeList lists all users in a particular MeetMe conference. Will follow as separate events, followed by a final event called MeetmeListComplete.
func MeetmeListRooms ¶
MeetmeListRooms list active conferences.
func MeetmeMute ¶
func MeetmeMute(ctx context.Context, client Client, actionID, meetme, usernum string) (Response, error)
MeetmeMute mute a Meetme user.
func MeetmeUnMute ¶
func MeetmeUnMute(ctx context.Context, client Client, actionID, meetme, usernum string) (Response, error)
MeetmeUnMute unmute a Meetme user.
func MessageSend ¶
func MessageSend(ctx context.Context, client Client, actionID string, message MessageData) (Response, error)
MessageSend send an out of call message to an endpoint.
func MixMonitor ¶
func MixMonitor(ctx context.Context, client Client, actionID, channel, file, options, command string) (Response, error)
MixMonitor record a call and mix the audio during the recording.
func MixMonitorMute ¶
func MixMonitorMute(ctx context.Context, client Client, actionID, channel, direction string, state bool) (Response, error)
MixMonitorMute Mute / unMute a Mixmonitor recording. This action may be used to mute a MixMonitor recording.
func ModuleCheck ¶
ModuleCheck checks if module is loaded. Checks if Asterisk module is loaded. Will return Success/Failure. For success returns, the module revision number is included.
func ModuleLoad ¶
func ModuleLoad(ctx context.Context, client Client, actionID, module, loadType string) (Response, error)
ModuleLoad module management. Loads, unloads or reloads an Asterisk module in a running system.
func Monitor ¶
func Monitor(ctx context.Context, client Client, actionID, channel, file, format string, mix bool) (Response, error)
Monitor monitors a channel. This action may be used to record the audio on a specified channel.
func MuteAudio ¶
func MuteAudio(ctx context.Context, client Client, actionID, channel, direction string, state bool) (Response, error)
MuteAudio mute an audio stream.
func Originate ¶
func Originate(ctx context.Context, client Client, actionID string, originate OriginateData) (Response, error)
Originate originates a call. Generates an outgoing call to a Extension/Context/Priority or Application/Data.
func PJSIPNotify ¶
func PJSIPNotify(ctx context.Context, client Client, actionID, endpoint, uri, variable string) (Response, error)
PJSIPNotify send NOTIFY to either an endpoint, an arbitrary URI, or inside a SIP dialog.
func PJSIPQualify ¶
PJSIPQualify qualify a chan_pjsip endpoint.
func PJSIPRegister ¶
func PJSIPRegister(ctx context.Context, client Client, actionID, registration string) (Response, error)
PJSIPRegister register an outbound registration.
func PJSIPShowEndpoint ¶
func PJSIPShowEndpoint(ctx context.Context, client Client, actionID, endpoint string) ([]Response, error)
PJSIPShowEndpoint detail listing of an endpoint and its objects.
func PJSIPShowEndpoints ¶
PJSIPShowEndpoints list pjsip endpoints.
func PJSIPShowRegistrationInboundContactStatuses ¶
func PJSIPShowRegistrationInboundContactStatuses(ctx context.Context, client Client, actionID string) ([]Response, error)
PJSIPShowRegistrationInboundContactStatuses lists ContactStatuses for PJSIP inbound registrations.
func PJSIPShowRegistrationsInbound ¶
func PJSIPShowRegistrationsInbound(ctx context.Context, client Client, actionID string) ([]Response, error)
PJSIPShowRegistrationsInbound lists PJSIP inbound registrations.
func PJSIPShowRegistrationsOutbound ¶
func PJSIPShowRegistrationsOutbound(ctx context.Context, client Client, actionID string) ([]Response, error)
PJSIPShowRegistrationsOutbound lists PJSIP outbound registrations.
func PJSIPShowResourceLists ¶
func PJSIPShowResourceLists(ctx context.Context, client Client, actionID string) ([]Response, error)
PJSIPShowResourceLists displays settings for configured resource lists.
func PJSIPShowSubscriptionsInbound ¶
func PJSIPShowSubscriptionsInbound(ctx context.Context, client Client, actionID string) ([]Response, error)
PJSIPShowSubscriptionsInbound list of inbound subscriptions.
func PJSIPShowSubscriptionsOutbound ¶
func PJSIPShowSubscriptionsOutbound(ctx context.Context, client Client, actionID string) ([]Response, error)
PJSIPShowSubscriptionsOutbound list of outbound subscriptions.
func PJSIPUnregister ¶
func PJSIPUnregister(ctx context.Context, client Client, actionID, registration string) (Response, error)
PJSIPUnregister unregister an outbound registration.
func PRIDebugFileSet ¶
func PRIDebugFileSet(ctx context.Context, client Client, actionID, filename string) (Response, error)
PRIDebugFileSet set the file used for PRI debug message output.
func PRIDebugFileUnset ¶
PRIDebugFileUnset disables file output for PRI debug messages.
func PRIDebugSet ¶
func PRIDebugSet(ctx context.Context, client Client, actionID, span, level string) (Response, error)
PRIDebugSet set PRI debug levels for a span.
func PRIShowSpans ¶
PRIShowSpans show status of PRI spans.
func Park ¶
func Park(ctx context.Context, client Client, actionID, channel1, channel2 string, timeout int, parkinglot string) (Response, error)
Park parks a channel.
func ParkedCalls ¶
ParkedCalls list parked calls.
func Parkinglots ¶
Parkinglots get a list of parking lots.
func PauseMonitor ¶
PauseMonitor pauses monitoring of a channel. This action may be used to temporarily stop the recording of a channel.
func PlayDTMF ¶
func PlayDTMF(ctx context.Context, client Client, actionID, channel, digit string, duration int) (Response, error)
PlayDTMF plays DTMF signal on a specific channel.
func PresenceState ¶
PresenceState check presence state.
func PresenceStateList ¶
PresenceStateList list the current known presence states.
func QueueAdd ¶
func QueueAdd(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
QueueAdd adds interface to queue.
func QueueLog ¶
func QueueLog(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
QueueLog adds custom entry in queue_log.
func QueueMemberRingInUse ¶
func QueueMemberRingInUse(ctx context.Context, client Client, actionID, iface, ringInUse, queue string) (Response, error)
QueueMemberRingInUse set the ringinuse value for a queue member.
func QueuePause ¶
func QueuePause(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
QueuePause makes a queue member temporarily unavailable.
func QueuePenalty ¶
func QueuePenalty(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
QueuePenalty sets the penalty for a queue member.
func QueueReload ¶
func QueueReload(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
QueueReload reloads a queue, queues, or any sub-section of a queue or queues.
func QueueRemove ¶
func QueueRemove(ctx context.Context, client Client, actionID string, queueData QueueData) (Response, error)
QueueRemove removes interface from queue.
func QueueReset ¶
QueueReset resets queue statistics.
func QueueStatus ¶
func QueueStatus(ctx context.Context, client Client, actionID, queue, member string) (Response, error)
QueueStatus show queue status by member.
func QueueStatuses ¶
QueueStatuses show status all members in queue.
func QueueSummary ¶
QueueSummary show queue summary.
func SIPNotify ¶
func SIPNotify(ctx context.Context, client Client, actionID string, channel string, variable string) (Response, error)
SIPNotify sends a SIP notify
func SIPPeerStatus ¶
func SIPPeerStatus(ctx context.Context, client Client, actionID string, peer string) ([]Response, error)
SIPPeerStatus show the status of one or all of the sip peers.
func SIPPeers ¶
SIPPeers lists SIP peers in text format with details on current status. Peerlist will follow as separate events, followed by a final event called PeerlistComplete
func SIPQualifyPeer ¶
func SIPQualifyPeer(ctx context.Context, client Client, actionID string, peer string) (Response, error)
SIPQualifyPeer qualify SIP peers.
func SIPShowPeer ¶
func SIPShowPeer(ctx context.Context, client Client, actionID string, peer string) (Response, error)
SIPShowPeer shows one SIP peer with details on current status.
func SIPShowRegistry ¶
SIPShowRegistry shows SIP registrations (text format).
func SKINNYdevices ¶
SKINNYdevices lists SKINNY devices (text format). Lists Skinny devices in text format with details on current status. Devicelist will follow as separate events, followed by a final event called DevicelistComplete.
func SKINNYlines ¶
SKINNYlines lists SKINNY lines (text format). Lists Skinny lines in text format with details on current status. Linelist will follow as separate events, followed by a final event called LinelistComplete.
func SKINNYshowdevice ¶
func SKINNYshowdevice(ctx context.Context, client Client, actionID, device string) (Response, error)
SKINNYshowdevice show SKINNY device (text format). Show one SKINNY device with details on current status.
func SKINNYshowline ¶
SKINNYshowline shows SKINNY line (text format). Show one SKINNY line with details on current status.
func Setvar ¶
func Setvar(ctx context.Context, client Client, actionID, channel, variable, value string) (Response, error)
Setvar sets a channel variable. Sets a global or local channel variable. Note: If a channel name is not provided then the variable is global.
func ShowDialPlan ¶
func ShowDialPlan(ctx context.Context, client Client, actionID, extension, context string) ([]Response, error)
ShowDialPlan shows dialplan contexts and extensions Be aware that showing the full dialplan may take a lot of capacity.
func SorceryMemoryCacheExpire ¶
func SorceryMemoryCacheExpire(ctx context.Context, client Client, actionID, cache string) (Response, error)
SorceryMemoryCacheExpire expire (remove) all objects from a sorcery memory cache.
func SorceryMemoryCacheExpireObject ¶
func SorceryMemoryCacheExpireObject(ctx context.Context, client Client, actionID, cache, object string) (Response, error)
SorceryMemoryCacheExpireObject expire (remove) an object from a sorcery memory cache.
func SorceryMemoryCachePopulate ¶
func SorceryMemoryCachePopulate(ctx context.Context, client Client, actionID, cache string) (Response, error)
SorceryMemoryCachePopulate expire all objects from a memory cache and populate it with all objects from the backend.
func SorceryMemoryCacheStale ¶
func SorceryMemoryCacheStale(ctx context.Context, client Client, actionID, cache string) (Response, error)
SorceryMemoryCacheStale marks all objects in a sorcery memory cache as stale.
func SorceryMemoryCacheStaleObject ¶
func SorceryMemoryCacheStaleObject(ctx context.Context, client Client, actionID, cache, object string, reload bool) (Response, error)
SorceryMemoryCacheStaleObject mark an object in a sorcery memory cache as stale.
func Status ¶
func Status(ctx context.Context, client Client, actionID, channel, variables string) (Response, error)
Status lists channel status. Will return the status information of each channel along with the value for the specified channel variables.
func StopMixMonitor ¶
func StopMixMonitor(ctx context.Context, client Client, actionID, channel, mixMonitorID string) (Response, error)
StopMixMonitor stop recording a call through MixMonitor, and free the recording's file handle.
func StopMonitor ¶
StopMonitor stops monitoring a channel. This action may be used to end a previously started 'Monitor' action.
func UnpauseMonitor ¶
UnpauseMonitor unpause monitoring of a channel. This action may be used to re-enable recording of a channel after calling PauseMonitor.
func UpdateConfig ¶
func UpdateConfig(ctx context.Context, client Client, actionID, srcFilename, dstFilename string, reload bool, actions ...UpdateConfigAction) (Response, error)
UpdateConfig Updates a config file. Dynamically updates an Asterisk configuration file.
func VoicemailRefresh ¶
func VoicemailRefresh(ctx context.Context, client Client, actionID, context, mailbox string) (Response, error)
VoicemailRefresh tell asterisk to poll mailboxes for a change.
func VoicemailUsersList ¶
VoicemailUsersList list all voicemail user information.
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket holds the socket client connection data.
func (*Socket) Connected ¶
Connected returns the socket status, true for connected, false for disconnected.
type UpdateConfigAction ¶
type UpdateConfigAction struct { Action string `ami:"Action"` Category string `ami:"Category"` Var string `ami:"Var,omitempty"` Value string `ami:"Value,omitempty"` }
UpdateConfigAction holds the params for an action in UpdateConfig AMI command.
example
actions := make([]ami.UpdateConfigAction, 0) actions = append(actions, ami.UpdateConfigAction{ Action: "EmptyCat", Category: "test01", }) actions = append(actions, ami.UpdateConfigAction{ Action: "Append", Category: "test01", Var: "type", Value: "peer", })
Source Files ¶
- agent.go
- agi.go
- atxfer.go
- bridge.go
- channel.go
- client.go
- confbridge.go
- dahd.go
- db.go
- dialplan.go
- encode.go
- extension.go
- fax.go
- iax.go
- khomp.go
- mailbox.go
- manager.go
- meetme.go
- message.go
- monitor.go
- pjsip.go
- presence.go
- pri.go
- queue.go
- response.go
- sip.go
- skinny.go
- socket.go
- sorcery.go
- types.go
- utils.go
- voicemail.go