`

Queues.conf

 
阅读更多

 

Queues.conf

Queues.conf

-[general]

;

; Global settings for call queues

;全局设置

; Persistent Members

;    Store each dynamic member in each queue in the astdb so that

;    when asterisk is restarted, each member will be automatically

;    read into their recorded queues. Default is 'yes'.

;把每一个QUEUE里面的成员都存到astDB里面,这样当asterisk重启的时候,每一个成员都能够自动的恢复到Queue当中,default='yes' 

persistentmembers = yes

; AutoFill Behavior

;    The old/current behavior of the queue has a serial type behavior 

;    in that the queue will make all waiting callers wait in the queue

;    even if there is more than one available member ready to take

;    calls until the head caller is connected with the member they 

;    were trying to get to. The next waiting caller in line then

;    becomes the head caller, and they are then connected with the

;    next available member and all available members and waiting callers

;    waits while this happens. The new behavior, enabled by setting

;    autofill=yes makes sure that when the waiting callers are connecting

;    with available members in a parallel fashion until there are

;    no more available members or no more waiting callers. This is

;    probably more along the lines of how a queue should work and 

;    in most cases, you will want to enable this behavior. If you 

;    do not specify or comment out this option, it will default to no

;    to keep backward compatibility with the old behavior.

;会记住每一个成员和用户当前的状态,自动去尝试连接坐席,并自动更新用户当前的状态.比如之前还有几个人在等待.下一个等待的用户将会变成第一个用户,然后他们会连接到第一个可用的分机。通过设置autofill = yes,当等待的用户连接到可用的分机,in a parallel fashion,直到没有更多可用的分机或者呼叫。

autofill = yes

;

; Monitor Type

;    By setting monitor-type = MixMonitor, when specifying monitor-format

;    to enable recording of queue member conversations, app_queue will

;    now use the new MixMonitor application instead of Monitor so 

;    the concept of "joining/mixing" the in/out files now goes away

;    when this is enabled. You can set the default type for all queues

;    here, and then also change monitor-type for individual queues within

;    queue by using the same configuration parameter within a queue 

;    configuration block. If you do not specify or comment out this option,

;    it will default to the old 'Monitor' behavior to keep backward

;    compatibility. 

;通过设置monitor-type = MixMonitor,当指定g monitor-format的时候,这样就会对分机的通话时行录音,app_queue会使用新的MixMonitor 应用来替代Monitor 这样就会对in/out的通话同时进行混合录音。你可以设置默认的type,当然你也可以使用相同的参数单独的为某一个queue设置monitor-type。如果你没有指定或者没有注释掉这个选项,他会默认的使用旧的 Monitor保证向前兼容。

monitor-type = MixMonitor

;

; Note that a timeout to fail out of a queue may be passed as part of

; an application call from extensions.conf:

; Queue(queuename|[options]|[optionalurl]|[announceoverride]|[timeout])

; example: Queue(dave|t|||45)

extenisons.conf通下这样的格式来指定一个queue的超时时间。

;[markq]

;

; A sample call queue

;

; Musicclass sets which music applies for this particular call queue.

; The only class which can override this one is if the MOH class is set

; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the

; dialplan.

;设置彩铃 .这个可以通过在dialplan中设置 Set(CHANNEL(musicclass)=whatever) 来覆盖当前设置

;musicclass = default

;

; An announcement may be specified which is played for the member as

; soon as they answer a call, typically to indicate to them which queue

; this call should be answered as, so that agents or members who are

; listening to more than one queue can differentiated how they should

; engage the customer

;当分机应答一个来电的时候,放这个音.指出是谁要应答这个号码.这样分机可以更多的区分一个来电的客户

;announce = queue-markq

;

; A strategy may be specified.  Valid strategies include:

;指定振铃策略,有效的策略包括:

; ringall - ring all available channels until one answers (default)

; roundrobin - take turns ringing each available interface 

; leastrecent - ring interface which was least recently called by this queue

; fewestcalls - ring the one with fewest completed calls from this queue

; random - ring random interface

; rrmemory - round robin with memory, remember where we left off last ring pass

;ringall - 在所以可用的Channels上振铃,直到有人应答,每一个分机响timeout的时候,共时长不超过Queue(test|||60) 这里设定的60

;roundrobin - 轮循振铃每一个可用的interface

;leastrecent queue当中最近接入电话的那个agent

;fewestcalls 给最少接入电话的那个agent振铃

;random 无规律的振铃

;rrmemory -  从内存读取记录循环振铃,记录上一次振铃的时候最后一个振铃的,然后这一次振铃从上一次的下一个开始振铃。

;strategy = ringall

;

; Second settings for service level (default 0)

; Used for service level statistics (calls answered within service level time

; frame)

用于服务等级统计(电话应答水平)

;servicelevel = 60

;

; A context may be specified, in which if the user types a SINGLE

; digit extension while they are in the queue, they will be taken out

; of the queue and sent to that extension in this context.

;指定context,当用户在此queue当中输入一个单一的数字extension,他们会退出这个queue然后到设置的这个context所对应按的那个extension当中去.

;context = qoutcon

;

; How long do we let the phone ring before we consider this a timeout...

;当分机振铃多少时间,我们确认己经超时  分机振铃时间

;timeout = 15

;

; How long do we wait before trying all the members again?

;又一次重试所有的分机之前,我们等待多久

;retry = 5

;

; Weight of queue - when compared to other queues, higher weights get 

; first shot at available channels when the same channel is included in 

; more than one queue.

;当和其他queue做比较时,weights高的queue比低的queue在使用通道时有更高的优先级

;weight=0

;

; After a successful call, how long to wait before sending a potentially

; free member another call (default is 0, or no delay)

;在坐席完成一个电话之后,等待多久才把下一个Call送这个坐席,默认是0,无延迟

;wrapuptime=15

;

; Autofill will follow queue strategy but push multiple calls through

; at same time until there are no more waiting callers or no more

; available members. The per-queue setting of autofill allows you

; to override the default setting on an individual queue level.

;autofill=yes

;

; Autopause will pause a queue member if they fail to answer a call

;如果一个Agent没有成功接听一个电话,那么这个Agent会自动的暂停

;autopause=yes

;

; Maximum number of people waiting in the queue (0 for unlimited)

;当前Queue最多有多少人在队列等待. 0不限制.   

;maxlen = 0

;

; If set to yes, just prior to the caller being bridged with a queue member 

; the MEMBERINTERFACE variable will be set with the interface name (eg. Agent/1234)

; of the queue member that was chosen and is now connected to be bridged with

; the caller

;如果设置成yes.当用户在连接这个queue之前,设置MEMBERINTERFACE变量会被设置成interface name.然后就会选择这个分机用于接听这个来电

;setinterfacevar=no

;

; How often to announce queue position and/or estimated 

; holdtime to caller (0=off)

;通知主叫Queue的位置和等待通话的时间的频率

;announce-frequency = 90 

;

;

; How often to make any periodic announcement (see periodic-announce)

;周期性的发布通知的频率

;periodic-announce-frequency=60

;

; Should we include estimated hold time in position announcements?

; Either yes, no, or only once.

; Hold time will be announced as the estimated time, 

; or "less than 2 minutes" when appropriate.

;是否在位置通知当中包括预估的等待时间

;announce-holdtime = yes|no|once

 

;

; What's the rounding time for the seconds?

; If this is non-zero, then we announce the seconds as well as the minutes

; rounded to this value.

;那个意思是 如果这个是0,就不至提示分钟,不提示秒

; announce-round-seconds = 10

;

; Use these sound files in making position/holdtime announcements.  The

; defaults are as listed below -- change only if you need to.

;

;        ("You are now first in line.")

;queue-youarenext = queue-youarenext                

;        ("There are")

;queue-thereare        = queue-thereare

;        ("calls waiting.")

;queue-callswaiting = queue-callswaiting

;        ("The current est. holdtime is")

;queue-holdtime = queue-holdtime

;        ("minutes.")

;queue-minutes = queue-minutes

;        ("seconds.")

;queue-seconds = queue-seconds

;        ("Thank you for your patience.")

;queue-thankyou = queue-thankyou

;       ("less than")

;queue-lessthan = queue-less-than

;       ("Hold time")

;queue-reporthold = queue-reporthold

;       ("All reps busy / wait for next")

;periodic-announce = queue-periodic-announce

;

; Calls may be recorded using Asterisk's monitor/MixMonitor resource

; This can be enabled from within the Queue application, starting recording

; when the call is actually picked up; thus, only successful calls are

; recorded, and you are not recording while people are listening to MOH.

; To enable monitoring, simply specify "monitor-format";  it will be disabled

; otherwise.

;可以使用asterisk's monitor/mixmonitor 对通话进行录音,这个选项可以开启queue当中的录音功能.当电话被接通之后开始录音,所以只有当电话应答之后才会录音,如果客户只是在听MOH是不会被录音的.只要开启了monitor-format ,就开启了录音,然后屏蔽了其他的.

; You can specify the monitor filename with by calling

你可以指定录音文件.在流程当中

;    Set(MONITOR_FILENAME=foo)

; Otherwise it will use MONITOR_FILENAME=${UNIQUEID}

;默认录音文件等于${UNIQUEID}

; Pick any one valid extension for monitor format recording. If you leave

; monitor-format commented out, it will not record calls.

;如果注释掉这个.就不会进行录音

; monitor-format = gsm|wav|wav49

;

; Monitor Type

;    By setting monitor-type = MixMonitor, when specifying monitor-format

;    to enable recording of queue member conversations, app_queue will

;    now use the new MixMonitor application instead of Monitor so

;    the concept of "joining/mixing" the in/out files now goes away

;    when this is enabled. If you do not specify or comment out this option,

;    it will default to the old 'Monitor' behavior to keep backward

;    compatibility.

;通过设置monitor-type = MixMonitor,当指定g monitor-format的时候,这样就会对分机的通话时行录音,app_queue会使用新的MixMonitor 应用来替代Monitor 这样就会对in/out的通话同时进行混合录音。你可以设置默认的type,当然你也可以使用相同的参数单独的为某一个queue设置monitor-type。如果你没有指定或者没有注释掉这个选项,他会默认的使用旧的 Monitor保证向前兼容。

; monitor-type = MixMonitor

;

; ----------------------- TYPE MIXMONITOR OPTIONS -----------------------------

;

;

; You can specify the options supplied to MixMonitor by calling

;   Set(MONITOR_OPTIONS=av(<x>)V(<x>)W(<x>))

; The 'b' option for MixMonitor (only save audio to the file while bridged) is 

; implied.

;你可以指定录音选项通过MONITOR_OPTIONS这个变量.b 为个选项是默认就有的

; You can specify a post recording command to be executed after the end of

; recording by calling

;   Set(MONITOR_EXEC=mv /var/spool/asterisk/monitor/^{MONITOR_FILENAME} /tmp/^{MONITOR_FILENAME})

;你可以指定一个传送录音的命令,当录音完成之后 MONITOR_EXEC

; The command specified within the contents of MONITOR_EXEC will be executed when

; the recording is over. Any strings matching ^{X} will be unescaped to ${X} and

; all variables will be evaluated just prior to recording being started.

;

; The contents of MONITOR_FILENAME will also be unescaped from ^{X} to ${X} and

; all variables will be evaluated just prior to recording being started.

;

;

; This setting controls whether callers can join a queue with no members. There

; are three choices:

;这个选项控制来电是否能进入一个没有分机的queue 有三种选择

; yes    - callers can join a queue with no members or only unavailable members

; no     - callers cannot join a queue with no members

; strict - callers cannot join a queue with no members or only unavailable

;          members

;yes 

来电可以进入一个没有分机或者没有可用分机的queue

No

来电不能加入一个没有分机的queue

Strict

来电不能加入一个没有分机或者只有不可达分机的queue

; joinempty = yes

;

;

; If you wish to remove callers from the queue when new callers cannot join,

; set this setting to one of the same choices for 'joinempty'

;如果你想要移出来电当一个queue当中不能够加入新的来电的时候.

这个选项的取值和joinempty一样

; leavewhenempty = yes

;

;

; If this is set to yes, the following manager events will be generated:

; AgentCalled, AgentDump, AgentConnect, AgentComplete; setting this to

; vars also sends all channel variables with the event.

; (may generate some extra manager events, but probably ones you want)

;如果这个设置成yes,相关的管理事件就会产生,AgentCalled, AgentDump, AgentConnect, AgentComplete.设置了这个也会发送所有的通道变量.如果你正好你想要这样.这个会产生额外的事件.

; eventwhencalled = yes|no|vars

;

; If this is set to yes, the following manager events will be generated:

; QueueMemberStatus

; (may generate a WHOLE LOT of extra manager events)

;如果设置成yes.会产生一个 QueueMemberStatus 事件.  可能会产生大量的事件

; eventmemberstatus = no

;

; If you wish to report the caller's hold time to the member before they arez

; connected to the caller, set this to yes.

;如果你想告诉分机来电的等待时间,把这个设置成yes

; reportholdtime = no

;

; If you want the queue to avoid sending calls to members whose devices are

; known to be 'in use' (via the channel driver supporting that device state)

; uncomment this option. (Note: only the SIP channel driver currently is able

; to report 'in use'.)

;来电时是否对一个正在使用的分机振铃(要通道允许,只有SIP通道允许这样).no:不振铃 yes:振铃

; ringinuse = no

;

; If you wish to have a delay before the member is connected to the caller (or

; before the member hears any announcement messages), set this to the number of

; seconds to delay.

;如果你想在分机接听来电之前(或者分机听到任何提示信息之前)延迟一段时间,可以设置memberdelay,分机延迟时间,单位:

; memberdelay = 0

;

; If timeoutrestart is set to yes, then the timeout for an agent to answer is

; reset if a BUSY or CONGESTION is received.  This can be useful if agents

; are able to cancel a call with reject or similar.

;如果timeoutrestart 设置成yes.当坐席接听超时,接收到一个busy或者是congestion.agents能够拒绝一个来电的时候很有用

; timeoutrestart = no

;

; Each member of this call queue is listed on a separate line in

; the form technology/dialstring.  "member" means a normal member of a

; queue.  An optional penalty may be specified after a comma, such that

; entries with higher penalties are considered last.  An optional member

; name may also be specified after a second comma, which is used in log

; messages as a "friendly name".  Multiple interfaces may share a single

; member name.

;每一个分机一行.格式 协议/通道分机号

'member':一个标准的分机.可以在逗号之后加一个可选的限制参数优先级

 such that entries with higher penalties are considered last. 在第二个逗号之后可以指定当前分机的名称.这个会在消息日志当然用做"friendly name"字段值.谁多接口会共享同一个分机名字.

; It is important to ensure that channel drivers used for members are loaded

; before app_queue.so itself or they may be marked invalid until reload. This

; can be accomplished by explicitly listing them in modules.conf before

; app_queue.so.  Additionally, if you use Local channels as queue members, you

; must also preload pbx_config.so (or pbx_ael.so, pbx_lua.so, or

; pbx_realtime.so, depending on how your dialplan is configured).

;要确保通道在load app_queue.so之前己经被load.并且是可用的.这个可以明确的列在modules.conf当中来完成.如果在queue当中使用local channles.你需要在

 pbx_config.so (or pbx_ael.so, pbx_lua.so, or pbx_realtime.so,配置好.这取决于你的dialplan如何配置

;member => Zap/1

;member => Zap/2,10

;member => Zap/3,10,Bob Johnson

;member => Agent/1001

;member => Agent/1002

 

;

; Note that using agent groups is probably not what you want.  Strategies do

; not propagate down to the Agent system so if you want round robin, least

; recent, etc, you should list all the agents in this file individually and not

; use agent groups.

;注意:可能使用agent组不是你想要的.因为振铃策略不会传到agent system.如果你想要环振...等等.你需要把agent列的配置文件中的指定位置.而不是使用agent groups

;member => Agent/@1                ; Any agent in group 1

;member => Agent/:1,1                ; Any agent in group 1, wait for first

                                ; available, but consider with penalty

 

 

Queue 简介

Asterisk call queues

Queues consist of 

· Incoming calls being placed in the queue 

· Members that answer the queue (extensions or users that login as agents) 

· A strategy for how to handle the queue and divide calls between members 

· Music played while waiting in the queue 

· Announcements for members and callers 

Queues组成:

进入到queue当中的来电

分机.用于接听来电

振铃策略

Music on hold

队列提示

Queues are defined in queues.conf or in dynamic realtime. The latter allow storing queue configuration in a database so that changes are immediately available for new callers without the need for an explicit reload. 

Queues 通过使用queues.conf 或者使用realtime技术定义/配置.现在允许把queue配置存到database当中.所以所做的改变马上可以有效而不需要重新加载

· Agents :指定在Queue当中的一个人.来接用户来电.Agent的状态用于标识是否准备好接听来电.Asterisk把一个来电转移到QUEUE当中.然后Queue会把来电转到一个可用的Agents

· Members. 是指可以用于应答来电的活动的Channels.有可能是一个Agent 或者是一个通道.比如:sip/8734

· Agents are the people (or person) that answer call(s) that have been placed into a specific Queue. An agent logs in indicating that s/he is now ready to take calls. Asterisk transfers an inbound call to a queue, which is then in turn transfered to an available agent. 

· Members are those channels that are active answering the Queue. It can be agents or normal channels, like "sip/snom23" 

New in Asterisk v1.2 

1.2新特性

如果一个Queue当中没有members.或者只有不可用的分机.

A queue is now considered empty not only if there are no members but also if none of the members are available (e.g. agents not logged on). To restore the original behavior, use "leavewhenempty=strict" or "joinwhenempty=strict" instead of "=yes" for those options. 

现在可以在queue exit context中使用多个数字的extensions.(尽管可能没有overlapping extensions,并且没有按键超时),这就意味着在queue_log EXITWITHKEY 事件当中会有一个key字段.有多于一个的值.

It is now possible to use multi-digit extensions in the exit context for a queue (although you should not have overlapping extensions, as there is no digit timeout). This means that the EXITWITHKEY event in queue_log can now contain a key field with more than a single character in it. 

 

Members 

Members

Members可以直接是一个通道名.也就是直接连接到asterisk的电话.你可以单独的定义每一个连接到asterisk的通道做为一个成员.然后接听来电.Agents agents.conf当中定义.Agentother phnoes 登录在指定的extensions.使用agentlogin 命令.

Members can be direct channels, i.e. phones connected to Asterisk. You can also define members as individuals that login from any connection to receive calls. 

Agents are defined in agents.conf. Agents login from other phones on special extensions that use the agentlogin application. 

振铃策略.详见queue.conf

Strategies 

Calls are distributed among the members handling a queue with one of several strategies, defined in queues.conf 

· ringall: ring all available channels until one answers (default) 

· roundrobin: take turns ringing each available interface (deprecated in 1.4, use rrmemory) 

· leastrecent: ring interface which was least recently called by this queue 

· fewestcalls: ring the one with fewest completed calls from this queue 

· random: ring random interface 

· rrmemory: round robin with memory, remember where we left off last ring pass 

 

你可以为用户定义一个menu,当在等待的时候.在这个menu当中,你可以使用一个数字的extensions.(在上面的文字中提到:1.2当中可以使用多个数字.有人验证吗?).queue 配置文件当中定义context 来开启此选项.

Menu for the user 

You can define a menu for the user, while waiting. For this menu, you can only use one-digit extensions (Please, read this : a couple lines above, it is mentioned that, starting from 1.2, multi-digit exit are allowed. Can someone correct this ?). Define the context for the menu in the configuration for the queue to enable this option. 

 

优先级

Penalties 

Queue成员可以定义一个优先级别.

Queue members can be defined as having a penalty - e.g. 

 member => SIP/200,1 

 member => SIP/201,2 

 member => SIP/202,3 

 member => SIP/203,2 

If the strategy is defined as 'ringall', then only those available members with the lowest priorities will ring. In the example above, if 200 is not busy, then only 200 will ring. If 200 is busy, then only 201 and 203 will ring. If 200, 201 and 203 are busy, then 202 will ring. 

如果振铃策略定义为"ringall".这样只会有最低优先级的可用的分机会振铃.在上面的例子当中,如果sip/200空闲.这样只有200会振铃,如果200.只有201203会振铃.如果这三个都忙.202才会振铃.

注意:如果200分机没有接起来.他不会自动转到201分机.他会继续给.200分机振铃.真到他接起来为止.如果当前extension返回busy或者unavailable 他只会走到下一extension.

Note: If extension 200 does not pick up it will not automatically go to extension 201. It will keep ringing 200 until they pick up. It will only go to the next extension if the current extension is either busy or unavailable. 

 

 

Cascading Queues 

Queue 层叠

你可以设置一连串的queue,queue堆叠起来.你可以得到一个类似于使用优先级的功能.在某些情况下.这样还能更好的处理问题(比如:)

You can set up a series of queues that cascade to each other. You can get a similar effect by using the penalty feature but this can be a better way to do things for some situations (e.g. if you want to overflow calls to your receptionist into your office for when your receptionist is busy). 

首先你需要设置Queue的超时时间.这个通过一个参数来传递.extensions.conf当中配置,:Queue(dave|t|||45)

The first thing you must do is have a timeout on our queue. This is done as a parameter of the Queue command used in extensions.conf (example: Queue(dave|t|||45)). 

你可以连续的配置queue在你的dialplan

You can then set up a number of queues and simply have your dialplan call each queue in succession. 

 

example: 

 exten => 1589,1,Answer 

 exten => 1589,2,Ringing 

 exten => 1589,3,Wait(2) 

 exten => 1589,4,Queue(testq|t|||45) 

 exten => 1589,5,Queue(testq2|t|||45) 

 exten => 1589,6,Hangup 

 

新特性

New features 

QueueAsterisk加入了一些新的选项 penaltywrapuptimepriority. 

Queue() has options for penaltywrapuptime and priority have been added to the Asterisk queue system. Priority works like this, according to the contributor: 

 

The new addition provides the ability to operate queues as priority queues in addition to the current FIFO mode. This gives the ability to queue a call not at the end of the queue but anywhere in the queue, according to the call's priority. 

 

Now you can have just one queue servicing all the calls (more important and less important) with the right order. The priority of a call entering a queue is determined by a special channel variable, QUEUE_PRIO. Higher values of this variable mean higher priority. By not setting this variable, all calls have the same priority, 0, by default (FIFO). E.g. 

电话进入一个queue的重要级别

 ; Important clients 

 exten => 111,1,Playback(welcome) 

 exten => 111,2,SetVar(QUEUE_PRIO=10) 

 exten => 111,3,Queue(support) 

 

 ; Less important clients 

 exten => 112,1,Playback(welcome) 

 exten => 112,2,SetVar(QUEUE_PRIO=5) 

 exten => 112,3,Queue(support) 

 

Applications 

· Asterisk cmd queue: Queue application, used in extensions.conf 

· Asterisk cmd AddQueueMember: Dynamically add queue member 

· Asterisk cmd RemoveQueueMember: Dynamically remove queue member 

· Asterisk cmd PauseQueueMember: Pauses queue members (agent) 

· Asterisk cmd UnpauseQueueMember: Unpauses queue members (agent) 

· Asterisk cmd AgentLogin: Agent login to call queue 

· Asterisk cmd AgentCallbackLogin: Another Login 

CLI commands 

· asterisk cli command show agents: Show agents 

· show queues: List all queues 

· show queue : Show data on a specific queue 

 

 

Configuration 

· Asterisk config agents.conf: Configuration of call agents 

· Asterisk config queues.conf: Configuration of call queues 

Tutorials 

· Asterisk Queues Tutorial (from Orderly Software). 

236353 views strong. 

 

 

See also 

· Asterisk call parking 

· Asterisk RealTime Queue 

· Asterisk agents: More information on call agents 

· Asterisk Queue Callback - Let your callers hangup while waiting for an agent without losing their place in line 

· Queue-Tip - Opensource (GPL) Asterisk Queue Monitoring and Reporting suite using Adhearsion and Ruby on Rails. 

· DialApplet Agents desktop Windows, Linux & Mac 

· OrderlyQ - Extension to Asterisk Queues that lets callers hang up, then call back without losing their place. 

· OrderlyStats - FREE Dedicated Real Time Call Centre Management and Statistics Package. 

· Statistics that would be useful to add to this application: http://lists.digium.com/pipermail/asterisk-users/2003-July/014965.html 

· QueueMetrics is a software package to analyze the queue_log file and extract a wealth of aggregate statistics on queue activities. The software is available for download and public trial. 

· ASTELCENTER PHP Web solution which allows you to manage and supervise your ASTERISK PBX; generating reports and information in real time so clear and concrete; allows you to generate statistics and graphs: incoming calls, queue, session, outgoing calls, billing, ISP cost, and more; in order to improve the quality of services to their customers. 

· Parse the queue log files and push them to a PostgreSQL database http://www.ekn.com/Logque.tar.gz

· IPSwitchBoard BETA - Queue Log analyzer. 

· Asterisk Queue Information 

 

源文档 <http://www.voip-info.org/wiki-Asterisk+call+queues

 

 

Queue CMD

Asterisk cmd Queue

Synopsis 

Queue a call for a call queue 

 

Description 

Asterisk 1.6.0: 

 Queue(queuename[,options][,URL][,announceoverride][,timeout][,AGI][,macro][,gosub][,rule]) 

 

Asterisk 1.4: 

 Queue(queuename[|options][|URL][|announceoverride][|timeout][|AGI]) 

 

Asterisk 1.0 through 1.2: 

 Queue(queuename[|options][|URL][|announceoverride][|timeout]) 

 

Queues an incoming call in a particular call queue as defined in queues.conf or dynamic realtime

参数选项:

The option string may contain zero or more of the following characters: 

· d — data-quality (modem) call (minimum delay). 

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

· r — ring instead of playing MOH. 

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

· c — continue in the dialplan if the callee hangs up (Asterisk 1.6.0 and above). 

· i — ignore call forward requests from queue members and do nothing when they are requested (Asterisk 1.6.0 and above). 

· k — Allow the called party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf (Asterisk 1.6.0 and above). 

· K — Allow the calling party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf (Asterisk 1.6.0 and above). 

· x — allow the called user to write the conversation to disk via MixMonitor (Asterisk 1.6.0 and above). 

· X — allow the calling user to write the conversation to disk via MixMonitor (Asterisk 1.6.0 and above). 

In addition to transferring the call, a call may be parked and then picked up by another user. 

 

'URL' allows you to specify a URL that will be sent to the called party if the channel supports it. You can also use an external application like QueueMetrics or Asteria Solutions Agent Client to launch the URL if your terminal does not support it. 

· In Asterisk 1.4, the optional AGI parameter will setup an AGI script to be executed on the calling party's channel once they are connected to a queue member. 

'announceoverride' allows you to override the announcement specified in queues.conf using 'announce = ...' or add one to it in the first place. 

 

'timeout' sets the time in seconds that a call will wait in the queue before it is routed to the next priority in the dialplan. It defaults to 300 seconds (5 minutes). 

 

The timeout will cause the queue to fail out after a specified number of seconds, checked between each queues.conf 'timeout' and 'retry' cycle. 

This application sets the following channel variable upon completion: 

     QUEUESTATUS   The status of the call as a text string, one of TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL 

 

 

Note: This doesn't do what you think it should do (in 1.2.4 anyway). Once a call is inside a queue, it is only checked to see if it is timed out every so often (depending on the value of 'timeout=' for that queue in queues.conf). This means that if queues.conf says 'timeout=10' and you call the queue with 'Queue(queuename,,,,5)', it will be ten seconds before the call times out. If you call the Queue with 'Queue(queuename,,,,11)', it'll be 20 seconds. I.E. the value of 'timeout' supplied to the command DOES NOT override the value of 'timeout=' in queues.conf. Don't think about changing the value of 'timeout=' in queues.conf to, say, 1 or the calls will get offered to the members for only one second at a time. 

 

This article attempts to explain this behavior. Note that this article states that the value of the 'timeout' parameter is absolute, which is not correct.

 

New in Asterisk 1.4: The MEMBERINTERFACE channel variable holds information about which queue member received the call. Variable is not available until you set 'setinterfacevar=' to 'yes' in queues.conf. 

Note: This parameter must be wrote INSIDE of each queue, not in the general context because it won't work. 

 

 

 

 

Return codes 

This application returns -1 if the originating channel hangs up, or if the call is bridged and either of the parties in the bridge terminate the call. Returns 0 if the queue is full, nonexistent, or has no members. 

 

This method only works when there are no members defined in queues.conf, and instead only added with AddQueueMember(). However with "Member => Agent/101" in queues.conf the Queue command always returns as if there were a member. 

Update: 'leavewhenempty = yes' in queues.conf fixes this (in CVS since Sep 28, 2004) 

 

Notes 

· If 'persistentmembers = yes' is used in queues.conf, dynamically added agents are saved in the Asterisk Berkeley database, and are preserved across restart. If not, dynamically added agents are lost upon Asterisk restart. 

· Use the 'Local' channel construct to point to an appropriate dial-out extension in the dialplan if you'd like to add remote agents using AgentCallbackLogin() 

· Transfers of calls that are answered out of a queue must be done using Asterisk '#' transfers (enabled with the 't' option above). SIP transfers result in the Agent remaining affiliated with the call until its eventual termination, preventing that agent from being offered another call. 

· The application sets the following channel variable upon completion: QUEUESTATUS. The status of the call as a text string, one of TIMEOUT, FULL, JOINEMPTY, LEAVEEMPTY, JOINUNAVAIL, or LEAVEUNAVAIL. 

· A member assigned to a queue ("member => Agent/1234" for example) can be a phone (e.g. "member => SIP/phone1"). 

· Check the timeout settings of your extensions involved in the queue. 

· Snom Phones have in their web interface an "invisible" timeout of 60 seconds. The Playback command, even if an empty file is played, seems to help in avoiding a call being dropped after 60 seconds. 

Examples 

Example 1: Basics 

    exten => s,1,Answer  

    exten => s,2,SetMusicOnHold(default) 

    exten => s,3,DigitTimeout,5 

    exten => s,4,ResponseTimeout,10 

    exten => s,5,Background(welcome) 

    exten => s,6,Queue(tech-queue) 

 

The s,1,Answer is important in order not to have ringing in the background of your hold music. 

 

Example 2: Use BLF LED to show queue login status of an agent 

Look at this post (in German), requires bristuff'ed Asterisk 1.2 or 1.4 

 

Example 3 

Here is a working queue-solution as example: 

 

A call comes in over a sip channel, is routed to the extension which handles the example-queue (here extension 129) in the context example-queue in extensions.conf. The call, if not answered by an agent, should remain for 300 seconds in the queue, before it is routed to the next priority which transfers the call to voicemail. 

The called and the calling user are able to transfer the call (tT as options of the queue command in extensions.conf). 

 

Signaling the call to logged on agents should work like this: 

 

After the first priority "Playback(some_announce)" has finished, all agents should be signalled (ringall in queues.conf) for at least 15 seconds (timeout in queues.conf). The caller should hear music on hold in the meanwhile. If the call wasn't answered by an agent, there should be some time before the call is signalled again (retry in queues.conf). The actual queue position is announced to the caller every 30 seconds (announce-frequency and announce-holdtime in queues.conf). 

 

extensions.conf: 

 

[queue] 

exten => 129,1,Playback(some_announce) ; Important, see notes 

exten => 129,2,Queue(example_queue|tT|||300) ;dont set n option until really needed 

exten => 129,3,Playback(some_announce_after_leaving_queue) 

exten => 129,4,Voicemail(s1234) 

 

queues.conf: 

 

[example_queue] 

music = default 

strategy = ringall 

context = queue-out ; Here we go when the caller presses a single digit, while in the queue 

timeout = 15 

wrapuptime=10 

announce-frequency = 30 

announce-holdtime = yes 

joinempty = yes 

member => Agent/1234 

member => Agent/1235 

 

agents.conf: 

 

[agents] 

ackcall=no ; Agent does NOT have to press # to answer the call 

musiconhold => default 

agent => 1234,0000,Agent1_Name 

agent => 1235,0000,Agent2_Name 

 

 

See also 

· Function QUEUE_MEMBER_COUNT: Count number of members answering a queue 

· Function QUEUE_MEMBER_LIST: Returns a comma-separated list of members associated with the specified queue 

· Function QUEUE_WAITING_COUNT: Count number of calls currently waiting in a queue 

· Asterisk call queues 

· Asterisk config queues.conf 

· Applications used: Answer | SetMusicOnHold | DigitTimeout | ResponseTimeout | Background 

· Asterisk RealTime Queue, to store queues in a database with automatic update of changes (no need for explicit reload). 

· Asterisk agents 

· Asterisk Queue Callback - Dialplan and Perl script to allow your callers to hang up without losing their place in the queue. 

· Function DIALGROUP: New in 1.6: Poor man's calling queue 

· Queue-Tip - Opensource (GPL) Asterisk Queue Monitoring and Reporting suite using Adhearsion and Ruby on Rails. 

· OrderlyQ - Extension to Asterisk Queues that lets callers hang up, then call back without losing their place. 

· OrderlyStats - FREE Dedicated Real Time Call Centre Management and Statistics Package. 

· app_icd: Look at ICD if you desire a more customizable queue and call center solution 

· IPSwitchBoard BETA - Queue Log Analyzer 

· QueueMetrics is a software package to analyze the queue_log file and extract a wealth of aggregate statistics on queue activities. The software is available for download and public trial. 

· Asteriskguru Queue Statistics - The Asteriskguru queue statistics, is a PHP based program, which gives anyone who uses queues or CDRs overview in Asterisk a deep insight in the quality of the service which is delivered to their customers. 

· AstQueueIcon: Alternative free queue solution utilitzing the call parking feature instead of the queue application. As the queue app stays out of the media path, features like call forwarding will not be denied for the agents. 

· Asterisk Queues Tutorial (from Orderly Software). 

 

源文档 <http://www.voip-info.org/wiki/view/Asterisk+cmd+Queue

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics