[Asterisk-code-review] bob does not exist: Set originate timeout to longer than SIP... (testsuite[master])

Anonymous Coward asteriskteam at digium.com
Thu Oct 15 14:50:29 CDT 2015


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: bob_does_not_exist: Set originate timeout to longer than SIP Timer B.
......................................................................


bob_does_not_exist: Set originate timeout to longer than SIP Timer B.

Fix the test to actually test that cleanup happens when SIP Timer B
expires.

Change-Id: I15c3e533adbc84e1c422c394fb5049e6d1496313
---
M tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/configs/ast1/extensions.conf
M tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml
2 files changed, 53 insertions(+), 19 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/configs/ast1/extensions.conf b/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/configs/ast1/extensions.conf
index 669513b..cc8e107 100644
--- a/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/configs/ast1/extensions.conf
@@ -4,11 +4,17 @@
 exten => bob-ipv6-udp,1,Dial(PJSIP/bob-ipv6-udp)
 exten => bob-ipv6-tcp,1,Dial(PJSIP/bob-ipv6-tcp)
 
-exten => playback,1,Answer()
-same => n,Wait(1)
-same => n,Playback(tt-weasels)
-same => n,Wait(2)
+; So we do not do a dialplan "Auto fallthrough" after Dial
+; which alters the hangup cause based upon the DIALSTATUS
+; value.
+exten => _bob.,2,UserEvent(AfterDial)
 same => n,Hangup()
 
-exten => h,1,UserEvent(DIALSTATUS, Result: ${DIALSTATUS})
+; These calls should never get answered.
+exten => answered,1,NoOp()
+same => n,UserEvent(Answered)
+same => n,Hangup()
+
+exten => h,1,UserEvent(DIALSTATUS,Result: ${DIALSTATUS})
+same => n,Hangup()
 
diff --git a/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml b/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml
index c5950e8..5c93a67 100644
--- a/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml
+++ b/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml
@@ -4,7 +4,7 @@
         'Run one instance of Asterisk ("UUT") and originate an outgoing call to
          SIPp ("Bob"). Bob does not respond to the INVITE. This ensures that
          Asterisk tears down the calls after the default value of timer B
-         expires. This is performed using ipv4/ipv6 & udp/tcp.'
+         (32 seconds) expires. This is performed using ipv4/ipv6 & udp/tcp.'
 
 test-modules:
     test-object:
@@ -45,8 +45,9 @@
     id: '0'
     channel: 'local/bob-ipv4-udp at default'
     context: 'default'
-    exten: 'playback'
+    exten: 'answered'
     priority: '1'
+    timeout: 40
     async: 'True'
 
 originator-config-ipv4-tcp:
@@ -56,8 +57,9 @@
     id: '0'
     channel: 'local/bob-ipv4-tcp at default'
     context: 'default'
-    exten: 'playback'
+    exten: 'answered'
     priority: '1'
+    timeout: 40
     async: 'True'
 
 originator-config-ipv6-udp:
@@ -67,8 +69,9 @@
     id: '0'
     channel: 'local/bob-ipv6-udp at default'
     context: 'default'
-    exten: 'playback'
+    exten: 'answered'
     priority: '1'
+    timeout: 40
     async: 'True'
 
 originator-config-ipv6-tcp:
@@ -78,8 +81,9 @@
     id: '0'
     channel: 'local/bob-ipv6-tcp at default'
     context: 'default'
-    exten: 'playback'
+    exten: 'answered'
     priority: '1'
+    timeout: 40
     async: 'True'
 
 ami-config:
@@ -89,17 +93,31 @@
             conditions:
                 match:
                     Event: 'UserEvent'
+                    UserEvent: 'AfterDial'
+            count: '4'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'UserEvent'
+                    UserEvent: 'Answered'
+            count: '0'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'UserEvent'
                     UserEvent: 'DIALSTATUS'
             requirements:
                 match:
-                    Result: 'CANCEL'
+                    Result: 'CHANUNAVAIL'
             count: '4'
     -
         ami-events:
             conditions:
                 match:
                     Event: 'SoftHangupRequest'
-                    Channel: 'Local/bob-*'
+                    Channel: 'Local/bob-.*'
             requirements:
                 match:
                     Cause: '16'
@@ -109,31 +127,41 @@
             conditions:
                 match:
                     Event: 'HangupRequest'
-                    Channel: 'Local/bob-*'
+                    Channel: 'Local/bob-.*'
             requirements:
                 match:
-                    Cause: '0'
+                    Cause: '18'
             count: '4'
     -
         ami-events:
             conditions:
                 match:
                     Event: 'Hangup'
-                    Channel: 'PJSIP/bob-*'
+                    Channel: 'PJSIP/bob-.*'
             requirements:
                 match:
-                    Cause: '0'
+                    Cause: '18'
             count: '4'
     -
         ami-events:
             conditions:
                 match:
                     Event: 'Hangup'
-                    Channel: 'Local/bob-*'
+                    Channel: 'Local/bob-.*;2'
             requirements:
                 match:
-                    Cause: '0'
-            count: '8'
+                    Cause: '18'
+            count: '4'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'Hangup'
+                    Channel: 'Local/bob-.*;1'
+            requirements:
+                match:
+                    Cause: '18'
+            count: '4'
         stop_test:
 
 properties:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15c3e533adbc84e1c422c394fb5049e6d1496313
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list