[asterisk-commits] rmudgett: testsuite/asterisk/trunk r6557 - in /asterisk/trunk/tests/channels/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 24 14:45:02 CDT 2015


Author: rmudgett
Date: Tue Mar 24 14:44:59 2015
New Revision: 6557

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6557
Log:
testsuite: Add PJSIP test for new rpid_immediate option.

Test the rpid_immediate option when enabled and disabled.

ASTERISK-24781
Reported by: Richard Mudgett

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

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

Added: asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/extensions.conf?view=auto&rev=6557
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/extensions.conf Tue Mar 24 14:44:59 2015
@@ -1,0 +1,26 @@
+[default]
+
+exten => s,1,NoOp()
+same => n,Dial(PJSIP/alice,,g)
+same => n,GotoIf($["${DIALSTATUS}"="ANSWER"]?:failed)
+same => n,Dial(PJSIP/bob)
+same => n(failed),Hangup()
+
+; The waits below are necessary.  If the connected line data
+; is updated before PJSIP has a chance to send a message out
+; containing the previous data then the message goes out
+; with the new data instead.  This is not a bug.
+;
+exten => alice,1,NoOp()
+
+exten => bob,1,NoOp()
+
+exten => _[ab].,2,NoOp()
+same => n,Set(CONNECTEDLINE(all)="Immediate ${EXTEN}" <1234>)
+same => n,Wait(2)
+same => n,Set(CONNECTEDLINE(all)="Ringing ${EXTEN}" <5678>)
+same => n,Ringing()
+same => n,Wait(2)
+same => n,Set(CONNECTEDLINE(all)="Answer ${EXTEN}" <9012>)
+same => n,Answer()
+same => n,Hangup()

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/pjsip.conf?view=auto&rev=6557
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/rpid_immediate/configs/ast1/pjsip.conf Tue Mar 24 14:44:59 2015
@@ -1,0 +1,35 @@
+[local-transport]
+type=transport
+bind=127.0.0.1
+protocol=udp
+
+[my_endpoint](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+identify_by=username
+send_rpid=yes
+trust_id_inbound=yes
+trust_id_outbound=yes
+
+
+[alice](my_endpoint)
+callerid="Cfg alice" <3456>
+rpid_immediate=yes
+aors=alice
+from_user=alice
+
+[alice]
+type=aor
+contact=sip:alice at 127.0.0.1:5060
+
+
+[bob](my_endpoint)
+callerid="Cfg bob" <3456>
+rpid_immediate=no
+aors=bob
+from_user=bob
+
+[bob]
+type=aor
+contact=sip:bob at 127.0.0.1:5060

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/rpid_immediate/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/rpid_immediate/test-config.yaml?view=auto&rev=6557
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/rpid_immediate/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/rpid_immediate/test-config.yaml Tue Mar 24 14:44:59 2015
@@ -1,0 +1,136 @@
+testinfo:
+    summary:     'Tests the PJSIP rpid_immediate option'
+    description: |
+        'Tests if connected line is immediately sent back to the caller
+        before answering if rpid_immediate is enabled or not if disabled.'
+
+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/s at default'
+            application: 'Echo'
+
+ami-config:
+    -
+        # rpid_immediate is enabled for alice
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: '.*alice'
+        count: '4'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Cfg alice'
+        requirements:
+            match:
+                ConnectedLineNum: '3456'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Immediate alice'
+        requirements:
+            match:
+                ConnectedLineNum: '1234'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Ringing alice'
+        requirements:
+            match:
+                ConnectedLineNum: '5678'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Answer alice'
+        requirements:
+            match:
+                ConnectedLineNum: '9012'
+        count: '1'
+    -
+        # rpid_immediate is disabled for bob
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: '.*bob'
+        count: '3'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Cfg bob'
+        requirements:
+            match:
+                ConnectedLineNum: '3456'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Ringing bob'
+        requirements:
+            match:
+                ConnectedLineNum: '5678'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default-.*;2'
+                ConnectedLineName: 'Answer bob'
+        requirements:
+            match:
+                ConnectedLineNum: '9012'
+        count: '1'
+
+properties:
+    minversion: '13.4.0'
+    dependencies:
+        - python: 'twisted'
+        - python: 'starpy'
+        - asterisk: 'app_dial'
+        - asterisk: 'app_echo'
+        - asterisk: 'func_callerid'
+        - asterisk: 'chan_pjsip'
+        - asterisk: 'res_pjsip'
+        - asterisk: 'res_pjsip_caller_id'
+        - asterisk: 'res_pjsip_endpoint_identifier_user'
+        - asterisk: 'res_pjsip_sdp_rtp'
+        - asterisk: 'res_pjsip_session'
+    tags:
+        - pjsip

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

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

Propchange: asterisk/trunk/tests/channels/pjsip/rpid_immediate/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=6557&r1=6556&r2=6557
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Tue Mar 24 14:44:59 2015
@@ -34,3 +34,4 @@
     - test: 'user_eq_phone'
     - test: 'keep_alive'
     - test: 'endpoint_identify'
+    - test: 'rpid_immediate'




More information about the asterisk-commits mailing list