Asterisk queue 和 ring group 功能的实现及测试

 

APBX ——Queue测试

测试Dial 'Queue number + '*'' to log in or 'Queue number + '**'' to log out the queue. For example, if the queue number is '680', then agent can dial '680*' to log in or '680**' to log out.

配置文件

[1002]

;BOLSIP Phone

context=queues

type=friend

username=1002

Callerid="1002" <1002>

secret=1002

host=dynamic

dtmfmode=RFC2833

disallow=all

allow=alaw

 

[1003]

;3CX Phone

context=queues

type=friend

Callerid="1003" <1003>

username=1003

secret=1003

host=dynamic

dtmfmode=RFC2833

disallow=all

allow=alaw

 

[1004]

;XLite

context=queues

type=friend

Callerid="1004" <1004>

username=1004

secret=1004

host=dynamic

dtmfmode=RFC2833

disallow=all

allow=alaw

 

[1005]

;ExpressTalk

context=queues

type=friend

Callerid="1005" <1005>

username=1005

secret=1005

host=dynamic

dtmfmode=RFC2833

disallow=all

allow=alaw

[1006]

;ATCOM Phone

context=queues

type=friend

Callerid="1006" <1006>

username=1006

secret=1006

host=dynamic

dtmfmode=RFC2833

disallow=all

allow=alaw

 

queue.conf

[queue-680]

;strategy = ringall

;strategy = leastrecent

;strategy = fewestcalls

;strategy =  random

strategy =  rrmemory

announce-position = yes

announce-holdtime = yes

queue-holdtime = queue-holdtime

announce-frequency = 30

;periodic-announce = record/default

;periodic-announce = queue-periodic-announce

periodic-announce = queue-thankyou

;periodic-announce = queue-markq

periodic-announce-frequency = 25

musicclass = default

;leavewhenempty = strict

leavewhenempty = no

joinempty = yes

retry = 30

wrapuptime = 5

;announce = record/default

;announce = queue-markq

;announce = queue-periodic-announce

announce = queue-thankyou

maxlen = 100

context = queue-680

timeout = 30

;member => SIP/1003

 

Extertion.conf 配置文件

;param1-queue name, param2-queue pass, param3-exten name

[macro-queue-login]

exten = s,1,Wait(1)

exten = s,n,Authenticate(${ARG2})

exten = s,n,AddQueueMember(${ARG1},,)

exten = s,n,Playback(agent-loginok)

exten = s,n,Playback(vm-goodbye)

exten = s,n,Hangup()

;param1-queue name

[macro-queue-logout]

exten = s,1,Wait(1)

exten = s,n,RemoveQueueMember(${ARG1})

exten = s,n,Playback(agent-loggedoff)

exten = s,n,Playback(vm-goodbye)

exten = s,n,Hangup()

[queue-680]

exten = 680,1,Answer()

exten = 680,n,NoOp(no set join announce)

exten = 680,n,Queue(queue-680,tT,,,1800)

exten = 680,n,Hangup

exten = 680*,1,Macro(queue-login,queue-680,123456)

exten = 680**,1,Macro(queue-logout,queue-680)

exten = #,1,Hangup

[queues]

include = queue-680

 

测试电话:

测试电话总共五部:

其中五部软电话分别是:ExpressTalk、XLite、BOLSIP Phone、3CX Phone

一部公司电话:ATCOM Phone

测试步骤

1.       配置电话用sip show peers 查看电话

 

2.       用电话1002、1003拨打680*、按照语音提示输入密码123456

3.       用queue show 命令查看queue队列中得坐席电话

4.       用电话拨打680**退出队列

5.       用queue show命令查看queue队列中得坐席电话

测试结果

拨打680*电话提示输入密码按#号。如果密码正确电话进入队列

拨打680**电话提示log out 队列

登陆密码测试

在上一步测试中已经测试

Queue Agent Timeout测试

含义及控制参数:

Queue Agent Timeout 是一个以秒为单位的时间,如果在设定的时间段内没有Agent接电话,queue就会停止拨号。系统提示 Nobody picked up in {time} ms ,其中time是我们设置的函数

这个参数是由queues.conf中得timeout控制的。

实验步骤:

配置电话

配置1002,1003为Agent电话

设置参数

设置queues.conf中timeout=10

拨打电话

用1006拨打680.

观察结果

十秒中之后Agent如果没有接系统提示 Nobody picked up in 10000 ms

 

 

 

 

 

Queue Max Wait Time

含义及控制参数:

含义:The maximum number of seconds a caller can wait in a queue before being pulled out. (0 for unlimited). checked between each queues.conf timeout and retrycycle.

控制参数:由queu()application中得timeout控制

实验步骤:

配置电话

配置1002,1003为Agent电话

设置参数

设置queues.conf中timeout=30,retry=30

Extension.conf 中 queue()timeout 参数设置为18

拨打电话

