Asterisk dialplan applications: Difference between revisions
(→AMD) |
No edit summary |
||
Line 144: | Line 144: | ||
* maximumWordLength - Is the maximum duration of a word to accept. If exceeded set as MACHINE | * maximumWordLength - Is the maximum duration of a word to accept. If exceeded set as MACHINE | ||
== Park == | |||
Call 을 Parking 한다. | |||
<pre> | |||
Park([parking_lot_name][,options]) | |||
</pre> | |||
* Parking_lot_name - Call 이 parking 되는 parking lot 을 지정한다. parking lot 은 다음의 순서에 의해 지정된다. | |||
: parking_lot_name 에 지정된 값 | |||
: ${PARKINGLOT} variable | |||
: 'CHANNEL(parkinglot)' function(channel driver 에 의해 미리 지정되어 있을 수도 있다). | |||
: Default parking lot. | |||
* options - parked 되는 콜에 대해 여러가지 옵션을 설정한다. | |||
: r: Parking 되는 콜에 MOH(Music on hold) 대신 Ringing 을 보낸다. | |||
: R: Parking 되는 장소(번호)를 Random 하게 지정한다. | |||
: s: Parking 되는 장소(번호)에 silence announcement 를 보낸다 | |||
: c([[context,]extension,]priority): 만약 Parking 된 콜이 timeout 된 경우, 여기에 지정된 dialplan 으로 옮겨진다. | |||
: t(duration): 지정된 parking lot 에 설정된 timeout 대신, 여기에 설정된 값을 timeout 으로 사용한다. | |||
== See also == | == See also == |
Revision as of 08:20, 21 October 2016
Overview
Asterisk dialplan application 내용 정리
AddQueueMember, RemoveQueueMember
Queue 에 멤버를 추가/삭제 한다. 상담원의 Login/Logout 으로 이해하면 된다.
[QueueMemberFunctions] exten => *54,1,Verbose(2,Logging In Queue Member) smae => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)}) same => n,AddQueueMember(support,${MemberChannel}) same => n,Verbose(1,${AQMSTATUS}) ; ADDED, MEMBERALREADY, NOSUCHQUEUE smae => n,Playback(agent-loginok) same => n,Hangup() exten => *56,1,Verbose(2,Logging Out Queue Member) same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)}) same => n,RemoveQueueMember(support,${MemberChannel}) same => n,Verbose(1,${RQMSTATUS}) ; ADDED, MEMBERALREADY, NOSUCHQUEUE same => n,Playback(agent-loggedoff) same => n,Hangup()
PauseQueueMember, UnpauseQueueMember
해당 멤버를 Pause/Unpause 시킨다. 상담원의 자리비움, 대기중 으로 이해하면 된다. Queue 에서 멤버를 추가/삭제 하지 않고도 가용/비가용 여부를 설정할 수 있다.
exten => *72,1,Verbose(2,Pause Queue Member) same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)}) same => n,PauseQueueMember(support,${MemberChannel}) same => n,Verbose(1,${PQMSTATUS}); PAUSED, NOTFOUND same => n,Playback(dictate/paused) same => n,Hangup() exten => *87,1,Verbose(2,Unpause Queue Member) same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)}) same => n,UnpauseQueueMember(support,${MemberChannel}) same => n,Verbose(1,${UPQMSTATUS}); UNPAUSED, NOTFOUND same => n,Playback(agent-loginok) same => n,Hangup()
Queue
In addition to transferring the call, a call may be parked and then picked up by another user.
This application will return to the dialplan if the queue does not exist, or any of the join options cause the caller to not enter the queue.
This application does not automatically answer and should be preceeded by an application such as Answer(), Progress(), or Ringing().
This application sets the following channel variable upon completion:
QUEUESTATUS - The status of the call as a text string. TIMEOUT FULL JOINEMPTY LEAVEEMPTY JOINUNAVAIL LEAVEUNAVAIL CONTINUE
Syntax
Queue(queuename,[options,[URL,[announceoverride,[timeout,[AGI,[macro,[gosub,[rule,[position]]]]]]]]])
- queuename
- options
- C - Mark all calls as "answered elsewhere" when cancelled.
- c - Continue in the dialplan if the callee hangs up.
- d - data-quality (modem) call (minimum delay).
- F - When the caller hangs up, transfer the called member to the specified destination and start execution at that location.
- context
- exten
- priority
- F - When the caller hangs up, transfer the called member to the next priority of the current extension and start execution at that location.
- h - Allow callee to hang up by pressing *.
- H - Allow caller to hang up by pressing *.
- n - No retries on the timeout; will exit this application and go to the next step.
- i - Ignore call forward requests from queue members and do nothing when they are requested.
- I - Asterisk will ignore any connected line update requests or any redirecting party update requests it may receive on this dial attempt.
- r - Ring instead of playing MOH. Periodic Announcements are still made, if applicable.
- R - Ring instead of playing MOH when a member channel is actually ringing.
- t - Allow the called user to transfer the calling user.
- T - Allow the calling user to transfer the call.
- w - Allow the called user to write the conversation to disk via Monitor.
- W - Allow the calling user to write the conversation to disk via Monitor.
- k - Allow the called party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf.
- K - Allow the calling party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf.
- x - Allow the called user to write the conversation to disk via MixMonitor.
- X - Allow the calling user to write the conversation to disk via MixMonitor.
- URL - URL will be sent to the called party if the channel supports it.
- announceoverride
- timeout - Will cause the queue to fail out after a specified number of seconds, checked between each queues.conf timeout and retry cycle.
- AGI - Will setup an AGI script to be executed on the calling party's channel once they are connected to a queue member.
- macro - Will run a macro on the called party's channel (the queue member) once the parties are connected.
- gosub - Will run a gosub on the called party's channel (the queue member) once the parties are connected.
- rule - Will cause the queue's defaultrule to be overridden by the rule specified.
- position - Attempt to enter the caller into the queue at the numerical position specified. 1 would attempt to enter the caller at the head of the queue, and 3 would attempt to place the caller third in the queue.
NoOp
Do Nothing (No Operation).
This application does nothing. However, it is useful for debugging purposes.
This method can be used to see the evaluations of variables or functions without having any effect.
Syntax
NoOp([text])
- text - Any text provided can be viewed at the Asterisk CLI.
AMD
This application attempts to detect answering machines at the beginning of outbound calls. Simply call this application after the call has been answered (outbound only, of course).
When loaded, AMD reads amd.conf and uses the parameters specified as default values. Those default values get overwritten when the calling AMD with parameters.
This application sets the following channel variables:
AMDSTATUS - This is the status of the answering machine detection MACHINE HUMAN NOTSURE HANGUP AMDCAUSE - Indicates the cause that led to the conclusion TOOLONG - Total Time. INITIALSILENCE - Silence Duration - Initial Silence. HUMAN - Silence Duration - afterGreetingSilence. LONGGREETING - Voice Duration - Greeting. MAXWORDLENGTH - Word Count - maximum number of words.
Syntax
AMD([initialSilence,[greeting,[afterGreetingSilence,[totalAnalysis Time,[miniumWordLength,[betweenWordSilence,[maximumNumberOfWords,[silenceThreshold,[maximumWordLength]]]]]]]]])
- initialSilence - Is maximum initial silence duration before greeting. If this is exceeded set as MACHINE
- greeting - is the maximum length of a greeting. If this is exceeded set as MACHINE
- afterGreetingSilence - Is the silence after detecting a greeting. If this is exceeded set as HUMAN
- totalAnalysis Time - Is the maximum time allowed for the algorithm to decide HUMAN or MACHINE
- miniumWordLength - Is the minimum duration of Voice considered to be a word
- betweenWordSilence - Is the minimum duration of silence after a word to consider the audio that follows to be a new word
- maximumNumberOfWords - Is the maximum number of words in a greeting. If this is exceeded set as MACHINE
- silenceThreshold - How long do we consider silence
- maximumWordLength - Is the maximum duration of a word to accept. If exceeded set as MACHINE
Park
Call 을 Parking 한다.
Park([parking_lot_name][,options])
- Parking_lot_name - Call 이 parking 되는 parking lot 을 지정한다. parking lot 은 다음의 순서에 의해 지정된다.
- parking_lot_name 에 지정된 값
- ${PARKINGLOT} variable
- 'CHANNEL(parkinglot)' function(channel driver 에 의해 미리 지정되어 있을 수도 있다).
- Default parking lot.
- options - parked 되는 콜에 대해 여러가지 옵션을 설정한다.
- r: Parking 되는 콜에 MOH(Music on hold) 대신 Ringing 을 보낸다.
- R: Parking 되는 장소(번호)를 Random 하게 지정한다.
- s: Parking 되는 장소(번호)에 silence announcement 를 보낸다
- c([[context,]extension,]priority): 만약 Parking 된 콜이 timeout 된 경우, 여기에 지정된 dialplan 으로 옮겨진다.
- t(duration): 지정된 parking lot 에 설정된 timeout 대신, 여기에 설정된 값을 timeout 으로 사용한다.
See also
- https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Dialplan+Applications - Asterisk 13 Dialplan Applications