Asterisk ami-action

From 탱이의 잡동사니
Jump to navigation Jump to search

Overview

Asterisk ami(Asteriskk Manager Interface) 명령어 정리.

Basic

Telnet 접속

/etc/asterisk/manager.conf 파일에 설정한 IP 주소 및 포트 번호를 이용하면 telnet 으로도 접속이 가능하다.

$ telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/1.0

Help

Action 도움말 확인법

vpbx120*CLI> manager show command Logoff 
[Syntax]
Action: Logoff
[ActionID:] <value>

[Synopsis]
Logoff Manager. 

[Description]
Logoff the current manager session.

[Arguments]
ActionID
    ActionID for this transaction. Will be returned.

[See Also]
Not available

AbsoluteTimeout

Absolute timeout 을 설정한다.

지정된 시간(초) 이후에 자동으로 채널을 종료한다.

Action: AbsoluteTimeout
ActionID: <value>
Channel: <value>
Timeout: <value>
  • ActionID
  • Channel : Channel name to hangup.
  • Timeout : Maximum duration of the call (sec).

Example

Action: AbsoluteTimeout
ActionID: 66a9dbf0-dfb1-4382-8055-c5caed9bddb7
Channel: SIP/agent-01-00000003
Timeout: 30

Response: Success
ActionID: 66a9dbf0-dfb1-4382-8055-c5caed9bddb7
Message: Timeout Set

See also

AgentLogoff

Sets an agent as no longer logged in.

Agent 를 logoff 한다.

Action: AgentLogoff
ActionID: <value>
Agent: <value>
Soft: <value>
  • ActionID
  • Agent : ID of the agent to log off.
  • Soft : Set to true to not hangup existing calls.

See also

Agents

등록되어 있는 모든 agent 와 status 를 보여준다.

Action: Agents
ActionID: <value>
  • ActionID

Example

Action: Agents

Response: Success
EventList: start
Message: Agents will follow

Event: AgentsComplete
EventList: Complete
ListItems: 0

See also

AGI

Add an AGI command to execute by Async AGI.

Add an AGI command to the execute queue of the channel in Async AGI.

Action: AGI
ActionID: <value>
Channel: <value>
Command: <value>
CommandID: <value>
  • ActionID
  • Channel : Channel that is currently in Async AGI.
  • Command : Application to execute
  • CommandID : This will be sent back in CommandID header of AsyncAGI exec event notification.

Example

Error case

Action: AGI
Channel: SIP/agent-01-00000007
Command: Hangup

Response: Error
Message: Failed to add AGI command to channel SIP/agent-01-00000007 queue

See also

AOCMessage

Generate an Advice of Charge message on a channel.

Generates an AOC-D or AOC-E message on a channel.

Action: AOCMessage
ActionID: <value>
Channel: <value>
ChannelPrefix: <value>
MsgType: <value>
ChargeType: <value>
UnitAmount(0): <value>
UnitType(0): <value>
CurrencyName: <value>
CurrencyAmount: <value>
CurrencyMultiplier: <value>
TotalType: <value>
AOCBillingId: <value>
ChargingAssociationId: <value>
ChargingAssociationNumber: <value>
ChargingAssociationPlan: <value>
  • ActionID
  • 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 : 통화 중에 전송되는 AOC Message(Advice of Charge message is sent during a call).
E : 통화가 완료된 후에 전송되는 AOC Message(Advice of Charge message is sent at the end of a call).
  • 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 until entries. For Example, if two unit entries were required this could be achieved by setting the parameter 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
ReverseChage
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.

Example

Action: AOCMessage
Channel: SIP/agent-01-00000008
MsgType: D
ChargeType: Currency
UnitAmout(0): 1000
UnitType(0): 1
CurrencyName: USD
CurrencyAmount: 132
CurrencyMultiplier: One
TotalType: SubTotal

Response: Success
Message: AOC Message successfully queued on channel

See also

Atxfer

Attended transfer.

Action: Atxfer
ActionID: <value>
Channel: <value>
Exten: <value>
Context: <value>
  • ActionID
  • Channel : Transfer's channel.
  • Exten : Extension to transfer to.
  • Context : Context to transfer to.

See also

BlindTransfer

Blind transfer channel(s) to the given destination.

Redirect all channels currently bridged to the specified channel to the specified destination.

Action: BlindTransfer
Channel: <value>
Context: <value>
Exten: <value>
  • Channel
  • Context
  • Exten

Example

Success

Action: BlindTransfer
Channel: SIP/agent-01-00000005
Context: sample_musiconhold
Exten: s


Response: Success
Message: Transfer succeeded


Event: BlindTransfer
Privilege: call,all
Result: Success
TransfererChannel: SIP/agent-01-00000005
TransfererChannelState: 6
TransfererChannelStateDesc: Up
TransfererCallerIDNum: agent-01
TransfererCallerIDName: <unknown>
TransfererConnectedLineNum: <unknown>
TransfererConnectedLineName: <unknown>
TransfererLanguage: en
TransfererAccountCode: 
TransfererContext: park-dial
TransfererExten: SIP_agent-01
TransfererPriority: 1
TransfererUniqueid: 1481706048.11
TransfererLinkedid: 1481706048.11
TransfereeChannel: SIP/agent-01-00000006
TransfereeChannelState: 6
TransfereeChannelStateDesc: Up
TransfereeCallerIDNum: SIP_agent-01
TransfereeCallerIDName: <unknown>
TransfereeConnectedLineNum: agent-01
TransfereeConnectedLineName: <unknown>
TransfereeLanguage: en
TransfereeAccountCode: 
TransfereeContext: public
TransfereeExten: 
TransfereePriority: 1
TransfereeUniqueid: 1481706093.12
TransfereeLinkedid: 1481706048.11
BridgeUniqueid: b9ad516f-984d-4dce-a465-d95690edc656
BridgeType: basic
BridgeTechnology: native_rtp
BridgeCreator: <unknown>
BridgeName: <unknown>
BridgeNumChannels: 2
IsExternal: Yes
Context: sample_musiconhold
Extension: s

Fail

Action: BlindTransfer
Channel: SIP/agent-01-00000002
Exten: s
Context: sample_musiconhold

Response: Error
Message: Transfer invalid

Event: BlindTransfer
Privilege: call,all
Result: Invalid
TransfererChannel: SIP/agent-01-00000002
TransfererChannelState: 6
TransfererChannelStateDesc: Up
TransfererCallerIDNum: agent-01
TransfererCallerIDName: <unknown>
TransfererConnectedLineNum: <unknown>
TransfererConnectedLineName: <unknown>
TransfererLanguage: en
TransfererAccountCode: 
TransfererContext: sample_park
TransfererExten: s
TransfererPriority: 2
TransfererUniqueid: 1481705835.4
TransfererLinkedid: 1481705835.4
BridgeUniqueid: 299de6ea-1dc7-4144-9e46-d6513723333e
BridgeType: parking
BridgeTechnology: holding_bridge
BridgeCreator: Parking
BridgeName: default
BridgeNumChannels: 1
IsExternal: Yes
Context: sample_musiconhold
Extension: s

See also

Bridge

2 개의 채널을 연결시킨다.

Action: Bridge
ActionID: <value>
Channel1: <value>
Channel2: <value>
Tone: <value>
  • ActionID : ActionID for this transaction. Will be returned.
  • Channel1 : Channel to Bridge to Channel2.
  • Channel2 : Channel to Bridge to Channel1.
  • Tone : Play courtesy tone to Channel2.
no
Channel1
Channel2
Both

Example

Action: Bridge
Channel1: SIP/agent-01-00000000
Channel2: SIP/agent-02-00000001
ActionID: 61187bf7-6ef3-4fb5-aab6-42ac52ff0878

Response: Success
ActionID: 61187bf7-6ef3-4fb5-aab6-42ac52ff0878
Message: Channels have been bridged

See also

BridgeDestroy

Destroy a bridge.

Deletes the bridge, causing channels to continue or hang up.

Action: BridgeDestroy
ActionID: <value>
BridgeUniqueid: <value>
  • ActionID
  • BridgeUniqueid : The unique ID of the bridge to destroy.

See also

BridgeInfo

지정한 Bridge 의 상세 정보를 요청한다.

Get information about a bridge. Returns detailed information about a bridge and the channels in it.

Action: BridgeInfo
ActionID: <value>
BridgeUniqueid: <value>
  • ActionID
  • BridgeUniqueid : The unique ID of the bridge about which to retrieve information.

