[asterisk-commits] rmudgett: testsuite/asterisk/trunk r5073 - in /asterisk/trunk/tests/apps/agen...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 28 11:38:25 CDT 2014
Author: rmudgett
Date: Wed May 28 11:38:20 2014
New Revision: 5073
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5073
Log:
testsuite: Tweak agent pool tests.
* Fixed the agent_acknowledge_error test scenerio 1 that could never fail.
The test can fail now if you actually send the expected DTMF digit.
* Cleaned up the extensions.conf spacing and added Answer() and Hangup()
where needed.
* Added "NoOp(AGENT_STATUS is ${AGENT_STATUS})" after AgentLogin() and
AgentRequest() to log the value if those applicaitons happen to continue
in the dialplan.
* Cleaned up most test-config.yaml tests to order the events and calls in
the order they are expected.
ASTERISK-23499 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3561/
Modified:
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml
asterisk/trunk/tests/apps/agents/agent_login/login_errors/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/agents/agent_login/login_errors/test-config.yaml
asterisk/trunk/tests/apps/agents/agent_login/nominal/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/agents/agent_login/nominal/test-config.yaml
asterisk/trunk/tests/apps/agents/agent_request/nominal/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/agents/agent_request/nominal/test-config.yaml
Modified: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf (original)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf Wed May 28 11:38:20 2014
@@ -2,6 +2,7 @@
fullname=James Bond
ackcall=true
+autologoff=5
[2000]
Modified: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf Wed May 28 11:38:20 2014
@@ -28,34 +28,44 @@
same => n,Hangup()
exten => wait,1,NoOp()
+ same => n,Answer()
same => n,Wait(10000)
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Logs agent 1000 in.
; ----------------------------------------------------------------------
exten => login1000,hint,Agent:1000
exten => login1000,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(1000)
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Logs agent 2000 in.
; ----------------------------------------------------------------------
exten => login2000,hint,Agent:2000
exten => login2000,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(2000)
+ same => n,Answer()
+ same => n,AgentLogin(2000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Requests agent 1000.
; ----------------------------------------------------------------------
exten => request1000,1,NoOp()
- same => n,Answer()
- same => n,AgentRequest(1000)
+ same => n,Answer()
+ same => n,AgentRequest(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Requests agent 2000.
; ----------------------------------------------------------------------
exten => request2000,1,NoOp()
- same => n,Answer()
- same => n,AgentRequest(2000)
+ same => n,Answer()
+ same => n,AgentRequest(2000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
Modified: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml Wed May 28 11:38:20 2014
@@ -2,11 +2,11 @@
summary: 'Tests different errors an agent can get when trying to acknowledge a request.'
description:
The first scenario has an agent log in, then a channel requests that agent.
- Upon hearing the beep, the agent inputs an invalid DTMF key, waits,
- and if the two channels are still not bridged together, the test passes.
- The second scenario is exactly the same, only autologoff is set to true
- for the agent, and the agent does nothing when a request is sent. If the
- agent logs off and the two were never bridged, the test passes.
+ Upon hearing the beep, the agent inputs an invalid DTMF key and waits
+ to be connected or auto logged off. If the agent gets logged off,
+ the test passes.
+ The second scenario is exactly the same, only the agent does nothing
+ when a request is sent. If the agent get logged off, the test passes.
test-modules:
test-object:
@@ -21,8 +21,9 @@
-
# Scenario 1
# An agent logs in and receives an AgentRequest. A beep should be played and
- # the agent will attempt to acknowledge it with an invalid DTMF. If the agent
- # does not enter the bridge with the requesting channel, the test passes.
+ # the agent will attempt to acknowledge it with an invalid DTMF. If the agent
+ # does not enter the bridge with the requesting channel before being auto
+ # logged off, the test passes.
channels:
-
channel-id: 'Login-1000'
@@ -80,14 +81,8 @@
expected-result: 'Agent 1000 heard beep.'
-
action-type: 'send-dtmf'
- delay: 1
+ delay: 2
dtmf: '*'
- -
- action-type: 'set-expected-result'
- delay: 15
- expected-result: 'Invalid DTMF sent and agent 1000 never joined bridge.'
- -
- action-type: 'end-scenario'
-
type: 'headermatch'
conditions:
@@ -98,7 +93,27 @@
actions:
-
action-type: 'fail-test'
- message: 'Agent 1000 entered bridge with invalid DTMF!'
+ message: 'Agent 1000 entered basic bridge with invalid DTMF!'
+ -
+ action-type: 'hangup'
+ channel-id: 'Request-1000'
+ -
+ action-type: 'hangup'
+ channel-id: 'Login-1000'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogoff'
+ Agent: '1000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 logged off automatically.'
+ -
+ action-type: 'end-scenario'
-
channel-id: 'Request-1000'
channel-name: 'Local/request1000 at default'
@@ -130,10 +145,9 @@
expected-result: 'Requesting channel entered basic bridge.'
-
# Scenario 2
- # The same as scenario 1, but the autologoff option is set to log an agent
- # off if that agent does not acknowledge a request within 5 seconds. If the
- # agent logs off and never entered the bridge with the requesting channel,
- # the test passes.
+ # The same as scenario 1, but the agent does not attempt to acknowledge
+ # the call. If the agent does not enter the bridge with the requesting
+ # channel before being auto logged off, the test passes.
channels:
-
channel-id: 'Login-2000'
@@ -199,7 +213,15 @@
actions:
-
action-type: 'fail-test'
- message: 'Agent 2000 entered bridge with invalid DTMF!'
+ message: 'Agent 2000 entered bridge without DTMF!'
+ -
+ action-type: 'hangup'
+ channel-id: 'Request-2000'
+ -
+ action-type: 'hangup'
+ channel-id: 'Login-2000'
+ -
+ action-type: 'end-scenario'
-
type: 'headermatch'
conditions:
@@ -210,12 +232,6 @@
-
action-type: 'set-expected-result'
expected-result: 'Agent 2000 logged off automatically.'
- -
- action-type: 'hangup'
- channel-id: 'Login-2000'
- -
- action-type: 'hangup'
- channel-id: 'Request-2000'
-
action-type: 'end-scenario'
-
Modified: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf Wed May 28 11:38:20 2014
@@ -27,65 +27,79 @@
same => n,Hangup()
exten => wait,1,NoOp()
+ same => n,Answer()
same => n,Wait(10000)
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Logs agent 1000 in.
; ----------------------------------------------------------------------
exten => login1000,hint,Agent:1000
exten => login1000,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(1000)
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Logs agent 2000 in.
; ----------------------------------------------------------------------
exten => login2000,hint,Agent:2000
exten => login2000,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(2000)
+ same => n,Answer()
+ same => n,AgentLogin(2000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Logs agent 3000 in.
; ----------------------------------------------------------------------
exten => login3000,hint,Agent:3000
exten => login3000,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(3000)
+ same => n,Answer()
+ same => n,AgentLogin(3000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Requests agent 1000.
; ----------------------------------------------------------------------
exten => request1000,1,NoOp()
- same => n,Answer()
- same => n,AgentRequest(1000)
+ same => n,Answer()
+ same => n,AgentRequest(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Requests agent 2000.
; ----------------------------------------------------------------------
exten => request2000,1,NoOp()
- same => n,Answer()
- same => n,AgentRequest(2000)
+ same => n,Answer()
+ same => n,AgentRequest(2000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Requests agent 3000.
; ----------------------------------------------------------------------
exten => request3000,1,NoOp()
- same => n,Answer()
- same => n,AgentRequest(3000)
+ same => n,Answer()
+ same => n,AgentRequest(3000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Raises a UserEvent to see if agent 1000 is INUSE.
; ----------------------------------------------------------------------
exten => status1000,1,NoOp()
- same => n,Answer()
- same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=INUSE]?UserEvent(AgentINUSE,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=INUSE]?UserEvent(AgentINUSE,result:pass))
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Raises a UserEvent to see if agent 2000 is INUSE.
; ----------------------------------------------------------------------
exten => status2000,1,NoOp()
- same => n,Answer()
- same => n,ExecIf($[${DEVICE_STATE(Agent:2000)}=INUSE]?UserEvent(AgentINUSE,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,ExecIf($[${DEVICE_STATE(Agent:2000)}=INUSE]?UserEvent(AgentINUSE,result:pass))
+ same => n,Hangup()
Modified: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml Wed May 28 11:38:20 2014
@@ -81,7 +81,7 @@
expected-result: 'Agent 1000 heard beep.'
-
action-type: 'send-dtmf'
- delay: 1
+ delay: 2
dtmf: '#'
-
type: 'headermatch'
@@ -214,7 +214,7 @@
expected-result: 'Agent 2000 heard beep.'
-
action-type: 'send-dtmf'
- delay: 1
+ delay: 2
dtmf: '*'
-
type: 'headermatch'
@@ -349,11 +349,10 @@
expected-result: 'Agent 3000 heard custom beep.'
-
action-type: 'hangup'
- delay: 1
channel-id: 'Request-3000'
-
action-type: 'hangup'
- delay: 1
+ channel-id: 'Login-3000'
-
type: 'headermatch'
conditions:
Modified: asterisk/trunk/tests/apps/agents/agent_login/login_errors/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_login/login_errors/configs/ast1/extensions.conf?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_login/login_errors/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/agents/agent_login/login_errors/configs/ast1/extensions.conf Wed May 28 11:38:20 2014
@@ -8,49 +8,55 @@
exten => sendDTMF,1,NoOp()
same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
same => n,SendDTMF(${DTMF_TO_SEND})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => sendAudio,1,NoOp()
same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
same => n,Playback(${TALK_AUDIO})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => sendAudioWithDTMF,1,NoOp()
same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
same => n,Playback(${TALK_AUDIO})
same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
same => n,SendDTMF(${DTMF_TO_SEND})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => hangup,1,NoOp()
same => n,Verbose(1, Hanging up)
same => n,Hangup()
exten => wait,1,NoOp()
+ same => n,Answer()
same => n,Wait(10000)
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Tests to see if an invalid agent login returns AGENT_STATUS = INVALID.
; ----------------------------------------------------------------------
exten => invalid-login,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(4321)
- same => n,ExecIf($[${AGENT_STATUS}=INVALID]?UserEvent(InvalidLogin,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,AgentLogin(4321)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,ExecIf($[${AGENT_STATUS}=INVALID]?UserEvent(InvalidLogin,result:pass))
+ same => n,Hangup()
; ----------------------------------------------------------------------
; A valid agent logs in and enters the pool.
; ----------------------------------------------------------------------
exten => valid-login,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(1000)
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Tests to see if a valid login while that same agent is already logged on
; returns AGENT_STATUS = ALREADY_LOGGED_IN.
; ----------------------------------------------------------------------
exten => same-login,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(1000)
- same => n,ExecIf($[${AGENT_STATUS}=ALREADY_LOGGED_IN]?UserEvent(AlreadyLoggedIn,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,ExecIf($[${AGENT_STATUS}=ALREADY_LOGGED_IN]?UserEvent(AlreadyLoggedIn,result:pass))
+ same => n,Hangup()
Modified: asterisk/trunk/tests/apps/agents/agent_login/login_errors/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_login/login_errors/test-config.yaml?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_login/login_errors/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/agents/agent_login/login_errors/test-config.yaml Wed May 28 11:38:20 2014
@@ -35,23 +35,11 @@
match:
Event: 'AgentLogin'
Agent: '1000'
+ Channel: 'Local/valid-login at default-.*'
actions:
-
action-type: 'set-expected-result'
expected-result: 'An agent attempted valid login 1000'
- -
- type: 'headermatch'
- conditions:
- match:
- Event: 'MusicOnHoldStart'
- Channel: 'Local/valid-login at default-.*'
- actions:
- -
- action-type: 'set-expected-result'
- expected-result: 'MusicOnHoldStart Event received for valid login'
- -
- action-type: 'start-call'
- channel-id: 'Same-agent'
-
type: 'headermatch'
conditions:
@@ -63,6 +51,19 @@
-
action-type: 'set-expected-result'
expected-result: 'Valid agent channel entered bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/valid-login at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'MusicOnHoldStart Event received for valid login'
+ -
+ action-type: 'start-call'
+ channel-id: 'Same-agent'
-
channel-id: 'Same-agent'
channel-name: 'Local/same-login at default'
@@ -82,6 +83,62 @@
-
action-type: 'set-expected-result'
expected-result: 'An agent attempted valid login 1000 while already logged in.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Valid-agent'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogin'
+ Agent: '1000'
+ Channel: 'Local/same-login at default-.*'
+ actions:
+ -
+ action-type: 'fail-test'
+ expected-result: 'A duplicate agent 1000 logged in'
+ -
+ action-type: 'hangup'
+ channel-id: 'Same-agent'
+ -
+ action-type: 'hangup'
+ channel-id: 'Valid-agent'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/same-login at default-.*'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Channel entered bridge for duplicate login.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Same-agent'
+ -
+ action-type: 'hangup'
+ channel-id: 'Valid-agent'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/same-login at default-.*'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'MusicOnHoldStart Event received for duplicate login.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Same-agent'
-
action-type: 'hangup'
channel-id: 'Valid-agent'
@@ -112,9 +169,6 @@
action-type: 'set-expected-result'
expected-result: 'Detected invalid agent 4321 and now hanging up.'
-
- action-type: 'hangup'
- channel-id: 'Invalid-agent'
- -
action-type: 'end-scenario'
-
type: 'headermatch'
@@ -126,16 +180,11 @@
-
action-type: 'fail-test'
message: 'Invalid agent 4321 logged in!'
- -
- type: 'headermatch'
- conditions:
- match:
- Event: 'MusicOnHoldStart'
- Channel: 'Local/invalid-login at default-.*'
- actions:
- -
- action-type: 'fail-test'
- message: 'MusicOnHoldStart Event received for invalid login.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Invalid-agent'
+ -
+ action-type: 'end-scenario'
-
type: 'headermatch'
conditions:
@@ -147,6 +196,26 @@
-
action-type: 'fail-test'
message: 'Channel entered bridge for invalid login.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Invalid-agent'
+ -
+ action-type: 'end-scenario'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/invalid-login at default-.*'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'MusicOnHoldStart Event received for invalid login.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Invalid-agent'
+ -
+ action-type: 'end-scenario'
properties:
minversion: '12.0.0'
Modified: asterisk/trunk/tests/apps/agents/agent_login/nominal/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_login/nominal/configs/ast1/extensions.conf?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_login/nominal/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/agents/agent_login/nominal/configs/ast1/extensions.conf Wed May 28 11:38:20 2014
@@ -8,30 +8,34 @@
exten => sendDTMF,1,NoOp()
same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
same => n,SendDTMF(${DTMF_TO_SEND})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => sendAudio,1,NoOp()
same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
same => n,Playback(${TALK_AUDIO})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => sendAudioWithDTMF,1,NoOp()
same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
same => n,Playback(${TALK_AUDIO})
same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
same => n,SendDTMF(${DTMF_TO_SEND})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => hangup,1,NoOp()
same => n,Verbose(1, Hanging up)
same => n,Hangup()
exten => wait,1,NoOp()
+ same => n,Answer()
same => n,Wait(10000)
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Tests to see if a valid agent login enters the pool.
; ----------------------------------------------------------------------
exten => valid-login,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(1000)
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
Modified: asterisk/trunk/tests/apps/agents/agent_login/nominal/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_login/nominal/test-config.yaml?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_login/nominal/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/agents/agent_login/nominal/test-config.yaml Wed May 28 11:38:20 2014
@@ -37,6 +37,17 @@
type: 'headermatch'
conditions:
match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/valid-login at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Valid agent channel entered bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
Event: 'MusicOnHoldStart'
Channel: 'Local/valid-login at default-.*'
actions:
@@ -48,17 +59,6 @@
channel-id: 'Valid-agent'
-
action-type: 'end-scenario'
- -
- type: 'headermatch'
- conditions:
- match:
- Event: 'BridgeEnter'
- BridgeType: 'agent_hold'
- Channel: 'Local/valid-login at default-.*'
- actions:
- -
- action-type: 'set-expected-result'
- expected-result: 'Valid agent channel entered bridge.'
properties:
minversion: '12.0.0'
Modified: asterisk/trunk/tests/apps/agents/agent_request/nominal/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_request/nominal/configs/ast1/extensions.conf?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_request/nominal/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/agents/agent_request/nominal/configs/ast1/extensions.conf Wed May 28 11:38:20 2014
@@ -8,63 +8,69 @@
exten => sendDTMF,1,NoOp()
same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
same => n,SendDTMF(${DTMF_TO_SEND})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => sendAudio,1,NoOp()
same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
same => n,Playback(${TALK_AUDIO})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => sendAudioWithDTMF,1,NoOp()
same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
same => n,Playback(${TALK_AUDIO})
same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
same => n,SendDTMF(${DTMF_TO_SEND})
- same => n,Goto(caller,wait,1)
+ same => n,Goto(default,wait,1)
exten => hangup,1,NoOp()
same => n,Verbose(1, Hanging up)
same => n,Hangup()
exten => wait,1,NoOp()
+ same => n,Answer()
same => n,Wait(10000)
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Logs the agent in.
; ----------------------------------------------------------------------
exten => login,hint,Agent:1000
exten => login,1,NoOp()
- same => n,Answer()
- same => n,AgentLogin(1000)
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Sends an agent request to the agent.
; ----------------------------------------------------------------------
exten => request,1,NoOp()
- same => n,Answer()
- same => n,AgentRequest(1000)
+ same => n,Answer()
+ same => n,AgentRequest(1000)
+ same => n,NoOp(AGENT_STATUS is ${AGENT_STATUS})
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Tests to see if the current state of the agent is NOT_INUSE.
; ----------------------------------------------------------------------
exten => status-avail,1,NoOp()
- same => n,Answer()
- same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=NOT_INUSE]?UserEvent(AvailableAgent,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=NOT_INUSE]?UserEvent(AvailableAgent,result:pass))
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Tests to see if the current state of the agent after returning to the
; pool is NOT_INUSE.
; ----------------------------------------------------------------------
exten => status-avail2,1,NoOp()
- same => n,Answer()
- same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=NOT_INUSE]?UserEvent(AvailableAgent2,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=NOT_INUSE]?UserEvent(AvailableAgent2,result:pass))
+ same => n,Hangup()
; ----------------------------------------------------------------------
; Tests to see if the current state of the agent is INUSE.
; ----------------------------------------------------------------------
exten => status-inuse,1,NoOp()
- same => n,Answer()
- same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=INUSE]?UserEvent(InuseAgent,result:pass))
- same => n,Hangup()
+ same => n,Answer()
+ same => n,ExecIf($[${DEVICE_STATE(Agent:1000)}=INUSE]?UserEvent(InuseAgent,result:pass))
+ same => n,Hangup()
Modified: asterisk/trunk/tests/apps/agents/agent_request/nominal/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_request/nominal/test-config.yaml?view=diff&rev=5073&r1=5072&r2=5073
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_request/nominal/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/agents/agent_request/nominal/test-config.yaml Wed May 28 11:38:20 2014
@@ -56,17 +56,6 @@
type: 'headermatch'
conditions:
match:
- Event: 'BridgeEnter'
- Channel: 'Local/login at default-.*'
- BridgeType: 'basic'
- actions:
- -
- action-type: 'set-expected-result'
- expected-result: 'Agent channel connected to bridge.'
- -
- type: 'headermatch'
- conditions:
- match:
Event: 'MusicOnHoldStart'
Channel: 'Local/login at default-.*'
actions:
@@ -78,6 +67,39 @@
action-type: 'start-call'
delay: 8
channel-id: 'Status-AVAILABLE'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ Channel: 'Local/login at default-.*'
+ BridgeType: 'basic'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent channel connected to bridge.'
+ -
+ channel-id: 'Status-AVAILABLE'
+ channel-name: 'Local/status-avail at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'AvailableAgent'
+ requirements:
+ match:
+ Result: 'pass'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent is available.'
+ -
+ action-type: 'start-call'
+ channel-id: 'Agent-request'
-
channel-id: 'Agent-request'
channel-name: 'Local/request at default'
@@ -111,53 +133,6 @@
action-type: 'start-call'
delay: 2
channel-id: 'Status-INUSE'
-
- -
- channel-id: 'Status-AVAILABLE'
- channel-name: 'Local/status-avail at default'
- context: 'default'
- exten: 'wait'
- events:
- -
- type: 'headermatch'
- conditions:
- match:
- Event: 'UserEvent'
- UserEvent: 'AvailableAgent'
- requirements:
- match:
- Result: 'pass'
- actions:
- -
- action-type: 'set-expected-result'
- expected-result: 'Agent is available.'
- -
- action-type: 'start-call'
- channel-id: 'Agent-request'
- -
- channel-id: 'Status-end'
- channel-name: 'Local/status-avail2 at default'
- context: 'default'
- exten: 'wait'
- events:
- -
- type: 'headermatch'
- conditions:
- match:
- Event: 'UserEvent'
- UserEvent: 'AvailableAgent2'
- requirements:
- match:
- Result: 'pass'
- actions:
- -
- action-type: 'set-expected-result'
- expected-result: 'Agent is available.'
- -
- action-type: 'hangup'
- channel-id: 'Agent-login'
- -
- action-type: 'end-scenario'
-
channel-id: 'Status-INUSE'
channel-name: 'Local/status-inuse at default'
@@ -183,6 +158,30 @@
-
action-type: 'start-call'
channel-id: 'Status-end'
+ -
+ channel-id: 'Status-end'
+ channel-name: 'Local/status-avail2 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'AvailableAgent2'
+ requirements:
+ match:
+ Result: 'pass'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent is available.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Agent-login'
+ -
+ action-type: 'end-scenario'
properties:
minversion: '12.0.0'
More information about the asterisk-commits
mailing list