[Asterisk-code-review] pjsip/basic calls/outgoing/nominal/peer in dialog auths: Inc... (testsuite[master])

Joshua Colp asteriskteam at digium.com
Sat Apr 1 06:02:19 CDT 2017


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

Change subject: pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths: Include BYE.
......................................................................

pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths: Include BYE.

This change extends the PJSIP peer_in_dialog_auths test to also
require authentication on BYE requests. This ensures that when
we are challenged for authentication on a BYE we resend it with
credentials.

ASTERISK-26363

Change-Id: Icd0952a88361de5c1effb66f5637295e34730f40
---
M tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/configs/ast1/extensions.conf
M tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/sipp/outgoing_in_dialog_auths.xml
2 files changed, 29 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/80/5380/1

diff --git a/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/configs/ast1/extensions.conf b/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/configs/ast1/extensions.conf
index 0c8ccc6..52c125d 100644
--- a/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/configs/ast1/extensions.conf
@@ -6,6 +6,5 @@
 same => n,GotoIf($["${SENDTEXTSTATUS}"="SUCCESS"]?:done)
 same => n,Wait(0.5)
 same => n,Set(CONNECTEDLINE(all)="Fred" <boring>)
-same => n,Echo()
 same => n(done),Hangup()
 
diff --git a/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/sipp/outgoing_in_dialog_auths.xml b/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/sipp/outgoing_in_dialog_auths.xml
index e1e576d8..7cc2289 100644
--- a/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/sipp/outgoing_in_dialog_auths.xml
+++ b/tests/channels/pjsip/basic_calls/outgoing/nominal/peer_in_dialog_auths/sipp/outgoing_in_dialog_auths.xml
@@ -200,26 +200,47 @@
     <recv request="ACK" rtd="true">
     </recv>
 
-    <send retrans="500">
+    <recv request="BYE">
+    </recv>
+
+    <send>
         <![CDATA[
 
-            BYE sip:in_dialog_auths@[remote_ip]:[remote_port];transport=[transport] SIP/2.0
+            SIP/2.0 401 Unauthorized
             [last_Via:]
-            From: <sip:test@[local_ip]>;tag=[call_number]
-            To:[$remote_from_data]
+            [last_From:]
+            [last_To:]
             [last_Call-ID:]
-            CSeq: 1 BYE
+            [last_CSeq:]
+            WWW-Authenticate: Digest  realm="asterisk",nonce="1431715752/35e47f0a610ed24b774610798d5a9c87",opaque="6a40d12245927b99",algorithm=md5,qop="auth"
             Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
-            Max-Forwards: 70
-            User-Agent: SIPp test
+            Server: SIPp test
             Content-Length: 0
 
             ]]>
     </send>
 
-    <recv response="200" crlf="true">
+    <recv request="BYE">
+        <action>
+            <!-- Need an Authorization header present to match. -->
+            <ereg regexp=".*" search_in="hdr" header="Authorization:" check_it="true" assign_to="dummy" />
+        </action>
     </recv>
 
+    <send retrans="500">
+        <![CDATA[
+
+            SIP/2.0 200 OK
+            [last_Via:]
+            [last_From:]
+            [last_To:]
+            [last_Call-ID:]
+            [last_CSeq:]
+            Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+            Server: SIPp test
+            ]]>
+    </send>
+
     <Reference variables="dummy" />
 
     <!-- definition of the response time repartition table (unit is ms) -->

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd0952a88361de5c1effb66f5637295e34730f40
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