Example

Success

Action: BridgeInfo
BridgeUniqueid: 299de6ea-1dc7-4144-9e46-d6513723333e
ActionID: d3bb2f6b-7e92-45c7-b01b-72d45143b8d1

Response: Success
ActionID: d3bb2f6b-7e92-45c7-b01b-72d45143b8d1
EventList: start
Message: Bridge channel listing will follow

Event: BridgeInfoChannel
ActionID: d3bb2f6b-7e92-45c7-b01b-72d45143b8d1
Channel: SIP/agent-01-0000000a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: agent-01
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: sample_park
Exten: s
Priority: 2
Uniqueid: 1481708311.23
Linkedid: 1481708311.23

Event: BridgeInfoComplete
ActionID: d3bb2f6b-7e92-45c7-b01b-72d45143b8d1
EventList: Complete
ListItems: 1
BridgeUniqueid: 299de6ea-1dc7-4144-9e46-d6513723333e
BridgeType: parking
BridgeTechnology: holding_bridge
BridgeCreator: Parking
BridgeName: default
BridgeNumChannels: 1

Fail

Action: BridgeInfo
BridgeUniqueid: 299de6ea-1dc7-4144-9e46-d6513723333eddd
ActionID: d3bb2f6b-7e92-45c7-b01b-72d45143b8d1

Response: Error
ActionID: d3bb2f6b-7e92-45c7-b01b-72d45143b8d1
Message: Specified BridgeUniqueid not found

BridgeKick

Kick a channel from a bridge.

The channel is removed from the bridge.

Action: BridgeKick
ActionID: <value>
[BridgeUniqueid:] <value>
Channel: <value>
  • ActionID
  • BridgeUniqueid : The unique ID of the bridge containing the channel to destroy. This parameter can be omitted, or supplied to insure that the channel is not removed from the wrong bridge.
  • Channel : The channel to kick out of a bridge.

See also

BridgeList

Get a list of bridges in the system.

Returns a list of bridges, optionally filtering on a bridge type.

Action: BridgeList
ActionID: <value>
BridgeType: <value>
  • ActionID
  • BridgeType : Optional type for filtering the resulting list of bridges.

Example

Action: BridgeList
ActionID: 692667eb-6c9b-4b7a-bb49-30c6ade671e3

Response: Success
ActionID: 692667eb-6c9b-4b7a-bb49-30c6ade671e3
EventList: start
Message: Bridge listing will follow

Event: BridgeListItem
ActionID: 692667eb-6c9b-4b7a-bb49-30c6ade671e3
BridgeUniqueid: 299de6ea-1dc7-4144-9e46-d6513723333e
BridgeType: parking
BridgeTechnology: holding_bridge
BridgeCreator: Parking
BridgeName: default
BridgeNumChannels: 0

Event: BridgeListComplete
ActionID: 692667eb-6c9b-4b7a-bb49-30c6ade671e3
EventList: Complete
ListItems: 1

See also

BridgeTechnologyList

List available bridging technologies and their statuses.

Returns detailed information about the available bridging technologies.

Action: BridgeTechnologyList
ActionID: <value>

Example

Action: BridgeTechnologyList
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b

Response: Success
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b
EventList: start
Message: Bridge technology listing will follow

Event: BridgeTechnologyListItem
BridgeTechnology: holding_bridge
BridgeType: Holding
BridgePriority: 50
BridgeSuspended: No
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b

Event: BridgeTechnologyListItem
BridgeTechnology: simple_bridge
BridgeType: 1to1Mix
BridgePriority: 50
BridgeSuspended: No
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b

Event: BridgeTechnologyListItem
BridgeTechnology: softmix
BridgeType: MultiMix
BridgePriority: 10
BridgeSuspended: No
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b

Event: BridgeTechnologyListItem
BridgeTechnology: native_rtp
BridgeType: Native
BridgePriority: 90
BridgeSuspended: No
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b

Event: BridgeTechnologyListComplete
ActionID: 049b03bf-3a2b-493c-a2b1-0616293fe08b
EventList: Complete
ListItems: 4

See also

BridgeTechnologySuspend

Suspend a bridging technology.

Marks a bridging technology as suspended, which prevents subsequently created bridges from using it.

Action: BridgeTechnologySuspend
ActionID: <value>
BridgeTechnology: <value>
  • BridgeTechnology : The name of the bridging technology to suspend.

Example

Action: BridgeTechnologySuspend
ActionID: 58284e65-4cec-48e3-ba8f-203517974bc3
BridgeTechnology: softmix

Response: Success
ActionID: 58284e65-4cec-48e3-ba8f-203517974bc3
Message: Suspended bridge technology

See also

BridgeTechnologyUnsuspend

Unsuspend a bridging technology.

Clears a previously suspended bridging technology, which allows subsequently created bridges to use it.

Action: BridgeTechnologyUnsuspend
ActionID: <value>
BridgeTechnology: <value>
  • ActionID
  • BridgeTechnology : The name of the bridging technology to unsuspend.

Example

Action: BridgeTechnologyUnsuspend
ActionID: 9bb6fb44-e605-4b4b-8c3b-d12c9821f926
BridgeTechnology: softmix

Response: Success
ActionID: 9bb6fb44-e605-4b4b-8c3b-d12c9821f926
Message: Unsuspended bridge technology

See also

Challenge

Generate Challenge for MD5 Auth.

Generate a challenge for MD5 authentication.

Action: Challenge
ActionID: <value>
AuthType: <value>
  • ActionID
  • AuthType : Digest algorithm to use in the challenge.
MD5

Example

Action: Challenge
ActionID: 8189894c-80c9-4566-b4f6-6e542abdc169
AuthType: MD5

Response: Success
ActionID: 8189894c-80c9-4566-b4f6-6e542abdc169
Challenge: 576396885

See also

ChangeMonitor

Change monitoring filename of a channel.

This action may be used to change the file started by a previous "Monitor" action.

Action: ChangeMonitor
ActionID: <value>
Channel: <value>
File: <value>
  • ActionID
  • Channel : Used to specify the channel to record.
  • File : Is the new name of the file created in the monitor spool directory.

See also

Command

Asterisk CLI 명령어를 실행한다.

Action: Command
ActionID: <value>
Command: <value>
  • ActionID
  • Command : 실행하고자 하는 Asterisk CLI 명령어.

Example

Action: Command
Command: sip show peers

