[Asterisk-code-review] blind transfers: Notify with sip frag 100 now arrives later (testsuite[master])

Anonymous Coward asteriskteam at digium.com
Tue Mar 15 08:47:14 CDT 2016


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

Change subject: blind transfers: Notify with sip frag 100 now arrives later
......................................................................


blind transfers: Notify with sip frag 100 now arrives later

In preparation to the fix, this patch simply copies the sipp scenarios that are
contain notifies that will need to be moved.

ASTERISK-25771

Change-Id: Id4feca1b330cfdbd04df8503ee99473418c6d357
---
A tests/channels/pjsip/transfers/blind_transfer/callee_direct_media/sipp/bob_v13_8_0.xml
A tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/alice_v13_8_0.xml
2 files changed, 465 insertions(+), 0 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/channels/pjsip/transfers/blind_transfer/callee_direct_media/sipp/bob_v13_8_0.xml b/tests/channels/pjsip/transfers/blind_transfer/callee_direct_media/sipp/bob_v13_8_0.xml
new file mode 100644
index 0000000..35cf649
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/callee_direct_media/sipp/bob_v13_8_0.xml
@@ -0,0 +1,236 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic UAS responder">
+
+  <recv request="INVITE" crlf="true">
+    <!-- Save the From tag. We'll need it when we send our REFER -->
+    <action>
+      <ereg regexp="(;tag=.*)"
+          header="From:"
+          search_in="hdr"
+          check_it="true"
+          assign_to="remote_tag"/>
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 180 Ringing
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [custom_media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="ACK"
+    rtd="true"
+    crlf="true">
+  </recv>
+
+  <!-- Send audio -->
+  <nop>
+    <action>
+      <exec rtp_stream="lib/python/asterisk/audio.ulaw,3,0"/>
+    </action>
+  </nop>
+
+  <!-- Wait for re-invite to setup RTP directly between alice and bob -->
+  <recv request="INVITE" crlf="true"/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [custom_media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="ACK"
+        rtd="true"
+        crlf="true">
+  </recv>
+
+  <pause milliseconds="4000" />
+
+  <!-- Blind transfer alice to charlie -->
+  <send retrans="500">
+    <![CDATA[
+
+      REFER sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:bob@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
+      To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
+      Call-ID: [call_id]
+      CSeq: 2 REFER
+      Contact: sip:bob@[local_ip]:[local_port];transport=[transport]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Refer-To: sip:charlie@[remote_ip]:[remote_port];user=phone
+      Referred-By: sip:bob@[local_ip]:[local_port]
+      Content-Length: 0
+
+    ]]>
+
+  </send>
+
+  <recv response="202" rtd="true">
+  </recv>
+
+  <!-- We should receive a NOTIFY from Asterisk with a 100 trying sipfrag -->
+  <recv request="NOTIFY" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Event:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <!--
+       Wait for re-invite for tearing down direct media between alice and bob
+       due to transfering alice to charlie.
+  -->
+  <recv request="INVITE" crlf="true"/>
+
+  <send retrans="500" next="11">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [custom_media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <label id="11" />
+
+  <recv request="ACK"
+    rtd="true"
+    crlf="true"
+    next="12" >
+  </recv>
+
+  <label id="12" />
+
+  <!-- We should receive a NOTIFY from Asterisk with a '200 OK' sipfrag -->
+  <recv request="NOTIFY" crlf="true" next="13">
+    <!-- Check if 'SIP/2.0 200 OK' is in the body -->
+    <action>
+       <ereg regexp="(SIP/2.0 200 OK)"
+          search_in="msg"
+          check_it="true"
+          assign_to="sip_frag_ok"/>
+    </action>
+  </recv>
+
+  <label id="13" />
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Event:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <!-- Transfer should have successfully occurred so now we need to hang up -->
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]
+      From: <sip:bob@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
+      To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
+      Call-ID: [call_id]
+      CSeq: [cseq] BYE
+      Contact: sip:bob@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <Reference variables="sip_frag_ok" />
+
+</scenario>
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/alice_v13_8_0.xml b/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/alice_v13_8_0.xml
new file mode 100644
index 0000000..bca2c85
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_direct_media/sipp/alice_v13_8_0.xml
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Send Call">
+
+  <send retrans="500" start_txn="initial_invite">
+    <![CDATA[
+
+      INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
+      To: <sip:[service]@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: [cseq] INVITE
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=- 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [custom_media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100" optional="true" response_txn="initial_invite"/>
+  <recv response="180" optional="true" response_txn="initial_invite"/>
+  <recv response="183" optional="true" response_txn="initial_invite"/>
+
+  <recv response="200" rtd="true" response_txn="initial_invite">
+    <!-- Save the To tag. We'll need it when we send REFER -->
+    <action>
+      <ereg regexp="(;tag=.*)"
+          header="To:"
+          search_in="hdr"
+          check_it="true"
+          assign_to="remote_tag"/>
+    </action>
+  </recv>
+
+  <send ack_txn="initial_invite">
+    <![CDATA[
+
+      ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      Call-ID: [call_id]
+      CSeq: [cseq] ACK
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- Send audio -->
+  <nop>
+    <action>
+      <exec rtp_stream="lib/python/asterisk/audio.ulaw,3,0"/>
+    </action>
+  </nop>
+
+  <!-- Wait for re-invite to setup RTP directly between alice and bob -->
+  <recv request="INVITE" crlf="true"/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [custom_media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="ACK"
+    rtd="true"
+    crlf="true">
+  </recv>
+
+  <pause milliseconds="4000" />
+
+  <!-- Blind transfer bob to charlie -->
+  <send retrans="500">
+    <![CDATA[
+
+      REFER sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]
+      From: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
+      To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
+      Call-ID: [call_id]
+      CSeq: 2 REFER
+      Contact: sip:alice@[local_ip]:[local_port];transport=[transport]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Refer-To: sip:charlie@[remote_ip]:[remote_port];user=phone
+      Referred-By: sip:alice@[local_ip]:[local_port]
+      Content-Length: 0
+
+    ]]>
+
+  </send>
+
+  <recv response="202" rtd="true">
+  </recv>
+
+  <!-- We should receive a NOTIFY from Asterisk with a 100 trying sipfrag -->
+  <recv request="NOTIFY" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Event:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <!--
+       Wait for re-invite for tearing down direct media between alice and bob
+       due to transfering bob to charlie.
+  -->
+  <recv request="INVITE" crlf="true"/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio [custom_media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="ACK"
+    rtd="true"
+    crlf="true">
+  </recv>
+
+  <!-- We should receive a NOTIFY from Asterisk with a '200 OK' sipfrag -->
+  <recv request="NOTIFY" crlf="true">
+    <!-- Check if 'SIP/2.0 200 OK' is in the body -->
+    <action>
+       <ereg regexp="(SIP/2.0 200 OK)"
+          search_in="msg"
+          check_it="true"
+          assign_to="sip_frag_ok"/>
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Event:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <!-- Transfer should have successfully occurred so now we need to hang up -->
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]
+      From: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
+      To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
+      Call-ID: [call_id]
+      CSeq: [cseq] BYE
+      Contact: sip:alice@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <Reference variables="sip_frag_ok" />
+
+</scenario>

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

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



More information about the asterisk-code-review mailing list