[asterisk-commits] mjordan: testsuite/asterisk/trunk r5243 - in /asterisk/trunk/tests/channels/p...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 16 09:06:14 CDT 2014


Author: mjordan
Date: Wed Jul 16 09:06:09 2014
New Revision: 5243

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5243
Log:
channels/pjsip/accountcode: Add test for setting default accountcode

This adds a test that verifies the 'accountcode' setting for PJSIP endpoints.
A PJSIP channel is created associated with an endpoint with the accountcode
setting; the test verifies that the channel has the accountcode set on it
during creation.

Review: https://reviewboard.asterisk.org/r/3725/

ASTERISK-24000

Added:
    asterisk/trunk/tests/channels/pjsip/accountcode/
    asterisk/trunk/tests/channels/pjsip/accountcode/configs/
    asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/tests.yaml

Added: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf?view=auto&rev=5243
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf Wed Jul 16 09:06:09 2014
@@ -1,0 +1,9 @@
+[default]
+
+exten => dial_alice,1,NoOp()
+ same => n,Dial(PJSIP/alice)
+ same => n,Hangup()
+
+exten => alice,1,NoOp()
+ same => n,Answer()
+ same => n,Hangup()

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf?view=auto&rev=5243
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf Wed Jul 16 09:06:09 2014
@@ -1,0 +1,22 @@
+[local-transport]
+type=transport
+bind=127.0.0.1
+protocol=udp
+
+[alice]
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+transport=local-transport
+aors=alice
+accountcode=alice1234
+
+[alice-identify]
+type=identify
+endpoint=alice
+match=127.0.0.1
+
+[alice]
+type=aor
+contact=sip:alice at 127.0.0.1:5060\;transport=udp
+

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml?view=auto&rev=5243
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml Wed Jul 16 09:06:09 2014
@@ -1,0 +1,46 @@
+testinfo:
+    summary:     'Test that a PJSIP channel can be assigned an accountcode'
+    description: |
+        'This test dials a PJSIP channel associated with endpoint alice,
+        where alice has a default accountcode associated with her endpoint.
+        The test verifies that the channel has the accountcode specified
+        by the endpoint configuration.'
+
+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/dial_alice at default'
+            application: 'Echo'
+            async: True
+
+ami-config:
+    # Alice events
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'Newchannel'
+                Channel: 'PJSIP/alice-.*'
+        requirements:
+            match:
+                AccountCode: 'alice1234'
+        count: '2'
+
+properties:
+    minversion: '12.5.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
+        - accountcode

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/accountcode/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/channels/pjsip/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/tests.yaml?view=diff&rev=5243&r1=5242&r2=5243
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Wed Jul 16 09:06:09 2014
@@ -23,3 +23,4 @@
     - test: 'info_dtmf'
     - test: 'call_pickup'
     - dir: 'video_calls'
+    - test: 'accountcode'




More information about the asterisk-commits mailing list