[asterisk-commits] mjordan: testsuite/asterisk/trunk r4868 - in /asterisk/trunk: sample-yaml/ te...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 18 12:58:26 CDT 2014
Author: mjordan
Date: Tue Mar 18 12:58:21 2014
New Revision: 4868
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4868
Log:
agents: Add nominal and off nominal agent acknowledgement tests
This test covers both the nominal agent acknowledgement and some agent
acknowledgement errors that can occur.
Nominal scenarios:
1. Tests an agent that acknowledges the request with the '#' key.
2. Tests an agent that acknowledges the request with the '*' key.
3. The same as scenario 1, but instead of hearing a beep, a custom sound file
is played.
Error scenarios:
1. Tests an agent that enters an incorrect DTMF to acknowledge the request.
2. Tests an agent that does nothing when a request is received.
Review: https://reviewboard.asterisk.org/r/3328/
(closes issue ASTERISK-23263)
Reported by: Matt Jordan
patches:
agent_ack_diff uploaded by bford (license 6580)
ASTERISK-23263 #close
ASTERISK-23263 #comment patch agent_ack_diff uploaded by bford (license 6580)
Added:
asterisk/trunk/tests/apps/agents/agent_acknowledge/
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf (with props)
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml (with props)
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf (with props)
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml (with props)
asterisk/trunk/tests/apps/agents/agent_acknowledge/tests.yaml (with props)
Modified:
asterisk/trunk/sample-yaml/apptest-config.yaml.sample
asterisk/trunk/tests/apps/agents/tests.yaml
Modified: asterisk/trunk/sample-yaml/apptest-config.yaml.sample
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/sample-yaml/apptest-config.yaml.sample?view=diff&rev=4868&r1=4867&r2=4868
==============================================================================
--- asterisk/trunk/sample-yaml/apptest-config.yaml.sample (original)
+++ asterisk/trunk/sample-yaml/apptest-config.yaml.sample Tue Mar 18 12:58:21 2014
@@ -19,8 +19,9 @@
# Hangup the local channel
#
app-test-config:
- app: 'ConfBridge' # Required. The application that this test will
- # exercise.
+ apps: # Required. The application(s) that this test
+ - 'Confbridge' # will exercise.
+ - 'Dial'
# An application test consists of some number of scenarios to execute. Each
# scenario should be independent of the others. The test passes if all
# scenarios complete successfully.
Added: 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=auto&rev=4868
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf (added)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf Tue Mar 18 12:58:21 2014
@@ -1,0 +1,10 @@
+[1000]
+
+fullname=James Bond
+ackcall=true
+
+[2000]
+
+fullname=James Bond, Jr.
+ackcall=true
+autologoff=5
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/agents.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: 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=auto&rev=4868
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf Tue Mar 18 12:58:21 2014
@@ -1,0 +1,61 @@
+; Tests that when an agent attempts to acknowledge a request incorrectly (or
+; doesn't attempt to acknowledge it at all), the applications respond appropriately.
+[default]
+
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+
+exten => sendDTMF,1,NoOp()
+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+ same => n,SendDTMF(${DTMF_TO_SEND})
+ 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(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(default,wait,1)
+
+exten => hangup,1,NoOp()
+ same => n,Verbose(1, Hanging up)
+ same => n,Hangup()
+
+exten => wait,1,NoOp()
+ same => n,Wait(10000)
+
+; ----------------------------------------------------------------------
+; Logs agent 1000 in.
+; ----------------------------------------------------------------------
+exten => login1000,hint,Agent:1000
+exten => login1000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+
+; ----------------------------------------------------------------------
+; Logs agent 2000 in.
+; ----------------------------------------------------------------------
+exten => login2000,hint,Agent:2000
+exten => login2000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentLogin(2000)
+
+; ----------------------------------------------------------------------
+; Requests agent 1000.
+; ----------------------------------------------------------------------
+exten => request1000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentRequest(1000)
+
+; ----------------------------------------------------------------------
+; Requests agent 2000.
+; ----------------------------------------------------------------------
+exten => request2000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentRequest(2000)
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: 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=auto&rev=4868
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml Tue Mar 18 12:58:21 2014
@@ -1,0 +1,258 @@
+testinfo:
+ 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.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ apps:
+ - 'AgentLogin'
+ - 'AgentRequest'
+ scenarios:
+ -
+ # 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.
+ channels:
+ -
+ channel-id: 'Login-1000'
+ channel-name: 'Local/login1000 at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogin'
+ Agent: '1000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 logged in.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/login1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 entered the holding bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/login1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 is being played music on hold.'
+ -
+ action-type: 'start-call'
+ delay: 6
+ channel-id: 'Request-1000'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/login1000 at default-.*'
+ Message: 'beep'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 heard beep.'
+ -
+ action-type: 'send-dtmf'
+ delay: 1
+ 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:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/login1000 at default-.*'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Agent 1000 entered bridge with invalid DTMF!'
+ -
+ channel-id: 'Request-1000'
+ channel-name: 'Local/request1000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Channel: 'Local/request1000 at default-.*'
+ Application: 'AgentRequest'
+ AppData: '1000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 received a request.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/request1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ 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.
+ channels:
+ -
+ channel-id: 'Login-2000'
+ channel-name: 'Local/login2000 at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogin'
+ Agent: '2000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 logged in.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/login2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 entered the holding bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/login2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 is being played music on hold.'
+ -
+ action-type: 'start-call'
+ delay: 6
+ channel-id: 'Request-2000'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/login2000 at default-.*'
+ Message: 'beep'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 heard beep.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/login2000 at default-.*'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Agent 2000 entered bridge with invalid DTMF!'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogoff'
+ Agent: '2000'
+ actions:
+ -
+ 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'
+ -
+ channel-id: 'Request-2000'
+ channel-name: 'Local/request2000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Channel: 'Local/request2000 at default-.*'
+ Application: 'AgentRequest'
+ AppData: '2000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 received a request.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/request2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Requesting channel entered basic bridge.'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : 'starpy'
+ - python : 'twisted'
+ tags:
+ - agents
+ - apps
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/agent_acknowledge_error/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf?view=auto&rev=4868
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf (added)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf Tue Mar 18 12:58:21 2014
@@ -1,0 +1,15 @@
+[1000]
+
+fullname=James Bond
+ackcall=true
+
+[2000]
+
+fullname=James Bond, Jr.
+ackcall=true
+acceptdtmf=*
+
+[3000]
+
+fullname=James Bond, Sr.
+custom_beep=hello-world
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/agents.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: 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=auto&rev=4868
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf Tue Mar 18 12:58:21 2014
@@ -1,0 +1,91 @@
+; Tests that an agent can acknowledge a request in different ways.
+[default]
+
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+
+exten => sendDTMF,1,NoOp()
+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+ same => n,SendDTMF(${DTMF_TO_SEND})
+ 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(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(default,wait,1)
+
+exten => hangup,1,NoOp()
+ same => n,Verbose(1, Hanging up)
+ same => n,Hangup()
+
+exten => wait,1,NoOp()
+ same => n,Wait(10000)
+
+; ----------------------------------------------------------------------
+; Logs agent 1000 in.
+; ----------------------------------------------------------------------
+exten => login1000,hint,Agent:1000
+exten => login1000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentLogin(1000)
+
+; ----------------------------------------------------------------------
+; Logs agent 2000 in.
+; ----------------------------------------------------------------------
+exten => login2000,hint,Agent:2000
+exten => login2000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentLogin(2000)
+
+; ----------------------------------------------------------------------
+; Logs agent 3000 in.
+; ----------------------------------------------------------------------
+exten => login3000,hint,Agent:3000
+exten => login3000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentLogin(3000)
+
+; ----------------------------------------------------------------------
+; Requests agent 1000.
+; ----------------------------------------------------------------------
+exten => request1000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentRequest(1000)
+
+; ----------------------------------------------------------------------
+; Requests agent 2000.
+; ----------------------------------------------------------------------
+exten => request2000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentRequest(2000)
+
+; ----------------------------------------------------------------------
+; Requests agent 3000.
+; ----------------------------------------------------------------------
+exten => request3000,1,NoOp()
+ same => n,Answer()
+ same => n,AgentRequest(3000)
+
+; ----------------------------------------------------------------------
+; 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()
+
+; ----------------------------------------------------------------------
+; 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()
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: 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=auto&rev=4868
==============================================================================
--- asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml Tue Mar 18 12:58:21 2014
@@ -1,0 +1,406 @@
+testinfo:
+ summary: 'Tests different ways an agent can acknowledge a request.'
+ description:
+ The first scenario logs an agent in, who is then sent a request. Upon
+ receiving the request, a beep should be played. Once the agent presses
+ the '#' key, the agent and requesting channel should be bridged.
+ The second scenario does the exact same thing, except instead of pressing
+ the '#' key, the '*' key should be pressed instead.
+ The third scenario should play something else instead of a beep, and if it
+ is heard, the scenario should end successfully.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ apps:
+ - 'AgentLogin'
+ - 'AgentRequest'
+ scenarios:
+ -
+ # Scenario 1
+ # An agent logs in and receives an AgentRequest. A beep should be played and
+ # the agent should acknowledge the request by pressing the '#' key, placing
+ # both the agent and the requesting channel into a bridge.
+ channels:
+ -
+ channel-id: 'Login-1000'
+ channel-name: 'Local/login1000 at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogin'
+ Agent: '1000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 logged in.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/login1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 entered the holding bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/login1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 is being played music on hold.'
+ -
+ action-type: 'start-call'
+ delay: 6
+ channel-id: 'Request-1000'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/login1000 at default-.*'
+ Message: 'beep'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 heard beep.'
+ -
+ action-type: 'send-dtmf'
+ delay: 1
+ dtmf: '#'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/login1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 entered basic bridge.'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Status-INUSE'
+ -
+ channel-id: 'Request-1000'
+ channel-name: 'Local/request1000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Channel: 'Local/request1000 at default-.*'
+ Application: 'AgentRequest'
+ AppData: '1000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 received a request.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/request1000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Requesting channel entered basic bridge.'
+ -
+ channel-id: 'Status-INUSE'
+ channel-name: 'Local/status1000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'AgentINUSE'
+ requirements:
+ match:
+ Result: 'pass'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 1000 state is INUSE.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Request-1000'
+ -
+ action-type: 'hangup'
+ channel-id: 'Login-1000'
+ -
+ action-type: 'end-scenario'
+ -
+ # Scenario 2
+ # Exactly the same as scenario 1, but the accepted DTMF value should be '*'.
+ channels:
+ -
+ channel-id: 'Login-2000'
+ channel-name: 'Local/login2000 at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogin'
+ Agent: '2000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 logged in.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/login2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 entered the holding bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/login2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 is being played music on hold.'
+ -
+ action-type: 'start-call'
+ delay: 6
+ channel-id: 'Request-2000'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/login2000 at default-.*'
+ Message: 'beep'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 heard beep.'
+ -
+ action-type: 'send-dtmf'
+ delay: 1
+ dtmf: '*'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/login2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 entered basic bridge.'
+ -
+ action-type: 'start-call'
+ delay: 1
+ channel-id: 'Status-INUSE'
+ -
+ channel-id: 'Request-2000'
+ channel-name: 'Local/request2000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Channel: 'Local/request2000 at default-.*'
+ Application: 'AgentRequest'
+ AppData: '2000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 received a request.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/request2000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Requesting channel entered basic bridge.'
+ -
+ channel-id: 'Status-INUSE'
+ channel-name: 'Local/status2000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'AgentINUSE'
+ requirements:
+ match:
+ Result: 'pass'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 2000 state is INUSE.'
+ -
+ action-type: 'hangup'
+ channel-id: 'Request-2000'
+ -
+ action-type: 'hangup'
+ channel-id: 'Login-2000'
+ -
+ action-type: 'end-scenario'
+ -
+ # Scenario 3
+ # Exactly the same as scenario 1, but a custom sound file will be played
+ # instead of a beep. Only worried about the custom sound being played back.
+ # Hang up channels and end scenario if the sound is heard.
+ channels:
+ -
+ channel-id: 'Login-3000'
+ channel-name: 'Local/login3000 at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'AgentLogin'
+ Agent: '3000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 3000 logged in.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'agent_hold'
+ Channel: 'Local/login3000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 3000 entered the holding bridge.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'MusicOnHoldStart'
+ Channel: 'Local/login3000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 3000 is being played music on hold.'
+ -
+ action-type: 'start-call'
+ delay: 6
+ channel-id: 'Request-3000'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Channel: 'Local/login3000 at default-.*'
+ Message: 'hello-world'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 3000 heard custom beep.'
+ -
+ action-type: 'hangup'
+ delay: 1
+ channel-id: 'Request-3000'
+ -
+ action-type: 'hangup'
+ delay: 1
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Hangup'
+ Channel: 'Local/login3000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'All channels hung up'
+ -
+ action-type: 'end-scenario'
+ -
+ channel-id: 'Request-3000'
+ channel-name: 'Local/request3000 at default'
+ context: 'default'
+ exten: 'wait'
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Channel: 'Local/request3000 at default-.*'
+ Application: 'AgentRequest'
+ AppData: '3000'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Agent 3000 received a request.'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'BridgeEnter'
+ BridgeType: 'basic'
+ Channel: 'Local/request3000 at default-.*'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Requesting channel entered basic bridge.'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : 'starpy'
+ - python : 'twisted'
+ tags:
+ - agents
+ - apps
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/agents/agent_acknowledge/nominal/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
[... 35 lines stripped ...]
More information about the asterisk-commits
mailing list