Asterisk Manager Interface (AMI)
Asterisk Call manager (AMI) versions
Asterisk | AMI |
---|---|
Asterisk 1.8 | Asterisk Call Manager /1.1 |
Asterisk 11 | Asterisk Call Manager /1.3 |
Asterisk 12 | Asterisk Call Manager /2.5 |
Asterisk 13 | Asterisk Call Manager /2.8 |
Asterisk 15 | Asterisk Call Manager/4.0.3 |
/etc/asterisk/manager.conf
[admin] secret = amp111 deny = 0.0.0.0/0.0.0.0 permit = 127.0.0.1/255.255.255.255 read = all,system,call,log,verbose,command,agent,user,config write = all,system,call,log,verbose,command,agent,user,config
Подключение при помощи telnet
$ telnet 127.0.0.1 5038 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Asterisk Call Manager/1.0
Ctrl-V
Action: Login ActionID: 1 Username: admin Secret: amp111
Для ввода команды требуется двойное нажатие ENTER
Примеры
Action: Login ActionID: 1 Username: manager1 Secret: manager111
Action: QueueAdd Queue: qs01 Interface: Local/6666@from-qs01 Penalty: 1 Paused: true
Action: QueueRemove Queue: qs01 Interface: Local/6666@from-qs01
Asterisk 15
Action | Synopsis |
---|---|
AbsoluteTimeout | Set absolute timeout. |
AOCMessage | Generate an Advice of Charge mess |
Atxfer | Attended transfer. |
BlindTransfer | Blind transfer channel(s) to the |
Bridge | Bridge two channels already in th |
BridgeDestroy | Destroy a bridge. |
BridgeInfo | Get information about a bridge. |
BridgeKick | Kick a channel from a bridge. |
BridgeList | Get a list of bridges in the syst |
BridgeTechnologyList | List available bridging technolog |
BridgeTechnologySuspend | Suspend a bridging technology. |
BridgeTechnologyUnsuspend | Unsuspend a bridging technology. |
CancelAtxfer | Cancel an attended transfer. |
Challenge | Generate Challenge for MD5 Auth. |
Command | Execute Asterisk CLI Command. |
ConfbridgeKick | Kick a Confbridge user. |
ConfbridgeList | List participants in a conference |
ConfbridgeListRooms | List active conferences. |
ConfbridgeLock | Lock a Confbridge conference. |
ConfbridgeMute | Mute a Confbridge user. |
ConfbridgeSetSingleVideoSrc | Set a conference user as the sing |
ConfbridgeStartRecord | Start recording a Confbridge conf |
ConfbridgeStopRecord | Stop recording a Confbridge confe |
ConfbridgeUnlock | Unlock a Confbridge conference. |
ConfbridgeUnmute | Unmute a Confbridge user. |
CoreSettings | Show PBX core settings (version e |
CoreShowChannels | List currently active channels. |
CoreStatus | Show PBX core status variables. |
CreateConfig | Creates an empty file in the conf |
DBDel | Delete DB entry. |
DBDelTree | Delete DB Tree. |
DBGet | Get DB Entry. |
DBPut | Put DB entry. |
DialplanExtensionAdd | Add an extension to the dialplan |
DialplanExtensionRemove | Remove an extension from the dial |
Events | Control Event Flow. |
ExtensionState | Check Extension Status. |
ExtensionStateList | List the current known extension |
Filter | Dynamically add filters for the c |
GetConfig | Retrieve configuration. |
GetConfigJSON | Retrieve configuration (JSON form |
Getvar | Gets a channel variable or functi |
Hangup | Hangup channel. |
ListCategories | List categories in configuration |
ListCommands | List available manager commands. |
LocalOptimizeAway | Optimize away a local channel whe |
LoggerRotate | Reload and rotate the Asterisk lo |
Login | Login Manager. |
Logoff | Logoff Manager. |
MailboxCount | Check Mailbox Message Count. |
MailboxStatus | Check mailbox. |
MessageSend | Send an out of call message to an |
ModuleCheck | Check if module is loaded. |
ModuleLoad | Module management. |
Originate | Originate a call. |
Ping | Keepalive command. |
PJSIPQualify | Qualify a chan_pjsip endpoint. |
PJSIPRegister | Register an outbound registration |
PJSIPShowEndpoint | Detail listing of an endpoint and |
PJSIPShowEndpoints | Lists PJSIP endpoints. |
PJSIPShowRegistrationInboundContactStatuses | Lists ContactStatuses for PJSIP i |
PJSIPShowRegistrationsInbound | Lists PJSIP inbound registrations |
PJSIPShowRegistrationsOutbound | Lists PJSIP outbound registration |
PJSIPShowResourceLists | Displays settings for configured |
PJSIPShowSubscriptionsInbound | Lists subscriptions. |
PJSIPShowSubscriptionsOutbound | Lists subscriptions. |
PJSIPUnregister | Unregister an outbound registrati |
PresenceState | Check Presence State |
Redirect | Redirect (transfer) a call. |
Reload | Send a reload event. |
SendText | Send text message to channel. |
Setvar | Sets a channel variable or functi |
ShowDialPlan | Show dialplan contexts and extens |
Status | List channel status. |
UpdateConfig | Update basic configuration. |
UserEvent | Send an arbitrary event. |
VoicemailRefresh | Tell Asterisk to poll mailboxes f |
VoicemailUsersList | List All Voicemail User Informati |
WaitEvent | Wait for an event to occur. |