[Asterisk-code-review] rtcp: Add PJSIP tests for RTCP-MUX support. (testsuite[master])

Joshua Colp asteriskteam at digium.com
Tue Mar 14 11:55:15 CDT 2017


Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/5193 )

Change subject: rtcp: Add PJSIP tests for RTCP-MUX support.
......................................................................

rtcp: Add PJSIP tests for RTCP-MUX support.

This adds tests for the various RTCP-MUX configuration
possibilities and confirms that the flow of the underlying
RTCP matches what is expected for the specific case. This
includes tests which use ICE to determine the route to use.

The tests work by limiting the ports in use by the
res_rtp_asterisk module such that they are always
predictable. This allows us to determine using the
RTCPReceived AMI events the source and target ports
for RTCP traffic based on the various configurations.

ASTERISK-26732

Change-Id: I8d5624a83a7bf9d153196c4fbd402e3f7df4a599
---
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_callee/tests.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_caller/tests.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_disabled/tests.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/extensions.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/pjsip.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/rtp.conf
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/test-config.yaml
A tests/channels/pjsip/rtcp/rtcp_mux_enabled/tests.yaml
A tests/channels/pjsip/rtcp/tests.yaml
M tests/channels/pjsip/tests.yaml
62 files changed, 1,115 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/93/5193/1

diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..9e3c031
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/pjsip.conf
@@ -0,0 +1,19 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/rtp.conf
new file mode 100644
index 0000000..7f10b8d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast1/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=10000
+rtpend=10002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..20f639b
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/pjsip.conf
@@ -0,0 +1,24 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/rtp.conf
new file mode 100644
index 0000000..d46d21b
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/configs/ast2/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=11000
+rtpend=11002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/test-config.yaml
new file mode 100644
index 0000000..3305064
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/direct/test-config.yaml
@@ -0,0 +1,62 @@
+testinfo:
+    summary:     'Tests RTCP with mux disabled for caller and enabled for callee'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX disabled on the caller and enabled on the callee. In this
+        scenario RTCP-MUX should not be used. The test confirms that RTCP
+        traffic flows appropriately.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10001$'
+                    From: '^(.*)11001$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11001$'
+                    From: '^(.*)10001$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..8f2d9eb
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/pjsip.conf
@@ -0,0 +1,20 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/rtp.conf
new file mode 100644
index 0000000..776527e
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast1/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=10000
+rtpend=10002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..499d6e4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/pjsip.conf
@@ -0,0 +1,25 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/rtp.conf
new file mode 100644
index 0000000..874b784
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/configs/ast2/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=11000
+rtpend=11002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/test-config.yaml
new file mode 100644
index 0000000..57455d0
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/ice/test-config.yaml
@@ -0,0 +1,63 @@
+testinfo:
+    summary:     'Tests RTCP with mux disabled for caller and enabled for callee using ICE'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX disabled on the caller and enabled on the callee. In this
+        scenario RTCP-MUX should not be used. The test confirms that RTCP
+        traffic flows appropriately.
+        ICE negotiation is also done to figure out the route to use between the two.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10001$'
+                    From: '^(.*)11001$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11001$'
+                    From: '^(.*)10001$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_callee/tests.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_callee/tests.yaml
new file mode 100644
index 0000000..f587a6f
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_callee/tests.yaml
@@ -0,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'direct'
+    - test: 'ice'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..8124756
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/pjsip.conf
@@ -0,0 +1,19 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/rtp.conf
new file mode 100644
index 0000000..7f10b8d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast1/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=10000
+rtpend=10002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..dd78386
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/pjsip.conf
@@ -0,0 +1,24 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/rtp.conf
new file mode 100644
index 0000000..d46d21b
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/configs/ast2/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=11000
+rtpend=11002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/test-config.yaml
new file mode 100644
index 0000000..8a52e6a
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/direct/test-config.yaml
@@ -0,0 +1,62 @@
+testinfo:
+    summary:     'Tests RTCP with mux enabled for caller and disabled for callee'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX enabled on the caller and disabled on the callee. In this
+        scenario RTCP-MUX should not be used. The test confirms that RTCP
+        traffic flows appropriately.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10001$'
+                    From: '^(.*)11001$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11001$'
+                    From: '^(.*)10001$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..57f1e7e
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/pjsip.conf
@@ -0,0 +1,20 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/rtp.conf
new file mode 100644
index 0000000..776527e
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast1/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=10000
+rtpend=10002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..dc4fcb8
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/pjsip.conf
@@ -0,0 +1,25 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/rtp.conf
new file mode 100644
index 0000000..874b784
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/configs/ast2/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=11000
+rtpend=11002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/test-config.yaml
new file mode 100644
index 0000000..79f149d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/ice/test-config.yaml
@@ -0,0 +1,63 @@
+testinfo:
+    summary:     'Tests RTCP with mux enabled for caller and disabled for callee using ICE'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX enabled on the caller and disabled on the callee. In this
+        scenario RTCP-MUX should not be used. The test confirms that RTCP
+        traffic flows appropriately.
+        ICE negotiation is also done to figure out the route to use between the two.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10001$'
+                    From: '^(.*)11001$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11001$'
+                    From: '^(.*)10001$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_caller/tests.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_caller/tests.yaml
new file mode 100644
index 0000000..f587a6f
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_caller/tests.yaml
@@ -0,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'direct'
+    - test: 'ice'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..9e3c031
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/pjsip.conf
@@ -0,0 +1,19 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/rtp.conf
new file mode 100644
index 0000000..7f10b8d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast1/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=10000
+rtpend=10002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..dd78386
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/pjsip.conf
@@ -0,0 +1,24 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/rtp.conf
new file mode 100644
index 0000000..d46d21b
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/configs/ast2/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=11000
+rtpend=11002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/test-config.yaml
new file mode 100644
index 0000000..7eb7d51
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/direct/test-config.yaml
@@ -0,0 +1,60 @@
+testinfo:
+    summary:     'Tests RTCP with mux disabled for both caller and callee'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX disabled and confirms that RTCP traffic flows appropriately.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10001$'
+                    From: '^(.*)11001$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11001$'
+                    From: '^(.*)10001$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..8f2d9eb
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/pjsip.conf
@@ -0,0 +1,20 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/rtp.conf
new file mode 100644
index 0000000..776527e
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast1/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=10000
+rtpend=10002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..dc4fcb8
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/pjsip.conf
@@ -0,0 +1,25 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=no
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/rtp.conf
new file mode 100644
index 0000000..874b784
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/configs/ast2/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=11000
+rtpend=11002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/test-config.yaml
new file mode 100644
index 0000000..5230184
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/ice/test-config.yaml
@@ -0,0 +1,61 @@
+testinfo:
+    summary:     'Tests RTCP with mux disabled for both caller and callee using ICE'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX disabled and confirms that RTCP traffic flows appropriately.
+        ICE negotiation is also done to figure out the route to use between the two.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10001$'
+                    From: '^(.*)11001$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11001$'
+                    From: '^(.*)10001$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_disabled/tests.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/tests.yaml
new file mode 100644
index 0000000..f587a6f
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_disabled/tests.yaml
@@ -0,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'direct'
+    - test: 'ice'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..8124756
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/pjsip.conf
@@ -0,0 +1,19 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/rtp.conf
new file mode 100644
index 0000000..7f10b8d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast1/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=10000
+rtpend=10002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..20f639b
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/pjsip.conf
@@ -0,0 +1,24 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/rtp.conf
new file mode 100644
index 0000000..d46d21b
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/configs/ast2/rtp.conf
@@ -0,0 +1,3 @@
+[general]
+rtpstart=11000
+rtpend=11002
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/test-config.yaml
new file mode 100644
index 0000000..0e29e69
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/direct/test-config.yaml
@@ -0,0 +1,60 @@
+testinfo:
+    summary:     'Tests RTCP with mux enabled for both caller and callee'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX enabled and confirms that RTCP traffic flows appropriately.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10000$'
+                    From: '^(.*)11000$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11000$'
+                    From: '^(.*)10000$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/extensions.conf
new file mode 100644
index 0000000..eabe04d
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/extensions.conf
@@ -0,0 +1,15 @@
+
+[default]
+
+; -- Audio Source --
+
+exten => playback,1,NoOp()
+ same => n,Answer()
+ same => n,Playback(tt-monkeys)
+ same => n,Hangup()
+
+; -- Sender --
+
+exten => 1000,1,NoOp()
+ same => n,Dial(PJSIP/ast2)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..57f1e7e
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/pjsip.conf
@@ -0,0 +1,20 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1:5060
+protocol=udp
+
+[ast2]
+type=aor
+contact=sip:ast2 at 127.0.0.2:5060
+
+[ast2]
+type=endpoint
+aors=ast2
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/rtp.conf
new file mode 100644
index 0000000..776527e
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast1/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=10000
+rtpend=10002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/extensions.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/extensions.conf
new file mode 100644
index 0000000..f9f41a4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/extensions.conf
@@ -0,0 +1,9 @@
+
+[default]
+
+; -- Receiver --
+
+exten => ast2,1,NoOp()
+ same => n,Answer()
+ same => n,Wait(10)
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/pjsip.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/pjsip.conf
new file mode 100644
index 0000000..499d6e4
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/pjsip.conf
@@ -0,0 +1,25 @@
+[global]
+debug=yes
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.2:5060
+protocol=udp
+
+[ast1]
+type=identify
+endpoint=ast1
+match=127.0.0.1
+
+[ast1]
+type=aor
+contact=sip:ast1 at 127.0.0.1:5060
+
+[ast1]
+type=endpoint
+aors=ast1
+context=default
+allow=!all,ulaw,alaw
+direct_media=no
+rtcp_mux=yes
+ice_support=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/rtp.conf b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/rtp.conf
new file mode 100644
index 0000000..874b784
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/configs/ast2/rtp.conf
@@ -0,0 +1,4 @@
+[general]
+rtpstart=11000
+rtpend=11002
+icesupport=yes
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/test-config.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/test-config.yaml
new file mode 100644
index 0000000..0ed2dde
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/ice/test-config.yaml
@@ -0,0 +1,61 @@
+testinfo:
+    summary:     'Tests RTCP with mux enabled for both caller and callee using ICE'
+    description: |
+        This test places a call from one Asterisk instance to another with
+        RTCP-MUX enabled and confirms that RTCP traffic flows appropriately.
+        ICE negotiation is also done to figure out the route to use between the two.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'test_case.TestCaseModule'
+    modules:
+        -
+            config-section: ami-config
+            typename: 'pluggable_modules.EventActionModule'
+        -
+            typename: 'pluggable_modules.Originator'
+            config-section: originator-config
+        -
+            config-section: 'hangup-monitor'
+            typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+    asterisk-instances: 2
+    connect-ami: True
+
+ami-config:
+    -
+        ami-events:
+            id: '0'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)10000$'
+                    From: '^(.*)11000$'
+            count: '>0'
+    -
+        ami-events:
+            id: '1'
+            conditions:
+                match:
+                    Event: 'RTCPReceived'
+                    To: '^(.*)11000$'
+                    From: '^(.*)10000$'
+            count: '>0'
+
+hangup-monitor:
+    ids: '0'
+
+originator-config:
+    channel: 'Local/1000 at default'
+    exten: 'playback'
+    context: 'default'
+    priority: 1
+    async: True
+    trigger: 'ami_connect'
+
+properties:
+    minversion: '13.15.0'
+    dependencies:
+        - asterisk : 'res_pjsip'
diff --git a/tests/channels/pjsip/rtcp/rtcp_mux_enabled/tests.yaml b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/tests.yaml
new file mode 100644
index 0000000..f587a6f
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/rtcp_mux_enabled/tests.yaml
@@ -0,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'direct'
+    - test: 'ice'
diff --git a/tests/channels/pjsip/rtcp/tests.yaml b/tests/channels/pjsip/rtcp/tests.yaml
new file mode 100644
index 0000000..623d318
--- /dev/null
+++ b/tests/channels/pjsip/rtcp/tests.yaml
@@ -0,0 +1,6 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - dir: 'rtcp_mux_enabled'
+    - dir: 'rtcp_mux_disabled'
+    - dir: 'rtcp_mux_caller'
+    - dir: 'rtcp_mux_callee'
diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml
index 086a61a..a5b0a21 100644
--- a/tests/channels/pjsip/tests.yaml
+++ b/tests/channels/pjsip/tests.yaml
@@ -16,6 +16,7 @@
     - dir: 'registration'
     - dir: 'resolver'
     - dir: 'rtp'
+    - dir: 'rtcp'
     - dir: 'sdp_offer_answer'
     - dir: 'statsd'
     - dir: 'subscriptions'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d5624a83a7bf9d153196c4fbd402e3f7df4a599
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list