[Asterisk-code-review] testsuite: Update a few pjsip tests to use new ContactStatus... (testsuite[master])

Mark Michelson asteriskteam at digium.com
Wed May 27 13:33:58 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: testsuite: Update a few pjsip tests to use new ContactStatus AMI event
......................................................................


testsuite: Update a few pjsip tests to use new ContactStatus AMI event

In order to exercise the new ContactStatus event in 13.5.0, the
following pjsip tests were updated to use the new event instead
of the original TestEvent events.  The TestEvents are still
used for pre-13.5.

ami/show_registrations/inbound
qualify/basic
qualify/max_initial_qualify_time
qualify_qualify_timeout

ASTERISK-25114

Change-Id: Id25aae5f7122facba183273efb3e8f36c20fb61e
---
M tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml
M tests/channels/pjsip/qualify/basic/test-config.yaml
M tests/channels/pjsip/qualify/max_initial_qualify_time/test-config.yaml
M tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml
4 files changed, 132 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved; Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml b/tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml
index 6698dcf..d589c27 100644
--- a/tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml
+++ b/tests/channels/pjsip/ami/show_registrations_inbound/test-config.yaml
@@ -22,7 +22,12 @@
     modules:
         -
             minversion: '12.0.0'
+            maxversion: '13.5.0'
             config-section: 'ami-config'
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            minversion: '13.5.0'
+            config-section: 'ami-config-13.5'
             typename: 'pluggable_modules.EventActionModule'
 
 sipp-config:
@@ -100,3 +105,71 @@
                     ListItems: '2'
             count: 1
         stop_test:
+
+ami-config-13.5:
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'ContactStatus'
+                    ContactStatus: 'Created'
+            requirements:
+                match:
+                    AOR: 'user1'
+            count: '>1'
+        ami-actions:
+            action:
+                Action: 'PJSIPShowRegistrationsInbound'
+                ActionID: '12345'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'InboundRegistrationDetail'
+                    Contacts: user1/sip:user1 at 127.0.0.1:5061
+            requirements:
+                match:
+                    ActionID: '12345'
+                    ObjectType: 'aor'
+                    ObjectName: 'user.*'
+                    Mailboxes: ''
+                    RemoveExisting: 'false'
+                    MaxContacts: '1'
+                    AuthenticateQualify: 'false'
+                    QualifyFrequency: '0'
+                    DefaultExpiration: '3600'
+                    MaximumExpiration: '7200'
+                    MinimumExpiration: '60'
+            count: '>1'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'InboundRegistrationDetail'
+                    Contacts: user2/sip:user2 at 127.0.0.1:5062
+            requirements:
+                match:
+                    ActionID: '12345'
+                    ObjectType: 'aor'
+                    ObjectName: 'user.*'
+                    Mailboxes: ''
+                    RemoveExisting: 'false'
+                    MaxContacts: '1'
+                    AuthenticateQualify: 'false'
+                    QualifyFrequency: '0'
+                    DefaultExpiration: '3600'
+                    MaximumExpiration: '7200'
+                    MinimumExpiration: '60'
+            count: '>1'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'InboundRegistrationDetailComplete'
+            requirements:
+                match:
+                    ActionID: '12345'
+                    EventList: 'Complete'
+                    ListItems: '2'
+            count: '>1'
+        stop_test:
diff --git a/tests/channels/pjsip/qualify/basic/test-config.yaml b/tests/channels/pjsip/qualify/basic/test-config.yaml
index 29d165e..10a650a 100644
--- a/tests/channels/pjsip/qualify/basic/test-config.yaml
+++ b/tests/channels/pjsip/qualify/basic/test-config.yaml
@@ -10,7 +10,13 @@
         typename: 'sipp.SIPpTestCase'
     modules:
         -
+            minversion: '13.4.0'
+            maxversion: '13.5.0'
             config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+        -
+            minversion: '13.5.0'
+            config-section: 'ami-config-13.5'
             typename: 'ami.AMIEventModule'
 
 test-object-config:
@@ -47,6 +53,19 @@
                 Contact: 'sipp@@sip:127.0.0.1:5061'
         count: '1'
 
+ami-config-13.5:
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'ContactStatus'
+                ContactStatus: 'Reachable'
+        requirements:
+            match:
+                URI: 'sip:127.0.0.1:5061'
+        count: '>1'
+
 properties:
     minversion: '13.4.0'
     dependencies:
diff --git a/tests/channels/pjsip/qualify/max_initial_qualify_time/test-config.yaml b/tests/channels/pjsip/qualify/max_initial_qualify_time/test-config.yaml
index 9969ee5..ca6cd90 100644
--- a/tests/channels/pjsip/qualify/max_initial_qualify_time/test-config.yaml
+++ b/tests/channels/pjsip/qualify/max_initial_qualify_time/test-config.yaml
@@ -11,7 +11,13 @@
         typename: 'sipp.SIPpTestCase'
     modules:
         -
+            minversion: '13.4.0'
+            maxversion: '13.5.0'
             config-section: 'ami-config'
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            minversion: '13.5.0'
+            config-section: 'ami-config-13.5'
             typename: 'pluggable_modules.EventActionModule'
 
 test-object-config:
@@ -50,6 +56,21 @@
             count: '1'
         stop_test:
 
+ami-config-13.5:
+    -
+        ami-start:
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'ContactStatus'
+                    ContactStatus: 'Reachable'
+            requirements:
+                match:
+                    URI: 'sip:127.0.0.1:5061'
+            count: '>1'
+        stop_test:
+
 properties:
     minversion: '13.4.0'
     dependencies:
diff --git a/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml b/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml
index 804e240..eebd158 100644
--- a/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml
+++ b/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml
@@ -10,7 +10,13 @@
         typename: 'sipp.SIPpTestCase'
     modules:
         -
+            minversion: '13.4.0'
+            maxversion: '13.5.0'
             config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+        -
+            minversion: '13.5.0'
+            config-section: 'ami-config-13.5'
             typename: 'ami.AMIEventModule'
 
 test-object-config:
@@ -36,6 +42,19 @@
                 RTT: '0'
         count: '1'
 
+ami-config-13.5:
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'ContactStatus'
+                ContactStatus: 'Unreachable'
+        requirements:
+            match:
+                URI: 'sip:127.0.0.1:5061'
+        count: '>1'
+
 properties:
     minversion: '13.4.0'
     dependencies:

-- 
To view, visit https://gerrit.asterisk.org/539
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie061620100ec2630326a8573e1a6cc70a479ec15
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list