用1006拨打680.

观察结果

十八秒中之后Agent如果没有接系统提示

Nobody picked up in 18000 ms

-- Stopped music on hold on SIP/1006-0000001
 -- Executing [680@queues:4] Hangup("SIP/1006-00000017", "") in new stack

测试Queue Ring Strategy

含义及控制参数:

含义:This option sets the Ringing Strategy for this Queue. The options are:

RingAll: Ring All available Agents simultaneously until one answers.

LeastRecent: Ring the Agent which was least recently called.

FewestCalls: Ring the Agent with the fewest completed calls.

Random: Ring a Random Agent.

RRmemory: Round Robin with Memory, Remembers where it left off in the last ring pass".

控制参数:

         由Queues.conf中的stragegy控制

 

实验步骤:

配置电话

配置1002,1003为Agent电话

设置参数

Queues.conf 中stragegy = ringall 

拨打电话

用1006拨打680.

观察结果

1002,1003同时振铃

设置参数

Queues.conf 中stragegy = LeastRecent

拨打电话

用1006拨打680.

观察结果

1002 last call time

1003 last call time

Ring

60

70

1003

91

80

1002

100

80

1002

6

2

1002

结果是最早那个没有接电话Agent ring

设置参数

Queues.conf 中stragegy = FewestCalls

拨打电话

用1006拨打680.

观察结果

1002 calls

1003 calls

Ring

1

2

1002

2

2

1003

2

3

1002

3

3

1003

结果是接电话最少的哪一个Agent电话振铃

设置参数

Queues.conf 中stragegy = Random

拨打电话

用1006拨打680.

观察结果

拨打顺序

Ring

1

1003

2

1003

3

1002

4

1003

5

1003

6

1002

7

1003

8

1002

9

1003

10

1003

11

1002

12

1003

13

1003

14

1002

15

1003

16

1003

17

1003

18

1003

19

1003

20

1002

 

结果是没有规律的响铃

设置参数

Queues.conf 中stragegy = Random

拨打电话

用1006拨打680.

观察结果

振铃顺序 1004-1002-1003

上次挂机

Ring

1003

1004

1002

1003

1003

1004

结果是系统记住了上次挂机时响铃的电话,下次按照顺序接着上次挂机的下一个开始响铃

 

Agents

This selection shows all users. Selecting a user here makes them a agent of the current queue.

实验步骤:

配置参数

Queues.conf

加入 member=>sip/1005

观察结果

Caller Position Announcements -Announce Position

含义及控制参数:

含义:报告给拨打者当前拨打者在队列中得位置

控制参数:announce-position = yes  打开announce-position = no  关闭

参数 Announce-frequency 控制报告频率。

实验步骤:

设置参数

设置announce-position = yes

Announce-frequency = 15

拨打电话

用1005拨打680 不接

用1006拨打680

实验结果

当时间超过一分钟后,每十五秒钟报告一次拨打者大概要等待的时间

 

 

 

-Announce Hold Time

含义及控制参数:

含义:在报告给拨打者当前拨打者在队列中估计要等待时间,当等待时间小于1分钟时不报告,当是最后一个等待者时也不报告。

控制参数:announce-holdtime = yes  打开announce-holdtime = no  关闭

参数 Announce-frequency 控制报告频率。

 

实验步骤:

设置参数

设置announce-holdtime = yes

Announce-frequency = 15

拨打电话

用1005拨打680 不接

用1006拨打680

实验结果

每十五秒钟报告一次拨打者在队列中的位置

Periodic Announcements

含义及控制参数:

含义:周期性的给等待者一个提示

控制参数:periodic-announce =提示语音文件

参数 periodic - announce-frequency 控制提示频率。

 

实验步骤:

设置参数

设置periodic-announce =提示语音文件

periodic - announce-frequency =  45

拨打电话

用1005拨打680 不接

用1006拨打680

实验结果

每45秒钟给等待者一个提示

 

Events

If a caller presses the key while waiting in the queue, this setting selects which action should process the key press.

-Key

