[asterisk-commits] rmudgett: branch rmudgett/cel_accountcode r5287 - in /asterisk/team/rmudgett/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 21 15:29:36 CDT 2014
Author: rmudgett
Date: Mon Jul 21 15:29:29 2014
New Revision: 5287
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5287
Log:
testsuite: Add accountcode propagation tests dealing with local channels.
Added:
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf (with props)
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml (with props)
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf (with props)
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml (with props)
Modified:
asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/tests.yaml
Added: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf?view=auto&rev=5287
==============================================================================
--- asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf (added)
+++ asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf Mon Jul 21 15:29:29 2014
@@ -1,0 +1,12 @@
+[default]
+
+exten => alice,1,NoOp()
+ same => n,Set(CHANNEL(accountcode)=alice_acct)
+ same => n,Set(CHANNEL(peeraccount)=alice_peer)
+ same => n,Dial(Local/bob at default)
+ same => n,Hangup()
+
+exten => bob,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(5)
+ same => n,Hangup()
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml?view=auto&rev=5287
==============================================================================
--- asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml (added)
+++ asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml Mon Jul 21 15:29:29 2014
@@ -1,0 +1,112 @@
+testinfo:
+ summary: 'Test local channel accountcode crossover'
+ description: |
+ 'The test checks that local;1 and local;2 have accountcode/peeraccount crossed over.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.SimpleTestCase'
+ modules:
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+
+test-object-config:
+ spawn-after-hangup: True
+ test-iterations:
+ -
+ channel: 'Local/alice at default'
+ application: 'Echo'
+ async: True
+
+ami-config:
+ # Alice events
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/alice at default-.*;2'
+ EventName: 'ANSWER'
+ requirements:
+ match:
+ AccountCode: 'alice_acct'
+ PeerAccount: 'alice_peer'
+ count: '1'
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/alice at default-.*'
+ EventName: 'BRIDGE_EXIT'
+ requirements:
+ match:
+ AccountCode: 'alice_acct'
+ PeerAccount: 'alice_peer'
+ count: '1'
+ # Bob events for Local;1
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*;1'
+ EventName: 'ANSWER'
+ requirements:
+ match:
+ AccountCode: 'alice_peer'
+ PeerAccount: 'alice_acct'
+ count: '1'
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*'
+ EventName: 'BRIDGE_EXIT'
+ requirements:
+ match:
+ AccountCode: 'alice_peer'
+ PeerAccount: 'alice_acct'
+ count: '1'
+ # Bob events for Local;2
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*;2'
+ EventName: 'ANSWER'
+ requirements:
+ match:
+ AccountCode: 'alice_acct'
+ PeerAccount: 'alice_peer'
+ count: '1'
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*;2'
+ EventName: 'CHAN_END'
+ requirements:
+ match:
+ AccountCode: 'alice_acct'
+ PeerAccount: 'alice_peer'
+ count: '1'
+
+properties:
+ minversion: '13.0.0'
+ dependencies:
+ - asterisk : 'app_dial'
+ - asterisk : 'func_channel'
+ tags:
+ - accountcode
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf?view=auto&rev=5287
==============================================================================
--- asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf (added)
+++ asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf Mon Jul 21 15:29:29 2014
@@ -1,0 +1,19 @@
+[default]
+
+exten => alice,1,NoOp()
+ same => n,Set(CHANNEL(accountcode)=alice_acct)
+ same => n,Set(CHANNEL(peeraccount)=alice_peer)
+ same => n,Dial(Local/bob at default)
+ same => n,Hangup()
+
+; Note: The accountcodes must be set on Local/bob at default;2 before answering
+; the call because of a propagation race between the answer signal and setting
+; the account codes. The Local/bob at default;1 accountcode may or may not get
+; across the bridge between Local/alice at default;2 and Local/bob at default;1.
+;
+exten => bob,1,NoOp()
+ same => n,Set(CHANNEL(accountcode)=bob_acct)
+ same => n,Set(CHANNEL(peeraccount)=bob_peer)
+ same => n,Answer()
+ same => n,Wait(5)
+ same => n,Hangup()
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml?view=auto&rev=5287
==============================================================================
--- asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml (added)
+++ asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml Mon Jul 21 15:29:29 2014
@@ -1,0 +1,113 @@
+testinfo:
+ summary: 'Test local channel accountcode crossover back propagation'
+ description: |
+ 'The test checks that local;1 and local;2 have accountcode/peeraccount
+ crossed over and account code changes on local;2 back propagate to local;1.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.SimpleTestCase'
+ modules:
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+
+test-object-config:
+ spawn-after-hangup: True
+ test-iterations:
+ -
+ channel: 'Local/alice at default'
+ application: 'Echo'
+ async: True
+
+ami-config:
+ # Alice events
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/alice at default-.*;2'
+ EventName: 'ANSWER'
+ requirements:
+ match:
+ AccountCode: 'alice_acct'
+ PeerAccount: 'alice_peer'
+ count: '1'
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/alice at default-.*'
+ EventName: 'BRIDGE_EXIT'
+ requirements:
+ match:
+ AccountCode: 'alice_acct'
+ PeerAccount: 'bob_peer'
+ count: '1'
+ # Bob events for Local;1
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*;1'
+ EventName: 'ANSWER'
+ requirements:
+ match:
+ AccountCode: 'bob_peer'
+ PeerAccount: 'bob_acct'
+ count: '1'
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*'
+ EventName: 'BRIDGE_EXIT'
+ requirements:
+ match:
+ AccountCode: 'bob_peer'
+ PeerAccount: 'alice_acct'
+ count: '1'
+ # Bob events for Local;2
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*;2'
+ EventName: 'ANSWER'
+ requirements:
+ match:
+ AccountCode: 'bob_acct'
+ PeerAccount: 'bob_peer'
+ count: '1'
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'CEL'
+ Channel: 'Local/bob at default-.*;2'
+ EventName: 'CHAN_END'
+ requirements:
+ match:
+ AccountCode: 'bob_acct'
+ PeerAccount: 'bob_peer'
+ count: '1'
+
+properties:
+ minversion: '13.0.0'
+ dependencies:
+ - asterisk : 'app_dial'
+ - asterisk : 'func_channel'
+ tags:
+ - accountcode
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/local_crossover_back/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/tests.yaml?view=diff&rev=5287&r1=5286&r2=5287
==============================================================================
--- asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/tests.yaml (original)
+++ asterisk/team/rmudgett/cel_accountcode/tests/pbx/accountcode/tests.yaml Mon Jul 21 15:29:29 2014
@@ -7,7 +7,8 @@
- test: 'dial_straight_none'
- test: 'dial_straight_override'
#BUGBUG to be completed
- #- test: 'local_crossover'
+ - test: 'local_crossover'
+ - test: 'local_crossover_back'
#- test: 'local_originate'
#- test: 'local_originate_back'
- test: 'queue_none'
More information about the asterisk-commits
mailing list