Documentation ¶
Index ¶
- func AGI(socket *Socket, actionID, channel, agiCommand, agiCommandID string) (map[string]string, error)
- func AOCMessage(socket *Socket, actionID string, aocData AOCData) (map[string]string, error)
- func AbsoluteTimeout(socket *Socket, actionID, channel string, timeout int) (map[string]string, error)
- func AgentLogoff(socket *Socket, actionID, agent string, soft bool) (map[string]string, error)
- func Agents(socket *Socket, actionID string) ([]map[string]string, error)
- func Atxfer(socket *Socket, actionID, channel, exten, context, priority string) (map[string]string, error)
- func Bridge(socket *Socket, actionID, channel1, channel2 string, tone bool) (map[string]string, error)
- func Challenge(socket *Socket, actionID string) (map[string]string, error)
- func ChangeMonitor(socket *Socket, actionID, channel, file string) (map[string]string, error)
- func Command(socket *Socket, actionID, cmd string) (map[string]string, error)
- func Connect(socket *Socket) (bool, error)
- func CoreSettings(socket *Socket, actionID string) (map[string]string, error)
- func CoreShowChannels(socket *Socket, actionID string) ([]map[string]string, error)
- func CoreStatus(socket *Socket, actionID string) (map[string]string, error)
- func CreateConfig(socket *Socket, actionID, filename string) (map[string]string, error)
- func DAHDIDNDoff(socket *Socket, actionID, channel string) (map[string]string, error)
- func DAHDIDNDon(socket *Socket, actionID, channel string) (map[string]string, error)
- func DAHDIDialOffhook(socket *Socket, actionID, channel, number string) (map[string]string, error)
- func DAHDIHangup(socket *Socket, actionID, channel string) (map[string]string, error)
- func DAHDIRestart(socket *Socket, actionID string) (map[string]string, error)
- func DAHDIShowChannels(socket *Socket, actionID, channel string) (map[string]string, error)
- func DAHDITransfer(socket *Socket, actionID, channel string) (map[string]string, error)
- func DBDel(socket *Socket, actionID, family, key string) (map[string]string, error)
- func DBDelTree(socket *Socket, actionID, family, key string) (map[string]string, error)
- func DBGet(socket *Socket, actionID, family, key string) (map[string]string, error)
- func DBPut(socket *Socket, actionID, family, key, val string) (map[string]string, error)
- func DataGet(socket *Socket, actionID, path, search, filter string) (map[string]string, error)
- func Events(socket *Socket, actionID, eventMask string) (map[string]string, error)
- func ExtensionState(socket *Socket, actionID, exten, context string) (map[string]string, error)
- func GetConfig(socket *Socket, actionID, filename, category string) (map[string]string, error)
- func GetConfigJSON(socket *Socket, actionID, filename string) (map[string]string, error)
- func GetEvents(socket *Socket) (map[string]string, error)
- func GetUUID() (string, error)
- func Getvar(socket *Socket, actionID, channel, variable string) (map[string]string, error)
- func Hangup(socket *Socket, actionID, channel, cause string) (map[string]string, error)
- func IAXpeerlist(socket *Socket, actionID string) ([]map[string]string, error)
- func IAXpeers(socket *Socket, actionID string) ([]map[string]string, error)
- func IAXregistry(socket *Socket, actionID string) ([]map[string]string, error)
- func JabberSend(socket *Socket, actionID, jabber, jid, message string) (map[string]string, error)
- func ListCategories(socket *Socket, actionID, filename string) (map[string]string, error)
- func ListCommands(socket *Socket, actionID string) (map[string]string, error)
- func LocalOptimizeAway(socket *Socket, actionID, channel string) (map[string]string, error)
- func Login(socket *Socket, user, secret, events, actionID string) (bool, error)
- func Logoff(socket *Socket, actionID string) (bool, error)
- func MailboxCount(socket *Socket, actionID, mailbox string) (map[string]string, error)
- func MailboxStatus(socket *Socket, actionID, mailbox string) (map[string]string, error)
- func MeetmeList(socket *Socket, actionID, conference string) ([]map[string]string, error)
- func MeetmeMute(socket *Socket, actionID, meetme, usernum string) (map[string]string, error)
- func MeetmeUnMute(socket *Socket, actionID, meetme, usernum string) (map[string]string, error)
- func MixMonitorMute(socket *Socket, actionID, channel, direction string, state bool) (map[string]string, error)
- func ModuleCheck(socket *Socket, actionID, module string) (map[string]string, error)
- func ModuleLoad(socket *Socket, actionID, module, loadType string) (map[string]string, error)
- func Monitor(socket *Socket, actionID, channel, file, format string, mix bool) (map[string]string, error)
- func Originate(socket *Socket, actionID string, originate OriginateData) (map[string]string, error)
- func Park(socket *Socket, actionID, channel1, channel2 string, timeout int, ...) (map[string]string, error)
- func ParkedCalls(socket *Socket, actionID string) ([]map[string]string, error)
- func PauseMonitor(socket *Socket, actionID, channel string) (map[string]string, error)
- func Ping(socket *Socket, actionID string) (bool, error)
- func PlayDTMF(socket *Socket, actionID, channel, digit string) (map[string]string, error)
- func QueueAdd(socket *Socket, actionID string, queueData QueueData) (map[string]string, error)
- func QueueLog(socket *Socket, actionID string, queueData QueueData) (map[string]string, error)
- func QueuePause(socket *Socket, actionID string, queueData QueueData) (map[string]string, error)
- func QueuePenalty(socket *Socket, actionID string, queueData QueueData) (map[string]string, error)
- func QueueReload(socket *Socket, actionID string, queueData QueueData) (map[string]string, error)
- func QueueRemove(socket *Socket, actionID string, queueData QueueData) (map[string]string, error)
- func QueueReset(socket *Socket, actionID, queue string) (map[string]string, error)
- func QueueRule(socket *Socket, actionID, rule string) (map[string]string, error)
- func QueueStatus(socket *Socket, actionID, queue, member string) (map[string]string, error)
- func QueueSummary(socket *Socket, actionID, queue string) (map[string]string, error)
- func Redirect(socket *Socket, actionID, channel, exten, context, priority string) (map[string]string, error)
- func Reload(socket *Socket, actionID, module string) (map[string]string, error)
- func SIPnotify(socket *Socket, actionID string, channel string, variable string) (map[string]string, error)
- func SIPpeers(socket *Socket, actionID string) ([]map[string]string, error)
- func SIPqualifypeer(socket *Socket, actionID string, peer string) (map[string]string, error)
- func SIPshowpeer(socket *Socket, actionID string, peer string) (map[string]string, error)
- func SIPshowregistry(socket *Socket, actionID string) (map[string]string, error)
- func SKINNYdevices(socket *Socket, actionID string) ([]map[string]string, error)
- func SKINNYlines(socket *Socket, actionID string) ([]map[string]string, error)
- func SKINNYshowdevice(socket *Socket, actionID, device string) (map[string]string, error)
- func SKINNYshowline(socket *Socket, actionID, line string) (map[string]string, error)
- func SendText(socket *Socket, actionID, channel, msg string) (map[string]string, error)
- func Setvar(socket *Socket, actionID, channel, variable, value string) (map[string]string, error)
- func ShowDialPlan(socket *Socket, actionID, extension, context string) (map[string]string, error)
- func Status(socket *Socket, actionID, channel, variables string) (map[string]string, error)
- func StopMonitor(socket *Socket, actionID, channel string) (map[string]string, error)
- func UnpauseMonitor(socket *Socket, actionID, channel string) (map[string]string, error)
- func VersionInfo() string
- type AOCData
- type OriginateData
- type QueueData
- type Socket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AGI ¶
func AGI(socket *Socket, actionID, channel, agiCommand, agiCommandID string) (map[string]string, error)
AGI
Add an AGI command to execute by Async AGI.
func AbsoluteTimeout ¶
func AbsoluteTimeout(socket *Socket, actionID, channel string, timeout int) (map[string]string, error)
AbsoluteTimeout
Set absolute timeout. Hangup a channel after a certain time. Acknowledges set time with Timeout Set message.
func Atxfer ¶
func Atxfer(socket *Socket, actionID, channel, exten, context, priority string) (map[string]string, error)
Atxfer
Attended transfer.
func Bridge ¶
func Bridge(socket *Socket, actionID, channel1, channel2 string, tone bool) (map[string]string, error)
Bridge
Bridge two channels already in the PBX.
func ChangeMonitor ¶
ChangeMonitor
Change monitoring filename of a channel. This action may be used to change the file started by a previous 'Monitor' action.
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 DAHDIDialOffhook ¶
DAHDIDialOffhook
Dial over DAHDI channel while offhook. Generate DTMF control frames to the bridged peer.
func GetConfig ¶
GetConfig
Retrieve configuration. This action will dump the contents of a configuration file by category and contents or optionally by specified category only.
func GetConfigJSON ¶
GetConfigJSON
Retrieve 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 GetEvents ¶
GetEvents
Get events from current socket connection It is mandatory set 'events' of ami.Login with "system,call,all,user", to received events
func ListCommands ¶
ListCommands
List available manager commands. Returns the action name and synopsis for every action that is available to the user
func LocalOptimizeAway ¶
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 MeetmeList ¶
MeetmeList
Lists all users in a particular MeetMe conference. MeetmeList will follow as separate events, followed by a final event called MeetmeListComplete.
func MixMonitorMute ¶
func MixMonitorMute(socket *Socket, actionID, channel, direction string, state bool) (map[string]string, error)
MixMonitorMute
Mute / unMute a Mixmonitor recording. This action may be used to mute a MixMonitor recording.
func ModuleCheck ¶
ModuleCheck
Check 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 ¶
ModuleLoad
Module management. Loads, unloads or reloads an Asterisk module in a running system.
func Monitor ¶
func Monitor(socket *Socket, actionID, channel, file, format string, mix bool) (map[string]string, error)
Monitor
Monitor a channel. This action may be used to record the audio on a specified channel.
func Originate ¶
Originate
Originate a call. Generates an outgoing call to a Extension/Context/Priority or Application/Data
func Park ¶
func Park(socket *Socket, actionID, channel1, channel2 string, timeout int, parkinglot string) (map[string]string, error)
Park
Park a channel.
func PauseMonitor ¶
PauseMonitor
Pause monitoring of a channel. This action may be used to temporarily stop the recording of a channel.
func Ping ¶
Ping
A 'Ping' action will ellicit a 'Pong' response. Used to keep the manager connection open.
func Redirect ¶
func Redirect(socket *Socket, actionID, channel, exten, context, priority string) (map[string]string, error)
Redirect
Redirect (transfer) a call.
func SIPnotify ¶
func SIPnotify(socket *Socket, actionID string, channel string, variable string) (map[string]string, error)
SIPnotify
Send a SIP notify
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 SKINNYdevices ¶
SKINNYdevices List 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
List 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 ¶
SKINNYshowdevice
Show SKINNY device (text format). Show one SKINNY device with details on current status.
func SKINNYshowline ¶
SKINNYshowline
Show SKINNY line (text format). Show one SKINNY line with details on current status.
func Setvar ¶
Setvar
Set a channel variable. Set a global or local channel variable. Note: If a channel name is not provided then the variable is global.
func ShowDialPlan ¶
ShowDialPlan
Show dialplan contexts and extensions Be aware that showing the full dialplan may take a lot of capacity
func Status ¶
Status
List channel status. Will return the status information of each channel along with the value for the specified channel variables.
func StopMonitor ¶
StopMonitor
Stop 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 VersionInfo ¶
func VersionInfo() string
Types ¶
type AOCData ¶
type AOCData struct { Channel string ChannelPrefix string MsgType string ChargeType string UnitAmount string UnitType string CurrencyName string CurrencyAmount string CurrencyMultiplier string TotalType string AocBillingId string ChargingAssociationId string ChargingAssociationNumber string ChargingAssociationPlan string }
AOCMessage
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 OriginateData ¶
type OriginateData struct { Channel string Exten string Context string Priority int Application string Data string Timeout int Callerid string Variable string Account string Async string Codecs string }
Originate
Originate a call. Generates an outgoing call to a Extension/Context/Priority or Application/Data 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. Async - Set to true for fast origination. Codecs - Comma-separated list of codecs to use for this call.
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
func (*Socket) Disconnect ¶
Click to show internal directories.
Click to hide internal directories.