[asterisk-commits] Update some dial tests to check for the Linkedid header. (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 26 10:58:56 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: Update some dial tests to check for the Linkedid header.
......................................................................


Update some dial tests to check for the Linkedid header.

Update the following tests to check for the Linkedid header in the
DialBegin/DialEnd events after v13.5.0:

tests/apps/dial/dial_answer/
tests/apps/dial/dial_busy/
tests/apps/dial/dial_parallel/dial_parallel_answer_cancel/

* Added missing test module dependencies.

ASTERISK-25189
Reported by: John Hardin

Change-Id: Ia0b1dfd4ab998e7ad0ef052a45dfeca90f98718a
---
M tests/apps/dial/dial_answer/test-config.yaml
M tests/apps/dial/dial_busy/test-config.yaml
M tests/apps/dial/dial_parallel/dial_parallel_answer_cancel/test-config.yaml
3 files changed, 255 insertions(+), 0 deletions(-)

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



diff --git a/tests/apps/dial/dial_answer/test-config.yaml b/tests/apps/dial/dial_answer/test-config.yaml
index 92ec9ba..d365b60 100644
--- a/tests/apps/dial/dial_answer/test-config.yaml
+++ b/tests/apps/dial/dial_answer/test-config.yaml
@@ -9,7 +9,14 @@
         - python : 'twisted'
         - python : 'starpy'
         - app : 'sipp'
+        - asterisk : 'app_dial'
+        - asterisk : 'app_echo'
+        - asterisk : 'app_stack'
+        - asterisk : 'app_userevent'
         - asterisk : 'chan_sip'
+        - asterisk : 'func_channel'
+        - asterisk : 'func_hangupcause'
+        - asterisk : 'func_strings'
     tags:
         - SIP
         - dial
@@ -31,7 +38,12 @@
             typename: 'cdr.CDRModule'
         -
             minversion: '12.0.0'
+            maxversion: '13.5.0'
             config-section: ami-config-12
+            typename: 'ami.AMIEventModule'
+        -
+            minversion: '13.5.0'
+            config-section: ami-config-13-5
             typename: 'ami.AMIEventModule'
         -
             config-section: originator-config
@@ -131,6 +143,61 @@
                 DialStatus: 'ANSWER'
         count: '1'
 
+# Add Uniqueid/Linkedid/DestUniqueid/DestLinkedid header requirements
+# to the DialBegin/DialEnd events over the ami-config-12 version.
+#
+ami-config-13-5:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'HangupCause'
+                HangupChannel: 'SIP/charlie-.*'
+        requirements:
+            match:
+                TechCause: 'SIP 200 OK'
+                AsteriskCause: 'Normal Clearing'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialBegin'
+                DestChannel: 'SIP/charlie-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                DialString: 'charlie'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialEnd'
+                DestChannel: 'SIP/charlie-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                DialStatus: 'ANSWER'
+        count: '1'
+
 originator-config:
     channel: 'Local/s at default'
     application: 'Echo'
diff --git a/tests/apps/dial/dial_busy/test-config.yaml b/tests/apps/dial/dial_busy/test-config.yaml
index c7ba763..3073a9b 100644
--- a/tests/apps/dial/dial_busy/test-config.yaml
+++ b/tests/apps/dial/dial_busy/test-config.yaml
@@ -9,7 +9,13 @@
         - python : 'twisted'
         - python : 'starpy'
         - app : 'sipp'
+        - asterisk : 'app_dial'
+        - asterisk : 'app_echo'
+        - asterisk : 'app_stack'
+        - asterisk : 'app_userevent'
         - asterisk : 'chan_sip'
+        - asterisk : 'func_channel'
+        - asterisk : 'func_strings'
     tags:
         - SIP
         - dial
@@ -31,7 +37,12 @@
             typename: 'cdr.CDRModule'
         -
             minversion: '12.0.0'
+            maxversion: '13.5.0'
             config-section: ami-config-12
+            typename: 'ami.AMIEventModule'
+        -
+            minversion: '13.5.0'
+            config-section: ami-config-13-5
             typename: 'ami.AMIEventModule'
         -
             config-section: originator-config
@@ -115,6 +126,61 @@
                 DialStatus: 'BUSY'
         count: '1'
 
+# Add Linkedid/DestLinkedid header requirements
+# to the DialBegin/DialEnd events over the ami-config-12 version.
+#
+ami-config-13-5:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'HangupCause'
+        requirements:
+            match:
+                HangupChannel: 'SIP/bob-.*'
+                TechCause: 'SIP 486 Busy Here'
+                AsteriskCause: 'User busy'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialBegin'
+                DestChannel: 'SIP/bob-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                Dialstring: 'bob'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialEnd'
+                DestChannel: 'SIP/bob-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                DialStatus: 'BUSY'
+        count: '1'
+
 originator-config:
     channel: 'Local/s at default'
     application: 'Echo'
diff --git a/tests/apps/dial/dial_parallel/dial_parallel_answer_cancel/test-config.yaml b/tests/apps/dial/dial_parallel/dial_parallel_answer_cancel/test-config.yaml
index 415197e..ab257f2 100644
--- a/tests/apps/dial/dial_parallel/dial_parallel_answer_cancel/test-config.yaml
+++ b/tests/apps/dial/dial_parallel/dial_parallel_answer_cancel/test-config.yaml
@@ -10,7 +10,15 @@
         - python : 'twisted'
         - python : 'starpy'
         - app : 'sipp'
+        - asterisk : 'app_cdr'
+        - asterisk : 'app_dial'
+        - asterisk : 'app_echo'
+        - asterisk : 'app_stack'
+        - asterisk : 'app_userevent'
         - asterisk : 'chan_sip'
+        - asterisk : 'func_channel'
+        - asterisk : 'func_hangupcause'
+        - asterisk : 'func_strings'
     tags:
         - SIP
         - dial
@@ -37,7 +45,12 @@
             typename: 'ami.AMIEventModule'
         -
             minversion: '12.0.0'
+            maxversion: '13.5.0'
             config-section: ami-config-12
+            typename: 'ami.AMIEventModule'
+        -
+            minversion: '13.5.0'
+            config-section: ami-config-13-5
             typename: 'ami.AMIEventModule'
         -
             config-section: originator-config
@@ -143,6 +156,8 @@
         requirements:
             match:
                 Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                DestUniqueid: '.*'
                 CallerIDNum: '<unknown>'
                 CallerIDName: '<unknown>'
                 ConnectedLineNum: '<unknown>'
@@ -158,6 +173,8 @@
         requirements:
             match:
                 Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                DestUniqueid: '.*'
                 CallerIDNum: '<unknown>'
                 CallerIDName: '<unknown>'
                 ConnectedLineNum: '<unknown>'
@@ -199,6 +216,111 @@
                 DialStatus: 'ANSWER'
         count: '1'
 
+# Add Linkedid/DestLinkedid header requirements
+# to the DialBegin/DialEnd events over the ami-config-12 version.
+#
+ami-config-13-5:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'HangupCause'
+                HangupChannel: 'SIP/bob-.*'
+        requirements:
+            match:
+                TechCause: 'SIP 180 Ringing'
+                AsteriskCause: 'Normal Clearing'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'UserEvent'
+                UserEvent: 'HangupCause'
+                HangupChannel: 'SIP/charlie-.*'
+        requirements:
+            match:
+                TechCause: 'SIP 200 OK'
+                AsteriskCause: 'Normal Clearing'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialBegin'
+                DestChannel: 'SIP/bob-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                Dialstring: 'bob'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialBegin'
+                DestChannel: 'SIP/charlie-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                Dialstring: 'charlie'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialEnd'
+                DestChannel: 'SIP/bob-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                DialStatus: 'CANCEL'
+        count: '1'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'DialEnd'
+                DestChannel: 'SIP/charlie-.*'
+        requirements:
+            match:
+                Channel: 'Local/s at default-.*'
+                Uniqueid: '.*'
+                Linkedid: '.*'
+                DestUniqueid: '.*'
+                DestLinkedid: '.*'
+                CallerIDNum: '<unknown>'
+                CallerIDName: '<unknown>'
+                ConnectedLineNum: '<unknown>'
+                ConnectedLineName: '<unknown>'
+                DialStatus: 'ANSWER'
+        count: '1'
+
 originator-config:
     channel: 'Local/s at default'
     context: 'default'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0b1dfd4ab998e7ad0ef052a45dfeca90f98718a
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list