取值范围:{None,0,1,2,3,4,5,6,7,8,9,*,#}

 

-Action

取值范围:{EndCall,Extension,Ring Group,Voice Menu}, 缺省取值EndCall

 

-Destination

取决于Action取值

实验步骤:

修改dialplan

在extension.conf中添加

Exten = > # ,1, Hungup

拨打电话

用1006拨打680

实验结果

在等待的过程中按下#键,话机进入Hungup

 

Failover-Destination

Defines the failover action. A failover occurs after the user reach the Queue max wait time.

-Action

取值范围:{EndCall,Extension,Ring Group,Voice Menu}, 缺省取值EndCall

 

-Destination

取决于Action取值

 

实验步骤:

修改dialplan

在extension.conf中添加

Exten = > 680,n,Goto(queues,1002,1)

Exten = >1002,1,Dial(SIP/1002);

拨打电话

用1006拨打680

实验结果

当打电话者等待超时时电话转为拨打1002,1002开始振铃

 

Music On Hold

Select the 'Music on Hold' Class for this Queue.

实验步骤:

指定music on hold

在queues.conf 中 musicclass = default

其中default 在 musiconhold.conf中定义

拨打电话

用1006拨打680

实验结果

在等待的过程中播放设置的 music

 

Leave When Empty

含义及控制参数:

含义:如果没有Agent时电话是否被强制退出等待队列

控制参数:leavewhenempty = strict  强制离开 leavewhenempty = no  不强制离开

实验步骤:

设置参数

Leavewhenempty=strict

 关掉所有Agent

拨打电话

用1006拨打680

实验结果

1006被强制退出队列。

设置参数

Leavewhenempty=no

 关掉所有Agent

拨打电话

用1006拨打680

实验结果

1006未被强制退出队列。

Join Empty

含义:当没有Agent时,拨打者是否被加入队列

参数:joinempty = yes 加入队列

joinempty = no 不加入队列

实验步骤:

设置参数

Joinempty = yes

 关掉所有Agent

拨打电话

用1006拨打680

实验结果

1006加入队列

设置参数

Joinempty = no

 关掉所有Agent

拨打电话

用1006拨打680

实验结果

1006未加入队列

 

Agent Announcement

含义:Agent 接起电话时的提示音

参数:announce = 提示音文件

实验步骤:

设置参数

Announce = test/test

拨打电话

用1006拨打680

实验结果

当Agent接起电话时会提示设置的语音

 

Join Announcement

含义:当呼叫者加入队列时播放的声音

实验步骤:

设置参数

在extension.conf中加入

Exten => 680 ,n,Playback(test/test)

拨打电话

用1006拨打680

实验结果

呼叫者播放设置的声音

Retry

含义:在设定的时间内重新拨号

参数:retry

实验步骤:

设置参数

Queues.conf 中retry = 30

拨打电话

用1006拨打680

实验结果

每三十秒钟重新呼叫一次

Wrap-up time

含义:当一个Agent挂电话以后多久能够再响铃

参数:wrapuptime

实验步骤:

设置参数

在queues.conf中 设置wrapuptime = 20

拨打电话

用1006拨打680

实验结果

当Agent接完电话二十秒之内不会响铃,二十秒以后会响铃。

APBX ——Ring-Group测试

Ring Mode

Parallel mode

实验步骤:

设置参数

编写dialplan 中添加 exten = 6010,1,Dial(SIP/1003&SIP/1004&SIP/1005,9,m)

拨打电话

用1006拨打6010

实验结果

1003,1004,1005同时振铃

 

Serial mode

实验步骤:

设置参数

编写dialplan 中添加

exten = 6010,1,RetryDial(,0,1,SIP/1003,9,m)

exten = 6010,n,RetryDial(,0,1,SIP/1004,9,m)

exten = 6010,n,RetryDial(,0,1,SIP/1005,9,m)

注释掉

;exten = 6010,1,Dial(SIP/1003&SIP/1004&SIP/1005,9,m)

 

拨打电话

用1006拨打6010

实验结果

1003,1004,1005顺次振铃

 

Parallel Ring Interval

实验步骤:

设置参数

注释掉

;exten = 6010,1,RetryDial(,0,1,SIP/1003,9,m)

;exten = 6010,n,RetryDial(,0,1,SIP/1004,9,m)

;exten = 6010,n,RetryDial(,0,1,SIP/1005,9,m)

打开

设置Dial的时间为10秒

exten = 6010,1,Dial(SIP/1003&SIP/1004&SIP/1005,10,m)

 

拨打电话

用1006拨打6010

实验结果

1003,1004,1005同时振铃 10秒后结束

Serial Ring Attempts Per Member

实验步骤:

设置参数

打开设置拨号次数为3

exten = 6010,1,RetryDial(,0,3,SIP/1003,9,m)

exten = 6010,n,RetryDial(,0,3,SIP/1004,9,m)

exten = 6010,n,RetryDial(,0,3,SIP/1005,9,m)

注释掉;exten = 6010,1,Dial(SIP/1003&SIP/1004&SIP/1005,10,m)

 

拨打电话

用1006拨打6010

实验结果

1003,1004,1005依次振铃,每次尝试3次振铃

Serial Ring Interval

实验步骤:

设置参数

打开设置拨号次数为3

exten = 6010,1,RetryDial(,0,3,SIP/1003,10,m)

exten = 6010,n,RetryDial(,0,3,SIP/1004,10,m)

exten = 6010,n,RetryDial(,0,3,SIP/1005,10,m)

注释掉;exten = 6010,1,Dial(SIP/1003&SIP/1004&SIP/1005,10,m)

 

拨打电话

用1006拨打6010

实验结果

1003,1004,1005依次振铃,每次振铃10后结束

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值