Response: Success
Message: Command output follows
Output: Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description                      
Output: 200/200                   (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: 201/201                   (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: 202/202                   (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: 300/300                   (Unspecified)                            D  Auto (No)  No             0        UNKNOWN                                      
Output: 301/301                   (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: 302/302                   (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: agent-01/agent-01         (Unspecified)                            D  Auto (No)  No             0        UNKNOWN                                      
Output: agent-02/agent-02         (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: agent-03/agent-03         (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: client-01                 (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: client-02                 (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: client-03                 (Unspecified)                            D  Auto (No)  No             0        Unmonitored                                  
Output: 12 sip peers [Monitored: 0 online, 2 offline Unmonitored: 0 online, 10 offline]

See also

ConfbridgeKick

Kick a Confbridge user.

Action: ConfbridgeKick
ActionID: <value>
Conference: <value>
Channel: <value>
  • ActionID
  • Conference
  • Channel : If this parameter is "all", all channels will be kicked from the conference. If this parameter is "paricipants", all non-admin channels will be kicked from the conference.

See also

ConfbridgeList

List prticipants in a conference.

Lists all users in a particular ConfBridge conference. ConfbridgeList will follow as separate events, followed by a final event called ConfbridgeListComplete.

Action: ConfbridgeList
ActionID: <value>
Conference: <value>

Example

Error

Action: ConfbridgeList

Response: Error
Message: No Conference name provided.

See also

ConfbridgeListRooms

현재 사용중인 conference 의 목록을 보여준다.

Lists data about all active conferences. ConfbridgeListRooms will follow as separate events, followed by a final event called ConfbridgeListRoomsComplete.

Action: ConfbridgeListRooms
ActionID: <value>

Example

Error

Action: ConfbridgeListRooms

Response: Error
Message: No active conferences.

ConfbridgeLock

Lock a Confbridge conference.

Action: ConfbridgeLock
ActionID: <value>
Conference: <value>
  • ActionID
  • Conference

Example

Error

Action: ConfbridgeLock

Response: Error
Message: No Conference name provided.

See also

ConfbridgeMute

Mute a Confbridge user.

Action: ConfbridgeMute
ActionID: <value>
Conference: <value>
Channel: <value>
  • ActionID
  • Conference
  • Channel : If this parameter is not a complete channel name, the first channel with this prefix will be used. If this parameter is "all", all channels will be muted. If this parameter is "participants", all non-admin channels will be muted.

Example

Error

Action: ConfbridgeMute

Response: Error
Message: No Conference name provided.

See also

ConfbridgeSetSingleVideoSrc

Set a conference user as the single video source distributed to all other pariticipants.

Action: ConfbridgeSetSingleVideoSrc
ActionID: <value>
Conference: <value>
Channel: <value>
  • ActionID
  • Conference
  • Channel : If this parameter is not a complete channel name, the first channel with this prefix will be used.

Example

Error

Action: ConfbridgeSetSingleVideoSrc

Response: Error
Message: No Conference name provided.

See also

ConfbridgeStartRecord

Start recording a Confbrige conference.

Start recording a conference. If recording is already present an error will be returned. If RecordFile is not provided, the default record file specified in the conference's bridge profile will be used, if that is not present either a file will automatically be generated in the monitor directory.

Action: ConfbridgeStartRecord
ActionID: <value>
Conference: <value>
[RecordFile:] <value>
  • ActionID
  • Conference
  • RecordFile

Example

Error

Action: ConfbridgeStartRecord

Response: Error
Message: No Conference name provided.

See also

ConfbridgeStopRecord

Stop recording a Confbridge conference.

Action: ConfbridgeStopRecord
ActionID: <value>
Conference: <value>
  • ActionID
  • Conference

Example

Error

Action: ConfbridgeStopRecord

Response: Error
Message: No Conference name provided.

See also

ConfbridgeUnlock

Unlock a Confbridge conference.

Action: ConfbridgeUnlock
ActionID: <value>
Conference: <value>
  • ActionID
  • Conference

Example

Error

Action: ConfbridgeUnlock

Response: Error
Message: No Conference name provided.

See also

ConfbridgeUnmute

Unmute a Confbridge user.

Action: ConfbridgeUnmute
ActionID: <value>
Conference: <value>
Channel: <value>
  • ActionID
  • Conference
  • Channel : If this parameter is not a complete channel name, the first channel with this prefix will be used. If this parameter is "all", all channels will be unmuted. If this parameter is "pariticipants", all non-admin channels will be unmuted.

Example

Error

Action: ConfbridgeUnmute

Response: Error
Message: No Conference name provided.

See also

ControlPlayback

채널에 재생되는 playback file 을 제어한다.

채널에 재생되는 playback media file 를 제어한다. 파일을 재생하는 것이 아니라, 이미 initiated 된 media file 에 대해 제어를 하는것임에 유의해야 한다.

Control the playback of a file being played to a channel.

Control the operation of a media file being played back to a channel. Note that this AMI action does not initiate playback of media to channel, but rather controls the operation of a media operation that was already initiated on the channel.

The pause and restart control options will stop at playback operation if that operation was not initated from the ControlPlayback application or the control stream file AGI command.

Action: ControlPlayback
ActionID: <value>
Channel: <value>
Control: <value>
  • ActionID
  • Channel : The name of the channel that currently has a file being played back to it.
  • Control
stop : Stop the playback operation.
forward : Move the current potition in the media forward. The amount of time that the stream moves forward is determined by the skipms value passed to the application that initiated the playback. The default skipms value is 3000 ms.
reverse : Move the current position in the media backward. The amount of time that the stream moves backward is determined by the skipms value passed to the application that initiated the playback. The default skipms value is 3000 ms.
pause : Pause/unpause the playback operation, if supported. If not supported, stop the playback.
restart : Restart the palyback operation, if supported. If not supported, stop the playback.

Example

Normal stop

Action: ControlPlayback
Channel: SIP/300-00000000
Control: stop

Response: Success

Error

Action: ControlPlayback

Response: Error
Message: Channel not specified

See also

CoreSettings

Show PBX core settings(version etc).

Query for Core PBX settings.

Action: CoreSettings
ActionID: <value>
  • ActionID

Example

Action: CoreSettings

Response: Success
AMIversion: 2.8.0
AsteriskVersion: 14.1.1
SystemName: 
CoreMaxCalls: 0
CoreMaxLoadAvg: 0.000000
CoreRunUser: 
CoreRunGroup: 
CoreMaxFilehandles: 0
CoreRealTimeEnabled: No
CoreCDRenabled: Yes
CoreHTTPenabled: No

See also

CoreShowChannels

현재 활성화되어 있는 채널의 목록을 보여준다.

목록과 함께 간단한 채널 정보를 나타낸다.

Action: CoreShowChannels
ActionID: <value>
  • ActionID

Example

Action: CoreShowChannels

Response: Success
EventList: start
Message: Channels will follow

Event: CoreShowChannel
Channel: SIP/300-00000001
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 300
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: sample_musiconhold
Exten: s
Priority: 3
Uniqueid: 1483520582.2
Linkedid: 1483520582.2
Application: MusicOnHold
ApplicationData: 
Duration: 00:00:03
BridgeId: 

Event: CoreShowChannelsComplete
EventList: Complete
ListItems: 1

See also

CoreStatus

Show PBX core status variables.

Query for Core PBX status.

Action: CoreStatus
ActionID: <value>
  • ActionID

Example

Action: CoreStatus

Response: Success
CoreStartupDate: 2016-12-31
CoreStartupTime: 18:17:30
CoreReloadDate: 2016-12-31
CoreReloadTime: 18:17:30
CoreCurrentCalls: 0

See also

CreateConfig

Configuration directory 에 빈 파일을 생성한다. 보통 UpdateConfig action 과 같이 사용된다.

Create 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.

Action: CreateConfig
ActionID: <value>
Filename: <value>

Example

Action: CreateConfig
Filename: test.conf

Response: Success
Message: New configuration file created successfully

See also

DAHDIDialOffhook

Dial over DAHDI channel while offhook.

Generate DTMF control frames to the bridged peer.

Action: DAHDIDialOffhook
ActionID: <value>
DAHDIChannel: <value>
Number: <value>
  • ActionID
  • DAHDIChannel : DAHDI channel number to dial digits.
  • Number : Digits to dial.

See also

DAHDIDNDoff

Toggle DAHDI channel Do Not Disturb status OFF.

Equivalent to the CLI command "dahdi set dnd channel off".

Feature only supported by analog channel.
Action: DAHDIDNDoff
ActionID: <value>
DAHDIChannel: <value>
  • ActionID
  • DAHDIChannel : DAHDI channel number to set DND off.

See also

DAHDIDNDon

Toggle DAHDI channel Do Not Disturb status ON.

Equivalent to the CLI command "dahdi set dnd channel on".

Feature only supported by analog channels.
Action: DAHDIDNDon
ActionID: <value>
DAHDIChannel: <value>
  • ActionID
  • DAHDIChannel : DAHDI channel number to set DND on.

See also

DAHDIHangup

Hangup DAHDI Channel.

Simulate an on-hook event by the user connected to the channel.

Valid only for analog channels.
Action: DAHDIHangup
ActionID: <value>
DAHDIChannel: <value>
  • ActionID
  • DAHDIChannel : DAHDI chnnel number to hangup.

See also

DAHDIRestart

Fully Restart DAHDI channels(terminates calls).

Equivalent to the CLI command "dahdi restart".

Action: DAHDIRestart
ActionID: <value>
  • ActionID

See also

DAHDIShowChannels

Show status of DAHDI channels.

Similar to the CLI command "dahdi show channels".

Action: DAHDIShowChannels
ActionID: <value>
DAHDIChannel: <value>
  • ActionID
  • DAHDIChannel : Specify the specify channel number to show. Show all channels if zero or not present.

See also

DAHDITransfer

Transfer DAHDI Channel.

Simulate a flash hook by the user connected to the channel.

Valid only for analog channels.
Action: DAHDITransfer
ActionID: <value>
DAHDIChannel: <value>
  • ActionID
  • DAHDIChannel : DAHDI channel number to transfer.

See also

DataGet

Retrieve the data api tree.

Retrieve the data api tree.

Action: DataGet
ActionID: <value>
Path: <value>
Search: <value>
Filter: <value>
  • ActionID
  • Path
  • Search
  • Filter

Example

Error

Action: DataGet

Response: Error
Message: 'Path' parameter not specified

See also

DBDel

Delete DB entry.

Action: DBDel
ActionID: <value>
Family: <value>
Key: <value>
  • ActionID
  • Family
  • Key

Example

Action: DBDel
Family: TestFamily
Key: Testkey

Response: Success
Message: Key deleted successfully

See also

DBDelTree

Delete DB Tree.

Action: DBDelTree
ActionID: <value>
Family: <value>
Key: <value>
  • ActionID
  • Family
  • Key

See also

DBGet

Get DB Entry

Action: DBGet
ActionID: <value>
Family: <value>
Key: <value>
  • ActionID
  • Family
  • Key

Example

Normal

Action: DBGet
Family: pbx
Key: UUID

Response: Success
EventList: start
Message: Result will follow

Event: DBGetResponse
Family: pbx
Key: UUID
Val: 5c734b17-7f60-477d-b350-cf972c5e4ebb

Event: DBGetComplete
EventList: Complete
ListItems: 1

Error

Action: DBGet
Family: Queue
Key: *

Response: Error
Message: Database entry not found

See also

DBPut

Put DB entry.

Action: DBPut
ActionID: <value>
Family: <value>
Key: <value>
Val: <value>
  • ActionID
  • Family
  • Key
  • Val

Example

Action: DBPut
Family: TestFamily
Key: Testkey
Val: TestVal

Response: Success
Message: Updated database successfully

See also

DeviceStateList

List the current known device states.

This will list out all known device states in a sequence of DeviceStateChange events. When finished, a DeviceStateListComplete event will be emitted.

Action: DeviceStateList
ActionID: <value>
  • ActionID

Example

Action: DeviceStateList

Response: Success
EventList: start
Message: Device State Changes will follow

Event: DeviceStateChange
Device: SIP/300
State: UNAVAILABLE

...

Event: DeviceStateListComplete
EventList: Complete
ListItems: 13

See also

DialplanExtensionAdd

Enable since Asterisk-13

Dialplan 에 Extension 을 추가한다.

Action: DialplanExtensionAdd
ActionID: <value>
Context: <value>
Extension: <value>
Priority: <value>
Application: <value>
[ApplicationData:] <value>
[Replace:] <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • Context - Context where the extension will be created. The context will be created if it does not already exist.
  • Extension - Name of the extension that will be created (may include callerid match by separating with '/')
  • Priority - Priority being added to this extension. Must be either hint or a numerical value.
  • Application - The application to use for this extension at the requested priority
  • ApplicationData - Arguments to the application.
  • Replace - If set to 'yes', '1', 'true' or any of the other values we evaluate as true, then if an extension already exists at the requested context, extension, and priority it will be overwritten. Otherwise, the existing extension will remain and the action will fail.

Example

Action: DialplanExtensionAdd
ActionID: 123456
Context: test_dialplan
Extension: test_exten
Priority: 1
Application: echo

Response: Success
ActionID: 123456
Message: Added requested extension

See also

DialplanExtensionRemove

Enable since Asterisk-13

Dialplan 에서 Extension 을 삭제한다.

Action: DialplanExtensionRemove
ActionID: <value>
Context: <value>
Extension: <value>
[Priority:] <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • Context - Context of the extension being removed
  • Extension - Name of the extension being removed (may include callerid match by separating with '/')
  • Priority - If provided, only remove this priority from the extension instead of all priorities in the extension.

Example

Action: DialplanExtensionRemove
ActionID: 999
Context: test_dialplan
Extension: test_exten

Response: Success
ActionID: 999
Message: Removed the requested extension

See also

Events

Control Event Flow.

수신하는 Event 를 on/off 한다. Off 로 설정할 경우, 모든 종류의 Event notify 수신을 거부하게 된다.

Action: Events
ActionID: <value>
EventMask: <value>
  • ActionID
  • EventMask
on : If all events should be sent.
off : if no events should be sent.
system, call, log, ... : To select which flags events should have to be sent.

Example

Action: Events
Eventmask: off

Response: Success
Events: Off

See also

ExtensionState

Check Extension Status.

Report the extension state for given extension. If the extension has a hint, will use devicestate to check the status of the device connected to the extension. Will return an Extension Status message. The response will include the hint for the extension and the status.

Action: ExtensionState
ActionID: <value>
Exten: <value>
Context: <value>
  • ActionID
  • Exten : Extension to check state on.
  • Context : Context for extension.

Example

Action: ExtensionState
Exten: agent-01
Context: public

Response: Success
Message: Extension Status
Exten: agent-01
Context: public
Hint: 
Status: -1
StatusText: Unknown

See also

ExtensionStateList

List the current known extension states.

This will list out all known extension states in a sequence of ExtensionStatus events. When finished, a ExtensionStateListComplete event will be emitted.

Action: ExtensionStateList
ActionID: <value>
  • ActionID

Example

Action: ExtensionStateList

Response: Success
EventList: start
Message: Extension Statuses will follow

Event: ExtensionStateListComplete
EventList: Complete
ListItems: 0

See also

FAXSession

Responsds with a detailed description of a single FAX session.

Provides details about a specific FAX session. The response will include a common subset of the output from the CLI command "fax show session <session_number>" for each technology. If the FAX technology used by this session does not include a handler for FAXSession, then this action will fail.

Action: FAXSession
ActionID: <value>
SessionNumber: <value>
  • ActionID
  • SessionNumber : The session ID of the fax the user is interested in.

Example

Error

Action: FAXSession

Response: Error
Message: Invalid session ID

See also

FAXSessions

Lists active FAX sessions.

Will generate a series of FAXSession events with information about each FAXSession. Closes with a FAXSessionsComplete event which includes a count of the included FAX sessions. This action works in the same manner as the CLI command "fax show sessions".

Action: FAXSessions
ActionID: <value>
  • ActionID

Example

Action: FAXSessions

Response: Success
EventList: Start
Message: FAXSessionsEntry event list will follow

Event: FAXSessionsComplete
EventList: Complete
ListItems: 0
Total: 0

See also

FAXStats

Responds with fax statistics.

Provides FAX statistics including the number of active sessions, reserved sessions, completed sessions, failed sessions, and the number receive/transmit attempts. This command provides all the non-technology specific information provided by the CLI command "fax show stats".

Action: FAXStats
ActionID: <value>
  • ActionID

Example

Action: FAXStats

Response: Success
Message: FAXStats event will follow

Event: FAXStats
CurrentSessions: 0
ReservedSessions: 0
TransmitAttempts: 0
ReceiveAttempts: 0
CompletedFAXes: 0
FailedFAXes: 0

See also

Filter

Dynamically add filters for the current manager session.

The filters added are only used for the current session. Once the connection is closed the filters are removed. This command requires the system permission because this command can be used to create filters that may bypass filters defined in manager.conf.

Action: Filter
ActionID: <value>
Operation: <value>
Filter: <value>
  • ActionID
  • Operation
Add : Add a filter.
  • Filter : Filters can be whitelist of blacklist. Example whitelist filter: "Event: Newchannel". Example blacklist filter: "!Channel: DAHDI.*". This filter option is used to whitelist or blacklist events per user to be reported with regular expression and are allowed if both the regex matches and the user has read access as defined in manager.conf. Filters are assumed to be for whitelisting unless preceeded by an exclamation point, which marks it as being black. Evaluation of the filters is as follows:
If no filters are configured all events are reported as normal.
If there are white filters only: implied black all filter processed first, then white filters.
If there are black filters only: implied white all filter processed first, then black filters.
If there are both white and black filters: implied black all filter processed first, then white filters, and lastly black filters.

Example

Action: Filter
Operation: Add
Filter: !Event: Fax*

Response: Success
Message: Success

See also

FilterList

Show current event filters for this session.

The filters displayed are for the current session. Only those filters defined in manager.conf will be present upon starting a new session.

Action: FilterList
ActionID: <value>
  • ActionID

See also

GetConfig

Retrieve configuration.

This action will dump the contents of a configuration file by category and contents or optionally by specified category only. In the case where a category name is non-unique, a filter may be specified to match only categories with matching variable values.

Action: GetConfig
ActionID: <value>
Filename: <value>
Category: <value>
Filter: <value>
  • ActionID
  • Filename : Configuration filename(e.g. foo.conf)
  • Category : Category in configuration file.
  • Filter : A comma separated list of name_regex=value_regex expressions which will cause only categories whose variables match all expressions to be considered. The special variable name TEMPLATES can be used to control whether templates are included. Passing include as the value will include templates along with normal categories. Passing restrict as the value will restrict the operation to ONLY templates. Not specifying a TEMPLATES expression result in the default behavior which is to not include templates.

Example

Action: GetConfig
Filename: queues.conf

Response: Success
Category-000000: general
Line-000000-000000: persistentmembers=yes
Line-000000-000001: monitor-type=MixMonitor
Category-000001: sales_1
Line-000001-000000: musicclass=default
Line-000001-000001: strategy=ringall
Line-000001-000002: joinempty=yes

See also

GetConfigJSON

지정한 Configuration 파일 내용은 JSON 형식으로 나타낸다.

Retrieve configuration (JSON format).

This action will dump the contents of a configuration file by category and contents in JSON format or optionally by specified category only. This only makes sense to be used using rawman over the HTTP interface. In the case where a category name is non-unique, a filter may be specified to match only categories with matching variable values.

Action: GetConfigJSON
ActionID: <value>
Filename: <value>
Category: <value>
Filter: <value>
  • ActionID
  • Filename : Configuration filename(e.g. foo.conf)
  • Category : Category in cofiguration file.
  • Filter : A comma separated list of name_regex=value_regex expressions which will cause only categories whose variables match all expressions to be considered. The special variable name TEMPLATES can be used to control whether templates are included. Passing include as the value will include templates along with normal categories. Passing restrict as the value will restrict the operation to ONLY templates. not specifying a TEMPLATES expression results in the default behavior which is to not include templates.

Example

Action: GetConfigJSON
Filename: queues.conf

Response: Success
JSON: {"general":{"persistentmembers":"yes","monitor-type":"MixMonitor"},"sales_1":{"musicclass":"default","strategy":"ringall","joinempty":"yes"}}

See also

GetVar

지정한 Variable 의 값을 확인한다. 만약 채널을 지정하지 않을 경우, global variable 로 간주한다.

Gets the value of a channel variable or function return.

If a channel name is not provided then the variable is considered global.
Action: Getvar
ActionID: <value>
Channel: <value>
Variable: <value>
  • ActionID
  • Channel : Channel to read variable from.
  • Variable : Variable name, function or expression.

Example

Action: GetVar
Variable: CONSOLE

Response: Success
Variable: CONSOLE
Value: Console/dsp

See also

Hangup

채널을 종료한다.

Action: Hangup
ActionID: <value>
Channel: <value>
Cause: <value>
  • channel : 종료하고자하는 채널의 정확한 이름. 혹은 정규표현식도 가능하다.
Example exact channel: SIP/provider-0000012a
Example regular expression: /^SIP/provider-.*$/
  • Cause : 채널 종료 사유(숫자). 자세한 Cause 종류와 내용은 Asterisk_code 참조.

Example

Normal

Action: Hangup
Channel: SIP/300-00000000
Cause: 16

Response: Success
Message: Channel Hungup

...

Event: Hangup
Privilege: call,all
Channel: SIP/300-00000000
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 300
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: sample_musiconhold
Exten: s
Priority: 3
Uniqueid: 1484558265.0
Linkedid: 1484558265.0
Cause: 16
Cause-txt: Normal Clearing

Hangup request without cause code

Action: Hangup
Channel: SIP/300-00000001

Response: Success
Message: Channel Hungup

...

Event: Hangup
Privilege: call,all
Channel: SIP/300-00000001
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 300
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: sample_musiconhold
Exten: s
Priority: 3
Uniqueid: 1484558362.2
Linkedid: 1484558362.2
Cause: 0
Cause-txt: Unknown

See also

IAXnetstats

Show IAX Netstats.

Show IAX channels network statistics.

Action: IAXnetstats

See also

IAXpeerlist

모든 IAX peer 정보를 표시한다.

List IAX Peers.

Action: IAXpeerlist
ActionID: <value>
  • ActionID

See also

IAXpeers

List IAX peers.

Action: IAXpeers
ActionID: <value>

See also

IAXregistry

Show IAX registrations.

Action: IAXregistry
ActionID: <value>
  • ActionID

See also

JabberSend

Sends a message to a Jabber Client. (res_xmpp)

Action: JabberSend
ActionID: <value>
Jabber: <value>
JID: <value>
Message: <value>
  • ActionID
  • Jabber : Client or transport Asterisk uses to connect to JABBER.
  • JID : XMPP/Jabber (name) of recipient.
  • Message : Message to be sent to the buddy.

See also

ListCategories

List categories in configuration file.

This action will dump the categories in a given file.

Action: ListCategories
ActionID: <value>
Filename: <value>
  • ActionID
  • Filename : Configuration filename(e.g. foo.conf)

Example

Action: ListCategories
Filename: sip.conf

Response: Success
Category-000000: general
Category-000001: authentication
Category-000002: agent-01
Category-000003: agent-02
Category-000004: agent-03
Category-000005: client-01
Category-000006: client-02
Category-000007: client-03
Category-000008: 200
Category-000009: 201
Category-000010: 202
Category-000011: 300
Category-000012: 301
Category-000013: 302

See also

ListCommands

현재 접속중인 계정으로 사용가능한 모든 AMI action 명령어 목록을 보여준다.

List available manager commands.

Returns the action name and synopsis for every action that is available to the user.

Action: ListCommands
ActionID: <value>
  • ActionID

Example

Action: ListCommands

Response: Success
AbsoluteTimeout: Set absolute timeout.  (Priv: system,call,all)
AgentLogoff: Sets an agent as no longer logged in.  (Priv: agent,all)
...

See also

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.

Action: LocalOptimizeAway
ActionID: <value>
Channel: <value>
  • ActionID
  • Channel : The channel name to optimize away.

Example

Error

Action: LocalOptimizeAway
Channel: SIP/300-00000002

Response: Error
Message: Unable to find channel

See also

LoggerRotate

Reload and rotate the Asterisk logger.

Reload and rotate the logger. Analogous to the CLI command "logger rotate".

Action: LoggerRotate
ActionID: <value>
  • ActionID

Example

Action: LoggerRotate

Response: Success
Message: Reloaded the logger and rotated log files

See also

Login

AMI login 을 한다.

Action: Login
ActionID: <value>
Username: <value>
Secret: <value>
  • Username : Access Username. manager.conf 에 설정되어 있다.
  • Secret : Password. manager.conf 에 설정되어 있다.

Example

$ telnet localhost 5038
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Asterisk Call Manager/2.8.0

Action: login
username: test
secret: test

Response: Success
Message: Authentication accepted

See also

Logoff

AMI logoff 를 한다.

Action: Logoff
ActionID: <value>

Example

Action: Logoff
ActionID: logofftest

Response: Goodbye
ActionID: logofftest
Message: Thanks for all the fish.

See also

MailboxCount

음성사서함에 저장된 메시지 갯수를 확인한다.

Check Mailbox Message Count.

Checks a voicemail account for new messages. Returns number of urgent, new and old messages.

Action: MailboxCount
ActionID: <value>
Mailbox: <value>
  • Mailbox : Full mailbox ID. mailbox@vm-context.

See also

MailboxStatus

Check mailbox.

Checks a voicemail account for status. Returns whether there are messages waiting.

Action: MailboxStatus
ActionID: <value>
Mailbox: <value>
  • ActionID
  • Mailbox : Full mailbox ID. mailbox@vm-context.

See also

MeetmeList

List participants in a conference.

Lists all users in a particular MeetMe conference. MeetmeList will follow as separate events, followed by a final event called MeetmeListComplete.

Action: MeetmeList
ActionID: <value>
[Conference:] <value>
  • ActionID
  • Conference : Conference number

See also

MeetmeListRooms

List active conference.

Lists data about all active conferences. MeetmeListRooms will follow as separate events, followed by a final event MeetmeListRoomsComplete.

Action: MeetmeListRooms
ActionID: <value>
  • ActionID

See also

MeetmeMute

Mute a Meetme user.

Action: MeetmeMute
ActionID: <value>
Meetme: <value>
Usernum: <value>
  • ActionID
  • Meetme
  • Usernum

See also

MeetmeUnmute

Unmute a Meetme user.

Action: MeetmeUnmute
ActionID: <value>
Meetme: <value>
Usernum: <value>
  • ActionID
  • Meetme
  • Usernum

See also

MessageSend

Send an out of call message to an endpoint.

Action: MessageSend
ActionID: <value>
To: <value>
From: <value>
Body: <value>
Base64Body: <value>
Variable: <value>
  • ActionID
  • To : The URI the message is to be sent to.
Technology : PJSIP - Specifying a prefix of pjsip. Will send the message as a SIP MESSAGE request.
Technology : SIP - Specifying a prefix of sip. Will send the message as a SIP MESSAGE request.
Technology : XMPP - Specifying a prefix of xmpp. Will send the message as an XMPP chat message.
  • From : A from URI for the message if needed for the message technology being used to send this message.
Technology : PJSIP - The from parameter can be a configured endpoint or in the form of "display-name" <URI>.
Technology : SIP - The from parameter can be a configured endpoint or in the form of "display-name" <URI>.
Technology : XMPP - Specifying a prefix of xmpp. Will specify the account defined in xmpp.conf to send the message form. Note that this field is required for XMPP messages.
  • Body : The message body text. This must not contain any newlines as that conflicts with the AMI protocol.
  • Base64Body : Text bodies requiring the use of newlines have to be base 64 encoded in this field. Base64Body will be encoded before being sent out. Base64Body takes precedence over Body.
  • Variable : Message variable to set, multiple Variable: headers are allowed. The header value is a comma separated list of name=value pairs.

Example

Normal

Action: MessageSend
To: sip:agent-01@pluto.pchero21.com:5060
Body: Test message

Response: Success
Message: Message successfully sent

Error

Action: MessageSend
To: agent-01@pluto.pchero21.com:5060
Body: Test message

Response: Error
Message: Message technology not found.

See also

MixMonitor

Record a call end mix the audio during the recording. Use of StopMixMonitor is required to guarantee the audio file is available for processing during dialplan execution.

This action records the audio on the current channel to the specified file.

MIXMONITOR_FILENAME : Will contain the filename used to record the mixed stream.
Action: MixMonitor
ActionID: <value>
Channel: <value>
File: <value>
options: <value>
Command: <value>
  • ActionID
  • Channel : Used to specify the channel to record.
  • File : The name of the file created in the monitor spool directory. Defaults to the same name as the channel(with slashes replaced with dashes). This argument is optional if you specify to record unidirectional audio with either the r(filename) or t(filename) options in the options field. If neither MIXMONITOR_FILENAME or this parameter is set, the mixed stream won't be recorded.
  • options : Options that apply to the MixMonitor in the same way as they would apply if invoked from the MixMonitor application. For a list of available options, see the documentation for the mixmonitor application.
  • Command : Will be executed when the recording is over. Any string matching ^{X} will be unescaped to X. All variables will be evaluated at the time MixMonitor is called.

Example

Action: MixMonitor
Channel: SIP/agent-01-00000009
File: test_record

Response: Success

See also

MixMonitorMute

Mixmonitor 중인 채널의 음소거 혹은 음소거 해제를 한다.

Recording 뿐만 아니라, 통화에서도 음소거/음소거 해제가 된다.

Mute/unMute a Mixmonitor recording.

This action may be used to mute a MixMonitor recording.

Action: MixMonitorMute
ActionID: <value>
Channel: <value>
Direction: <value>
State: <value>
  • ActionID
  • Channel : Used to specify the channel to mute.
  • Direction : Which part of the recording to mute. read, write or both (from channel, to channel or both channels).
  • State : Turn mute on or off. 1 to on, 0 to turn off.

Example

Action: MixMonitorMute
Channel: SIP/agent-01-0000000a
Direction: both
State: 1

Response: Success

See also

ModuleCheck

모듈이 load 되어 있는지를 확인한다.

Check if module is loaded.

Checks if Asterisk module is loaded. Will return Success/Failure. For Success returns, the module revision number is included.

Action: ModuleCheck
ActionID: <value>
Module: <value>
  • ActionID
  • Module : Asterisk module name(not including extension).

Example

Normal

Action: ModuleCheck
Module: chan_sip

Response: Success
Version: Revision: 369792

Error

Action: ModuleCheck
Module: chan_sip test

Response: Error
Message: Module not loaded

See also

ModuleLoad

Module management.

Loads, unloads or reloads an Asterisk module in a running system.

Action: ModuleLoad
ActionID: <value>
Module: <value>
LoadType: <value>
  • Action
  • Module : 모듈 이름 혹은 서브 시스템 구분자. 원문에는 .so 확장자까지 전부 입력해야 한다고 나와 있으나, 테스트 결과(Asterisk-1.8, Asterisk-14) 확장자는 없어도 상관 없었다. 아래에는 사용가능한 서브시스템 이름 목록들이다. Asterisk module name (including .so extension) or subsystem identifier.
cdr
dnsmgr
extconfig
enum
acl
manager
http
logger
features
dsp
udptl
indications
cel
plc
  • LoadType : The operation to be done on module. Subsystem identifiers may only be reloaded. If no module is specified for a r
load : 지정된 모듈을 load 한다.
unload : 지정된 모듈을 unreload 한다.
reload : 지정된 모듈을 reload 한다. 만약 지정된 모듈이 없을 경우, 모든 모듈을 reload 한다.

Example

Normal subsystem

Action: ModuleLoad
Module: cdr
LoadType: reload

Response: Success
Message: Module reloaded.

Normal module name

Action: ModuleLoad
Module: chan_sip
LoadType: reload

Response: Success
Message: Module reloaded.

Error

Action: ModuleLoad
Module: chan_sip_test
LoadType: reload

Response: Error
Message: No such module.

See also

Monitor

채널을 모니터링 한다. 모니터링되는 채널은 in/out 오디로가 녹음되며, 녹음된 파일의 Default 디렉토리는 (/var/spool/asterisk/monitor) 이다.

pchero@pluto:/var/spool/asterisk/monitor $ ls -tlr
total 408
-rw-r--r-- 1 root root 206764 Dec 16 09:26 SIP-300-00000000-out.wav
-rw-r--r-- 1 root root 206444 Dec 16 09:26 SIP-300-00000000-in.wav

This action may be used to record the audio on a specified channel.

Action: Monitor
ActionID: <value>
Channel: <value>
File: <value>
Format: <value>
Mix: <value>
  • ActionID
  • Channel : Used to specify the channel to record.
  • File : Is the name of the file created in the monitor spool directory. Defaults to the same name as the channel(with slashed replaced with dashes).
  • Format : Is the audio recording format. Defaults to wav.
  • Mix : 하나의 파일에 input/output 데이터를 모두 write 할 지를 설정한다(Default : false). Boolean parameter as to whether to mix the input and output channels together after the recording is finished.

Example

Action: Monitor
Channel: SIP/300-00000000

Response: Success
Message: Started monitoring channel

See also

Originate

발신을 한다.

Action: Originate
ActionID: <value>
Channel: <value>
Exten: <value>
Context: <value>
Priority: <value>
Application: <value>
Data: <value>
Timeout: <value>
CallerID: <value>
Variable: <value>
Account: <value>
EarlyMedia: <value>
Async: <value>
Codecs: <value>
ChannelId: <value>
OtherChannelId: <value>
  • Channel : 발신 목적지 채널
  • Exten : 발신 성공 후 연결될 Extension(Context, Priority 항목 설정 필요)
  • Context : 발신 성공 후 연결될 Context(Exten, Priority 항목 설정 필요)
  • Priority : 발신 성공 후 사용될 Priority(Exten, Context 항목 설정 필요)
  • Application : 발신 성공 후 실행될 Application
  • Data : Application 에 사용될 Data(Application 항목 설정 필요)
  • Timeout : 발신 후, 응답시까지의 timeout
  • CallerID : 발신 채널에 설정될 Caller ID. "CallerIDName"<CallerIdNum> 의 형식으로 name 과 number 의 설정이 가능하다<ref>http://www.voip-info.org/wiki/view/Setting+Callerid</ref>
  • Variable : 채널 헤더에 설정될 임의 변수 값. 다중의 채널 헤더 변수 값 설정 가능.
  • Account  : Account code
  • EalryMedia : true 설정시, 강제로 early media 로 연결되게 된다.
  • Async : true 설정시, 곧바로 발신 성공값을 리턴한다.
  • Codecs : 발신에 사용될 코덱 지정. 콤마로 구분자로 여러개의 값을 지정할 수 있다.
  • ChannelId : 채널에 설정될 유니크 아이디 값.
  • OtherChannelId : 다른쪽 로컬 채널에 설정될 유니크 아이디 값.

Example

Action: Originate
ActionId: 1112
Channel: sip/300
Application: park
Async: 1

Response: Success
ActionID: 1112
Message: Originate successfully queued

Park

Action: Park
ActionID: <value>
Channel: <value>
[TimeoutChannel:] <value>
[AnnounceChannel:] <value>
[Timeout:] <value>
[Parkinglot:] <value>
  • ActionID - Action ID for this transaction. Will be returned.
  • Channel - Channel name to park.
  • TimeoutChannel - Channel name to use when constructing the dial string that will be dialed if the parked channel times out. If TimeoutChannel is in a two party bridge with channel, then TimeoutChannel will receive an announcement and be treated as having parked Channel in the same manner as the Park Call DTMF feature.
  • AnnounceChannel - If specified, then this channel will receive an announcement when Channel is parked if AnnounceChannel is in a state where it can receive announcements(AnnounceChannel must be bridged). AnnounceChannel has no bearing on the actual state of the parked call.
  • Timeout - Overrides the timeout of the parking lot for this park action. Specified in milliseconds, but will be converted to seconds. Use a value of 0 to disable the timeout.
  • Parkinglot - The parking lot to use when parking the channel.

Example

Action: park
Channel: SIP/300-00000013

Response: Success
Message: Park successful

ParkedCalls

해당 parking lot 에 대기중인 콜들의 정보를 요청한다.

Action: ParkedCalls
ActionID: <value>
ParkingLot: <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • ParkingLot - If specified, only show parked calls from the parking lot with this name.

Parkinglots

현재 등록되어 있는 모든 parking lot 정보를 요청한다.

Action: Parkinglots
ActionID: <value>
  • ActionID - ActionID for this transaction. Will be returned.

QueueStatus

Queue/Member(Channel) 의 현재 상태 정보를 확인한다. 입력된 Queue/Member(Channel) 항목이 없다면 현재 활성화된 전체 Queue/Member(Channel) 의 상태 정보를 리턴한다.

Action: QueueStatus
ActionID: <value>
Queue: <value>
Member: <value>
  • Queue - 확인하고자 하는 Queue name.
  • Member - 확인하고자 하는 멤버(Channel) 이름

Example

Action: QueueStatus
Queue: Camp200
ActionID: 001

Response: Success
ActionID: 001
Message: Queue status will follow

Event: QueueParams
Queue: Camp200
Max: 0
Strategy: ringall
Calls: 0
Holdtime: 0
TalkTime: 0
Completed: 0
Abandoned: 0
ServiceLevel: 0
ServicelevelPerf: 0.0
Weight: 100
ActionID: 001

Event: QueueMember
Queue: Camp200
Name: user1
Location: Local/200@DialCamp
Membership: static
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 5
Paused: 0
ActionID: 001

Event: QueueEntry
Queue: Camp200
Position: 1
Channel: SIP/test-201-00000001
Uniqueid: 1447837150.7
CallerIDNum: 201
CallerIDName: user 2
ConnectedLineNum: unknown
ConnectedLineName: unknown
Wait: 16

Event: QueueStatusComplete
ActionID: 001

- QueueParam 정보

  • Event - 메시지 타입. QueueParam:Queue 정보, QueueMember:Queue에 속해있는 member 정보, QueueEntry:Queue에서 대기중인 콜 정보.
  • Queue - Queue name
  • Max - Queue에서 허용 가능한 최대 콜 수.
  • Strategy - 콜 분배 방식.(rignall|roundrobin|leastrecent|fewestcalls|random|rrmemory|linear|wrandom)
  • HoldTime - 현재 평균 큐 대기 시간.
  • Weight - 큐의 우선 순위. 높은(많은) 우선순위를 가진 큐의 콜이 낮은(적은) 우선순위를 가진 큐보다 먼저 분배될 확률이 높아진다.
  • ServiceLevel - ServiceLevelPerf 를 확인하는 Interval time(sec)
  • ServicelevelPerf - SerivceLevel 시간동안의 콜 응답률(%). 응답 콜 /전체 인입 콜 * 100
  • Calls - 현재 큐에서 대기중인 콜의 갯수.
  • Abandoned - 큐에서 대기중에 분배되지 못하고 끊어진 콜.
  • TalkTikme - 분배 후 평균 통화시간.
  • Completed - 정상적으로 분배 완료된 콜 갯수

- QueueMember 정보

  • Event - 메시지 타입. QueueParam:Queue 정보, QueueMember:Queue에 속해있는 member 정보, QueueEntry:Queue에서 대기중인 콜 정보.
  • Queue - Queue name
  • Name - Member name
  • Status - 멤버의 상태 번호
    • 0:AST_DEVICE_UNKNOWN
    • 1:AST_DEVICE_NOT_INUSE
    • 2:AST_DEVICE_INUSE
    • 3:AST_DEVICE_BUSY
    • 4:AST_DEVICE_INVALID
    • 5:AST_DEVICE_UNAVAILABLE
    • 6:AST_DEVICE_RINGING
    • 7:AST_DEVICE_RINGINUSE
    • 8:AST_DEVICE_ONHOLD
  • Location - 멤버의 Channel 정보 혹은 위치 정보
  • StateInterface - 멤버의 상태 정보를 확인하는 장치 정보.
  • Membership - 멤버의 등록 방법(dynamic|realtime|static).
    • dynamic - 동적 등록. AMI, Dialplan 등으로 등록된 방식.
    • static - 정적 등록. queues.conf 에 명시적으로 등록하여 등록된 방식.
    • static -
  • Penalty - 패널티 정보(높은 패널티를 가지게 되면 상대적으로 콜을 분배받기 어려워진다.)
  • CallsTaken - 분배받은 콜의 숫자
  • LastCall - 마지막으로 받은 콜의 시간. Unix 타임을 사용한다.
  • Paused - Paused 여부. (1:Paused 상태, 0:Normal 상태)

- QueueEntry 정보

  • Event - 메시지 타입. QueueParam:Queue 정보, QueueMember:Queue에 속해있는 member 정보, QueueEntry:Queue에서 대기중인 콜 정보.
  • Queue - Queue name
  • Position - Priority number of entry from the queue.
  • Channel - Channel name
  • Uniqueid - Unique id of Asterisk
  • CallerIDNum - Caller's number
  • CallerIDName - Caller's name
  • ConnectedLineNum - 현재 이 콜과 연결된(통화중인) number
  • ConnectedLineName - 현재 이 콜과 연결된(통화중인) name
  • Wait - 이 큐에서 대기한 시간(초)

QueueSummary

Queue의 간략 상태를 표시한다.

Action: QueueSummary
ActionID: <value>
Queue: <value>
  • Queue : Queue name

Example

Action: QueueSummary
Queue: Camp200

Response: Success
Message: Queue summary will follow

Event: QueueSummary
Queue: Camp200
LoggedIn: 1
Available: 1
Callers: 0
HoldTime: 0
TalkTime: 3
LongestHoldTime: 0

Event: QueueSummaryComplete
  • LoggedIn : 현재 로그인(활성화)되어 있는 멤버(Channel) 갯수
  • Available : 현재 대기중인 멤버(Channel) 갯수
  • Callers : 현재 큐에 인입되어 대기중인 콜 갯수
  • HoldTime : 콜이 큐에 인입되어 분배되기 까지의 평균 대기 시간
  • TalkTime : 콜이 큐에 인입되어 분배되고 난 후의 평균 통화 시간
  • LongestHoldTime : 큐에서 가장 오래 대기한 콜의 대기시간.

QueuePenalty

큐 멤버의 패널티를 설정한다.

Action: QueuePenalty
ActionID: <value>
Interface: <value>
Penalty: <value>
Queue: <value>
  • Interface : 패널티를 수정하고자 하는 멤버(Channel) 이름(tech/name).
  • Penalty : 설정하고자 하는 패널티 값. 단, 음수를 설정할수는 없다.
  • Queue : 패널티를 설정하고자하는 큐 이름. 만약 지정하지 않으면, 해당 멤버(Channel)이 속한 모든 큐에서 패널티 값을 수정하게 된다.

QueuePause

큐에 설정된 멤버(Channel)을 일시적 사용불가/사용가능 상태로 변경한다.

Action: QueuePause
ActionID: <value>
Interface: <value>
Paused: <value>
Queue: <value>
Reason: <value>
  • Interface : 사용가능/불가 상태로 지정하고자 하는 채널 혹은 인터페이스(tech/name)
  • Paused : "true": 사용불가, "false" : 사용가능
  • Queue : paused/unpaused 하고자 하는 큐 이름. 만약 지정하지 않으면, 해당 멤버(Channel)이 속한 모든 큐에서 paused/unpaused 를 하게 된다.
  • Reason : Description. QueueMemberPaused 이벤트에 설정되게 된다.

QueueReload

Queue를 reload한다. 하나 혹은 다수 Queue 또는 큐의 하위 섹션들을 reload 한다.

Action: QueueReload
ActionID: <value>
Queue: <value>
Members: <value>
Rules: <value>
Parameters: <value>
  • Queue : reload 하고자 하는 큐 이름. 만약 지정하지 않으면, 모든 큐에 대해 reload가 수행된다.
  • Members : Queue 의 멤버들의 reload 여부. (yes|no)
  • Rules : queuerules.conf 파일의 reload 여부. (yes|no)
  • Parameters : 다른 Queue 옵션들의 reload 여부. (yes|no)

QueueAdd

Action: QueueAdd
ActionID: <value>
Queue: <value>
Interface: <value>
Penalty: <value>
Paused: <value>
MemberName: <value>
StateInterface: <value>
  • Queue : Queue name
  • Interface : Queue에 추가하고자 하는 멤버(Channel) 이름(tech/name).
  • Penalty : 초기 설정 Penalty 값
  • Paused : Paused 설정(true/false 혹은 1/0)
  • MemberName : Interface 별명.
  • StateInterface : 멤버 State 를 받아오는 device 혹은 Channel 정보.

QueueRemove

Queue 에서 해당 멤버(Channel)를 삭제한다.

Action: QueueRemove
ActionID: <value>
Queue: <value>
Interface: <value>
  • Queue : Queue name
  • Interface : 삭제하고자 하는 멤버(Channel) 이름(tech/name)

QueueReset

Queue 관련 통계를 초기화한다.

Action: QueueReset
ActionID: <value>
Queue: <value>
  • Queue : Queue name

QueueRule

queuerules.conf 에 설정된 Queue Rule 을 보여준다.

Action: QueueRule
ActionID: <value>
Rule: <value>
  • Rule : queuerules.conf 파일에 설정되어 있는 Rule 이름.

Redirect

채널을 다른곳으로 redirect(transfer)한다. 즉, 채널 넘겨주기.

Action: Redirect
ActionID: <value>
Channel: <value>
Exten: <value>
Context: <value>
Priority: <value>
ExtraChannel: <value>
ExtraExten: <value>
ExtraContext: <value>
ExtraPriority: <value>
  • Channel - 넘겨주고자 하는 채널.
  • Exten - 채널을 넘겨받게 되는 Extension.
  • Context - 넘겨받게 되는 Context.
  • Priority - 념겨받게 되는 채널의 Priority.
  • ExtraChannel -추가로 같이 넘겨주고자 하는 채널(optional).
  • ExtraExten - ExtraChannel 을 넘겨받게 되는 Extension(optional).
  • ExtraContext - ExtraChannel 을 넘겨받게 되는 Context(optional).
  • ExtraPriority - 넘겨받게 되는 ExtraChannel 의 Priority(optional).

SendText

Send text message to channel.

Sends A Text Message to a channel while in a call.

Action: SendText
ActionID: <value>
Channel: <value>
Message: <value>
  • ActionID
  • Channel : Channel to send message to.
  • Message : Message to send.

Asterisk 에는 메시지 수신을 위한 ReceiveText 가 없다. 하지만 AGI 를 이용하면 메시지 수신이 가능하다.

print STDERR "1. Testing 'sendtext'...";
print "SEND TEXT \"hello world\"\n";
my $result = <STDIN>;
&checkresult($result);

print STDERR "2. Receiving Text 'receivetext'...";
print "RECEIVE TEXT 3000\n";
my $result = <STDIN>;
&checkresult($result);

Example

Action: SendText
Channel: SIP/300-00000003
Message: Test message

Response: Success
Message: Success

See also

SIPnotify

Action: SIPnotify
ActionID: <value>
Channel: <value>
Variable: <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • Channel - Peer to receive the notify.
  • Variable - At least one variable pair must be specified. name=value

SIPpeers

현재 등록되어 있는 모든 SIP peer 를 보여준다.

Action: SIPpeers
ActionID: <value>
  • ActionID - ActionID for this transaction. Will be returned.

SIPpeerstatus

지정된 SIP peer 의 status 를 확인한다.

만약 SIP peer 를 지정하지 않을 경우, 모든 SIP peer 의 status 를 돌려준다.

정상적인 sip peer status 를 확인하기 위해서는 sip.conf 에서 해당 peer 의 설정에 qualify=yes 옵션을 설정해주어야 한다. 만약 qualify=yes 옵션을 설정하지 않을 경우, status 는 "Unmonitored" 라고 표시된다.

Action: SIPpeerstatus
ActionID: <value>
[Peer:] <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • Peer - The peer name you want to check.

Example

  • qualify 설정 전.
Action: SIPpeerstatus
Peer: SIP/300

Response: Success
EventList: start
Message: Peer status will follow

Event: PeerStatus
Privilege: System
ChannelType: SIP
Peer: SIP/300
PeerStatus: Unmonitored

Event: SIPpeerstatusComplete
EventList: Complete
ListItems: 1
  • qualify 설정 후.
Action: SIPpeerstatus
Peer: SIP/300

Response: Success
EventList: start
Message: Peer status will follow

Event: PeerStatus
Privilege: System
ChannelType: SIP
Peer: SIP/300
PeerStatus: Unknown

Event: SIPpeerstatusComplete
EventList: Complete
ListItems: 1

SIPqualifypeer

Qualify SIP peers.

Action: SIPqualifypeer
ActionID: <value>
Peer: <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • Peer - The peer name you want to qualify.

Example

Action: SIPqualifypeer
Peer: 300

Response: Success
Message: SIP peer found - will qualify

Event: SIPQualifyPeerDone
Privilege: call,all
Peer: 300

SIPshowpeer

Show one SIP peer with details on current status.

Action: SIPshowpeer
ActionID: <value>
Peer: <value>
  • ActionID - ActionID for this transaction. Will be returned.
  • Peer - The peer name you want to check.

Sipshowregistry

현재 등록된 SIP registry 목록을 보여준다.

Action: SIPshowregistry
ActionID: <value>

Example

Action: SIPshowregistry

Response: Success
EventList: start
Message: Registrations will follow

Event: RegistryEntry
Host: 192.168.100.10
Port: 5060
Username: test_register
Domain: 192.168.100.10
DomainPort: 5060
Refresh: 105
State: Request Sent
RegistrationTime: 1447519599

Event: RegistrationsComplete
EventList: Complete
ListItems: 1

Status

List channel status.

Will return the status information of each channel along with the value for the specified channel variables.

Action: Status
ActionID: <value>
[Channel:] <value>
Variables: <value>
AllVariables: <value>
  • ActionID
  • Channel : The name of the channel to query for status.
  • Variables : Comma(,) separated list of variable to include.
  • AllVariables : If set to "true", the Status event will include all channel variables for the requested channel(s).
true
false

Example

Action: Status
AllVariables: true
ActionID: a6519095-0c70-42ec-a013-ead0cae59401

Response: Success
ActionID: a6519095-0c70-42ec-a013-ead0cae59401
EventList: start
Message: Channel status will follow

Event: Status
Privilege: Call
Channel: SIP/300-0000000c
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 300
CallerIDName: <unknown>
ConnectedLineNum: <unknown>
ConnectedLineName: <unknown>
Language: en
AccountCode: 
Context: sample_park
Exten: s
Priority: 2
Uniqueid: 1481806671.27
Linkedid: 1481806671.27
Type: SIP
DNID: 4001
EffectiveConnectedLineNum: <unknown>
EffectiveConnectedLineName: <unknown>
TimeToHangup: 0
BridgeID: 299de6ea-1dc7-4144-9e46-d6513723333e
Linkedid: 1481806671.27
Application: Park
Data: 
Nativeformats: (ulaw)
Readformat: ulaw
Readtrans: 
Writeformat: gsm
Writetrans: (gsm@8000)->(slin@8000)->(ulaw@8000)
Callgroup: 0
Pickupgroup: 0
Seconds: 2
Variable: SIPCALLID=1945371327@pluto.pchero21.com
Variable: SIPDOMAIN=pluto.pchero21.com
Variable: SIPURI=sip:300@10.1.27.60:5060
ActionID: a6519095-0c70-42ec-a013-ead0cae59401

Event: StatusComplete
ActionID: a6519095-0c70-42ec-a013-ead0cae59401
EventList: Complete
ListItems: 1
Items: 1

See also

See also

References

<references />