[Asterisk-code-review] Copy pjsip tests for base of new ignore uri user options tests. (testsuite[master])

Richard Mudgett asteriskteam at digium.com
Thu Sep 8 19:26:52 CDT 2016


Richard Mudgett has uploaded a new change for review.

  https://gerrit.asterisk.org/3861

Change subject: Copy pjsip tests for base of new ignore_uri_user_options tests.
......................................................................

Copy pjsip tests for base of new ignore_uri_user_options tests.

.../basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options
.../basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options
.../basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options
.../diversion/diversion_basic_drop_options
.../diversion/diversion_request_drop_options
.../diversion/diversion_response_drop_options
.../handle_options_request_drop_options
.../message/message_basic_drop_options
.../registration/inbound/nominal/multiple_contacts/unauthed_drop_options
.../registration/inbound/nominal/single_contact/unauthed_drop_options
.../subscriptions/mwi/sub_setup_teardown_drop_options
.../transfers/blind_transfer/caller_with_hold_drop_options

Copy and link the new tests into the tree.  No other changes.

ASTERISK-26316
Reported by: Kevin Harwell

Change-Id: I2ad526af5686d9d377d00c7a4891f3fa60156479
---
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/test-config.yaml
M tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/tests.yaml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/test-config.yaml
M tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/tests.yaml
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
A tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/test-config.yaml
M tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/tests.yaml
A tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user1.xml
A tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user2.xml
A tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user3.xml
A tests/channels/pjsip/diversion/diversion_basic_drop_options/test-config.yaml
A tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user1.xml
A tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user2.xml
A tests/channels/pjsip/diversion/diversion_request_drop_options/test-config.yaml
A tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user1.xml
A tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user2.xml
A tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user3.xml
A tests/channels/pjsip/diversion/diversion_response_drop_options/test-config.yaml
M tests/channels/pjsip/diversion/tests.yaml
A tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/handle_options_request_drop_options/sipp/options_200.xml
A tests/channels/pjsip/handle_options_request_drop_options/sipp/options_404.xml
A tests/channels/pjsip/handle_options_request_drop_options/test-config.yaml
A tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/message/message_basic_drop_options/sipp/message.xml
A tests/channels/pjsip/message/message_basic_drop_options/sipp/message_recv.xml
A tests/channels/pjsip/message/message_basic_drop_options/test-config.yaml
M tests/channels/pjsip/message/tests.yaml
M tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/tests.yaml
A tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv4.xml
A tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv6.xml
A tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/test-config.yaml
M tests/channels/pjsip/registration/inbound/nominal/single_contact/tests.yaml
A tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/sipp/register-noauth.xml
A tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/test-config.yaml
A tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/sipp/mwi_subscription.xml
A tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/test-config.yaml
M tests/channels/pjsip/subscriptions/mwi/tests.yaml
M tests/channels/pjsip/tests.yaml
A tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/extensions.conf
A tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/pjsip.conf
A tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/alice.xml
A tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/bob.xml
A tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/charlie.xml
A tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/test-config.yaml
M tests/channels/pjsip/transfers/blind_transfer/tests.yaml
74 files changed, 4,147 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/61/3861/1

diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..bcea565
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,16 @@
+[default]
+exten => echo,1,Answer()
+same  =>      n,Echo()
+same  =>      n,Hangup()
+
+exten => playback,1,Answer()
+same  =>          n,Playback(hello-world)
+same  =>          n,Hangup()
+
+exten => early,1,Progress()
+same  =>       n,Playback(hello-world,noanswer)
+same  =>       n,Hangup(INTERWORKING)
+
+;This dialstring can be altered once endpoints can be used directly
+exten => bob,1,Dial(PJSIP/sip:bob at 127.0.0.1:5062)
+same  =>     n,Hangup()
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..802cf5c
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,53 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template-ipv4](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+media_address=127.0.0.1
+
+[endpoint-template-ipv6](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+media_address=[::1]
+rtp_ipv6=yes
+
+[alice-ipv4-udp](endpoint-template-ipv4)
+auth=alice-auth
+
+[alice-ipv4-tcp](endpoint-template-ipv4)
+auth=alice-auth
+
+[alice-ipv6-udp](endpoint-template-ipv6)
+auth=alice-auth
+
+[alice-ipv6-tcp](endpoint-template-ipv6)
+auth=alice-auth
+
+[auth-template](!)
+type=auth
+
+[alice-auth](auth-template)
+username=alice
+auth_type=md5
+md5_cred=c9b9e23e2160fd69b19f99116da19711
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
new file mode 100644
index 0000000..2148931
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to echo with SDP in ACK">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 3 BYE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
new file mode 100644
index 0000000..39fb61f
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to echo with SDP in initial INVITE">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 3 BYE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
new file mode 100644
index 0000000..56542d1
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in ACK">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
new file mode 100644
index 0000000..a5570f0
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in initial INVITE">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/test-config.yaml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/test-config.yaml
new file mode 100644
index 0000000..bef0a55
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/ident_by_user_drop_options/test-config.yaml
@@ -0,0 +1,82 @@
+testinfo:
+    summary:     'Tests incoming calls with authentication'
+    description: |
+        'Run a SIPp scenario that sends various calls to res_pjsip,
+        which should be authenticated'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    reactor-timeout: 80
+    fail-on-any: False
+    test-iterations:
+        # IPv4 & UDP
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-ipv4-udp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5062', '-d': '5000', '-s': 'alice-ipv4-udp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5063', '-s': 'alice-ipv4-udp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5064', '-d': '5000', '-s': 'alice-ipv4-udp'} }
+
+        # IPv4 & TCP
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5065', '-t': 't1', '-s': 'alice-ipv4-tcp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5066', '-t': 't1', '-d': '5000', '-s': 'alice-ipv4-tcp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5067', '-t': 't1', '-s': 'alice-ipv4-tcp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5068', '-t': 't1', '-d': '5000', '-s': 'alice-ipv4-tcp'} }
+
+        # IPv6 & UDP
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '[::1]', '-p': '5071', '-s': 'alice-ipv6-udp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '[::1]', '-p': '5072', '-d': '5000', '-s': 'alice-ipv6-udp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5073', '-s': 'alice-ipv6-udp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5074', '-d': '5000', '-s': 'alice-ipv6-udp'} }
+
+        # IPv6 & TCP
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '[::1]', '-p': '5075', '-t': 't1', '-s': 'alice-ipv6-tcp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '[::1]', '-p': '5076', '-t': 't1', '-d': '5000', '-s': 'alice-ipv6-tcp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5077', '-t': 't1', '-s': 'alice-ipv6-tcp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5078', '-t': 't1', '-d': '5000', '-s': 'alice-ipv6-tcp'} }
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.0'
+        - asterisk : 'app_dial'
+        - asterisk : 'app_echo'
+        - asterisk : 'app_playback'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/tests.yaml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/tests.yaml
index 07536c3..308d8bc 100644
--- a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/tests.yaml
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/md5/tests.yaml
@@ -1,3 +1,4 @@
 tests:
-    - test: 'ident_by_user'
     - test: 'ident_by_host'
+    - test: 'ident_by_user'
+    - test: 'ident_by_user_drop_options'
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..bcea565
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,16 @@
+[default]
+exten => echo,1,Answer()
+same  =>      n,Echo()
+same  =>      n,Hangup()
+
+exten => playback,1,Answer()
+same  =>          n,Playback(hello-world)
+same  =>          n,Hangup()
+
+exten => early,1,Progress()
+same  =>       n,Playback(hello-world,noanswer)
+same  =>       n,Hangup(INTERWORKING)
+
+;This dialstring can be altered once endpoints can be used directly
+exten => bob,1,Dial(PJSIP/sip:bob at 127.0.0.1:5062)
+same  =>     n,Hangup()
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..9732121
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,52 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template-ipv4](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+media_address=127.0.0.1
+
+[endpoint-template-ipv6](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+media_address=[::1]
+rtp_ipv6=yes
+
+[alice-ipv4-udp](endpoint-template-ipv4)
+auth=alice-auth
+
+[alice-ipv4-tcp](endpoint-template-ipv4)
+auth=alice-auth
+
+[alice-ipv6-udp](endpoint-template-ipv6)
+auth=alice-auth
+
+[alice-ipv6-tcp](endpoint-template-ipv6)
+auth=alice-auth
+
+[auth-template](!)
+type=auth
+
+[alice-auth](auth-template)
+username=alice
+password=swordfish
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
new file mode 100644
index 0000000..2148931
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to echo with SDP in ACK">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 3 BYE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
new file mode 100644
index 0000000..39fb61f
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to echo with SDP in initial INVITE">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 3 BYE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
new file mode 100644
index 0000000..56542d1
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in ACK">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
new file mode 100644
index 0000000..a5570f0
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in initial INVITE">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: sipp <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication username=alice password=swordfish]
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/test-config.yaml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/test-config.yaml
new file mode 100644
index 0000000..bef0a55
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user_drop_options/test-config.yaml
@@ -0,0 +1,82 @@
+testinfo:
+    summary:     'Tests incoming calls with authentication'
+    description: |
+        'Run a SIPp scenario that sends various calls to res_pjsip,
+        which should be authenticated'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    reactor-timeout: 80
+    fail-on-any: False
+    test-iterations:
+        # IPv4 & UDP
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-ipv4-udp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5062', '-d': '5000', '-s': 'alice-ipv4-udp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5063', '-s': 'alice-ipv4-udp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5064', '-d': '5000', '-s': 'alice-ipv4-udp'} }
+
+        # IPv4 & TCP
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5065', '-t': 't1', '-s': 'alice-ipv4-tcp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5066', '-t': 't1', '-d': '5000', '-s': 'alice-ipv4-tcp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5067', '-t': 't1', '-s': 'alice-ipv4-tcp'} }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5068', '-t': 't1', '-d': '5000', '-s': 'alice-ipv4-tcp'} }
+
+        # IPv6 & UDP
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '[::1]', '-p': '5071', '-s': 'alice-ipv6-udp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '[::1]', '-p': '5072', '-d': '5000', '-s': 'alice-ipv6-udp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5073', '-s': 'alice-ipv6-udp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5074', '-d': '5000', '-s': 'alice-ipv6-udp'} }
+
+        # IPv6 & TCP
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '[::1]', '-p': '5075', '-t': 't1', '-s': 'alice-ipv6-tcp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '[::1]', '-p': '5076', '-t': 't1', '-d': '5000', '-s': 'alice-ipv6-tcp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5077', '-t': 't1', '-s': 'alice-ipv6-tcp'} }
+        -
+            scenarios:
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5078', '-t': 't1', '-d': '5000', '-s': 'alice-ipv6-tcp'} }
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.0'
+        - asterisk : 'app_dial'
+        - asterisk : 'app_echo'
+        - asterisk : 'app_playback'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/tests.yaml b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/tests.yaml
index 01368ee..c97a336 100644
--- a/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/tests.yaml
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/tests.yaml
@@ -1,4 +1,5 @@
 tests:
-    - test: 'ident_by_user'
-    - test: 'ident_by_host'
     - test: 'ident_by_auth_user'
+    - test: 'ident_by_host'
+    - test: 'ident_by_user'
+    - test: 'ident_by_user_drop_options'
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..bcea565
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,16 @@
+[default]
+exten => echo,1,Answer()
+same  =>      n,Echo()
+same  =>      n,Hangup()
+
+exten => playback,1,Answer()
+same  =>          n,Playback(hello-world)
+same  =>          n,Hangup()
+
+exten => early,1,Progress()
+same  =>       n,Playback(hello-world,noanswer)
+same  =>       n,Hangup(INTERWORKING)
+
+;This dialstring can be altered once endpoints can be used directly
+exten => bob,1,Dial(PJSIP/sip:bob at 127.0.0.1:5062)
+same  =>     n,Hangup()
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..8952928
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,45 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template-ipv4](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+media_address=127.0.0.1
+
+[endpoint-template-ipv6](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+media_address=[::1]
+rtp_ipv6=yes
+
+[alice-ipv4-udp](endpoint-template-ipv4)
+transport=local-transport-udp
+
+[alice-ipv4-tcp](endpoint-template-ipv4)
+transport=local-transport-tcp
+
+[alice-ipv6-udp](endpoint-template-ipv6)
+transport=local-transport-udp6
+
+[alice-ipv6-tcp](endpoint-template-ipv6)
+transport=local-transport-tcp6
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
new file mode 100644
index 0000000..5d5e8bb
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_deferred_sdp.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to echo with SDP in ACK">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
new file mode 100644
index 0000000..1790d39
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/echo_with_initial_sdp.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to echo with SDP in initial INVITE">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <pause/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:echo@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
new file mode 100644
index 0000000..b40d318
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_deferred_sdp.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in ACK">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
new file mode 100644
index 0000000..790992f
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/sipp/playback_with_initial_sdp.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in initial INVITE">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/test-config.yaml b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/test-config.yaml
new file mode 100644
index 0000000..97579a6
--- /dev/null
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/ident_by_user_drop_options/test-config.yaml
@@ -0,0 +1,50 @@
+testinfo:
+    summary:     'Tests incoming calls without authentication'
+    description: |
+        'Run a SIPp scenario that sends various calls to res_pjsip, which should not be authenticated'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                # IPv4 & UDP
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-ipv4-udp'} }
+                - { 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5062', '-d': '5000', '-s': 'alice-ipv4-udp'} }
+                - { 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5066', '-s': 'alice-ipv4-udp'} }
+                - { 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5067', '-d': '5000', '-s': 'alice-ipv4-udp'} }
+
+                # IPv4 & TCP
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5061', '-t': 't1', '-s': 'alice-ipv4-tcp'} }
+                - { 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5062', '-t': 't1', '-d': '5000', '-s': 'alice-ipv4-tcp'} }
+                - { 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5066', '-t': 't1', '-s': 'alice-ipv4-tcp'} }
+                - { 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '127.0.0.1', '-p': '5067', '-t': 't1', '-d': '5000', '-s': 'alice-ipv4-tcp'} }
+
+               # IPv6 & UDP
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '[::1]', '-p': '5061', '-s': 'alice-ipv6-udp'} }
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '[::1]', '-p': '5062', '-d': '5000', '-s': 'alice-ipv6-udp'} }
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5066', '-s': 'alice-ipv6-udp'} }
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5067', '-d': '5000', '-s': 'alice-ipv6-udp'} }
+
+                # IPv6 & TCP
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '[::1]', '-p': '5061', '-t': 't1', '-s': 'alice-ipv6-tcp'} }
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_initial_sdp.xml', '-i': '[::1]', '-p': '5062', '-t': 't1', '-d': '5000', '-s': 'alice-ipv6-tcp'} }
+                - { 'target': '[::1]', 'key-args': {'scenario': 'playback_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5066', '-t': 't1', '-s': 'alice-ipv6-tcp'} }
+                - { 'target': '[::1]', 'key-args': {'scenario': 'echo_with_deferred_sdp.xml', '-i': '[::1]', '-p': '5067', '-t': 't1', '-d': '5000', '-s': 'alice-ipv6-tcp'} }
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.0'
+        - asterisk : 'app_dial'
+        - asterisk : 'app_echo'
+        - asterisk : 'app_playback'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/tests.yaml b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/tests.yaml
index 07536c3..308d8bc 100644
--- a/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/tests.yaml
+++ b/tests/channels/pjsip/basic_calls/incoming/nominal/unauthed/tests.yaml
@@ -1,3 +1,4 @@
 tests:
-    - test: 'ident_by_user'
     - test: 'ident_by_host'
+    - test: 'ident_by_user'
+    - test: 'ident_by_user_drop_options'
diff --git a/tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..4719251
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(PJSIP/user1)
+exten => user2,1,Dial(PJSIP/user2)
+exten => user3,1,Dial(PJSIP/user3)
diff --git a/tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..144b2d4
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_basic_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,40 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[user1-aors]
+type=aor
+contact=sip:user1 at 127.0.0.1:5061
+
+[user1]
+type=endpoint
+context=default
+aors=user1-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user2-aors]
+type=aor
+contact=sip:user2 at 127.0.0.1:5062
+
+[user2]
+type=endpoint
+context=default
+aors=user2-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user3-aors]
+type=aor
+contact=sip:user3 at 127.0.0.1:5063
+
+[user3]
+type=endpoint
+context=default
+aors=user3-aors
+direct_media=no
+disallow=all
+allow=ulaw
diff --git a/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user1.xml b/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user1.xml
new file mode 100644
index 0000000..a7c8dda
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user1.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send an invite to user2">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user2 <sip:user2@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user1@[local_ip]:[local_port]
+                        Max-Forwards: 70
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
+			s=-
+			c=IN IP[media_ip_type] [media_ip]
+			t=0 0
+			m=audio [media_port] RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="181" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="183" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+	<pause milliseconds="3000"/>
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user2.xml b/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user2.xml
new file mode 100644
index 0000000..da9b1fa
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user2.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send forwarding response back">
+	<recv request="INVITE" crlf="true" />
+
+	<send>
+		<![CDATA[
+			SIP/2.0 302 Moved Temporarily
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user3.xml b/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user3.xml
new file mode 100644
index 0000000..05293d8
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_basic_drop_options/sipp/user3.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="receives forwarded call from user2">
+	<recv request="INVITE" crlf="true">
+                <action>
+                        <!-- Check that the Diversion header is present. -->
+	        	<ereg regexp=".*" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
+		        <log message="Received INVITE with Diversion header: [$1]." />
+		</action>
+        </recv>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 180 Ringing
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[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=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
+			s=-
+			c=IN IP[media_ip_type] [media_ip]
+			t=0 0
+			m=audio [media_port] RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+
+	<recv request="BYE" crlf="true" />
+
+	<send retrans="500">
+		<![CDATA[
+			SIP/2.0 200 OK
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_basic_drop_options/test-config.yaml b/tests/channels/pjsip/diversion/diversion_basic_drop_options/test-config.yaml
new file mode 100644
index 0000000..3219207
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_basic_drop_options/test-config.yaml
@@ -0,0 +1,28 @@
+testinfo:
+    summary: 'Test to make sure an appropriate diversion header gets added when
+              a call is forwarded.'
+    description: |
+        'user1 calls user2 which is set to forward calls to user3.'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'app_dial'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_diversion'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'user3.xml', '-p':'5063' } }
+                - { 'key-args': { 'scenario':'user2.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'user1.xml', '-p':'5061' } }
diff --git a/tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..4719251
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(PJSIP/user1)
+exten => user2,1,Dial(PJSIP/user2)
+exten => user3,1,Dial(PJSIP/user3)
diff --git a/tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..144b2d4
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_request_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,40 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[user1-aors]
+type=aor
+contact=sip:user1 at 127.0.0.1:5061
+
+[user1]
+type=endpoint
+context=default
+aors=user1-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user2-aors]
+type=aor
+contact=sip:user2 at 127.0.0.1:5062
+
+[user2]
+type=endpoint
+context=default
+aors=user2-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user3-aors]
+type=aor
+contact=sip:user3 at 127.0.0.1:5063
+
+[user3]
+type=endpoint
+context=default
+aors=user3-aors
+direct_media=no
+disallow=all
+allow=ulaw
diff --git a/tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user1.xml b/tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user1.xml
new file mode 100644
index 0000000..be9d3ac
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user1.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send an invite to user2">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user2 <sip:user2@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user1@[local_ip]:[local_port]
+                        Max-Forwards: 70
+			Diversion: <sip:amenhotep at 127.0.0.1>;reason=unconditional
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
+			s=-
+			c=IN IP[media_ip_type] [media_ip]
+			t=0 0
+			m=audio [media_port] RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="181" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="183" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user2@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user2@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user2@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user2.xml b/tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user2.xml
new file mode 100644
index 0000000..c6b1b39
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_request_drop_options/sipp/user2.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="receives invite with diversion info">
+	<recv request="INVITE" crlf="true">
+                <action>
+                        <!-- Check that the Diversion header is present and contains the correct name. -->
+	        	<ereg regexp="amenhotep" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
+		        <log message="Received INVITE with Diversion header: [$1]." />
+		</action>
+        </recv>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user2@[local_ip]:[local_port];transport=[transport]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 180 Ringing
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user2@[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=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user2@[local_ip]:[local_port];transport=[transport]>
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
+			s=-
+			c=IN IP[media_ip_type] [media_ip]
+			t=0 0
+			m=audio [media_port] RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+
+	<recv request="BYE" crlf="true" />
+
+	<send retrans="500">
+		<![CDATA[
+			SIP/2.0 200 OK
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_request_drop_options/test-config.yaml b/tests/channels/pjsip/diversion/diversion_request_drop_options/test-config.yaml
new file mode 100644
index 0000000..9fc1d17
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_request_drop_options/test-config.yaml
@@ -0,0 +1,27 @@
+testinfo:
+    summary: 'Test to make sure the diversion header on an invite gets
+              propagated correctly.'
+    description: |
+        'user1 calls user2 with an invite containing a diversion header.'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'app_dial'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_diversion'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'user2.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'user1.xml', '-p':'5061' } }
diff --git a/tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..4719251
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[general]
+
+[default]
+
+exten => user1,1,Dial(PJSIP/user1)
+exten => user2,1,Dial(PJSIP/user2)
+exten => user3,1,Dial(PJSIP/user3)
diff --git a/tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..144b2d4
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_response_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,40 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[user1-aors]
+type=aor
+contact=sip:user1 at 127.0.0.1:5061
+
+[user1]
+type=endpoint
+context=default
+aors=user1-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user2-aors]
+type=aor
+contact=sip:user2 at 127.0.0.1:5062
+
+[user2]
+type=endpoint
+context=default
+aors=user2-aors
+direct_media=no
+disallow=all
+allow=ulaw
+
+[user3-aors]
+type=aor
+contact=sip:user3 at 127.0.0.1:5063
+
+[user3]
+type=endpoint
+context=default
+aors=user3-aors
+direct_media=no
+disallow=all
+allow=ulaw
diff --git a/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user1.xml b/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user1.xml
new file mode 100644
index 0000000..cae005c
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user1.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send an invite to user2">
+	<send retrans="500">
+		<![CDATA[
+                        INVITE sip:user2@[remote_ip]:[remote_port] SIP/2.0
+                        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+                        From: user1 <sip:user1@[local_ip]:[local_port]>;tag=[call_number]
+                        To: user2 <sip:user2@[remote_ip]:[remote_port]>
+                        Call-ID: [call_id]
+                        CSeq: [cseq] INVITE
+                        Contact: sip:user1@[local_ip]:[local_port]
+                        Max-Forwards: 70
+                        Content-Type: application/sdp
+                        Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
+			s=-
+			c=IN IP[media_ip_type] [media_ip]
+			t=0 0
+			m=audio [media_port] RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv response="100" optional="true" />
+
+	<recv response="181" optional="true" />
+
+	<recv response="180" optional="true" />
+
+	<recv response="183" optional="true" />
+
+	<recv response="200" />
+
+	<send>
+		<![CDATA[
+			ACK sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] ACK
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+
+		]]>
+	</send>
+
+	<send retrans="500">
+		<![CDATA[
+			BYE sip:user3@[remote_ip]:[remote_port] SIP/2.0
+			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+			From: <sip:user1@[local_ip]>;tag=[call_number]
+			To: <sip:user3@[remote_ip]:[remote_port]>[peer_tag_param]
+			CSeq: [cseq] BYE
+			Call-ID: [call_id]
+			Max-Forwards: 70
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv response="200" crlf="true" />
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user2.xml b/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user2.xml
new file mode 100644
index 0000000..3e5946c
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user2.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="send forwarding response back with diversion header">
+	<recv request="INVITE" crlf="true" />
+
+	<send>
+		<![CDATA[
+			SIP/2.0 302 Moved Temporarily
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]>
+			Diversion: <sip:amenhotep at 127.0.0.1>;reason=unconditional
+			Content-Length: 0
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user3.xml b/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user3.xml
new file mode 100644
index 0000000..43a4788
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_response_drop_options/sipp/user3.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="receives forwarded call from user2">
+	<recv request="INVITE" crlf="true">
+                <action>
+                        <!-- Check that the Diversion header is present and contains the correct name. -->
+	        	<ereg regexp="amenhotep" search_in="hdr" header="Diversion:" check_it="true" assign_to="1" />
+		        <log message="Received INVITE with Diversion header: [$1]." />
+		</action>
+        </recv>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Length: 0
+		]]>
+	</send>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 180 Ringing
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[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=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:user3@[local_ip]:[local_port];transport=[transport]>
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
+			s=-
+			c=IN IP[media_ip_type] [media_ip]
+			t=0 0
+			m=audio [media_port] RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
+
+		]]>
+	</send>
+
+	<recv request="ACK"/>
+
+	<recv request="BYE" crlf="true" />
+
+	<send retrans="500">
+		<![CDATA[
+			SIP/2.0 200 OK
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Content-Type: application/sdp
+			Content-Length: 0
+
+		]]>
+	</send>
+</scenario>
diff --git a/tests/channels/pjsip/diversion/diversion_response_drop_options/test-config.yaml b/tests/channels/pjsip/diversion/diversion_response_drop_options/test-config.yaml
new file mode 100644
index 0000000..4ce6052
--- /dev/null
+++ b/tests/channels/pjsip/diversion/diversion_response_drop_options/test-config.yaml
@@ -0,0 +1,30 @@
+testinfo:
+    summary: 'Test to make sure a response containing a diversion header gets
+             propagated correctly.'
+
+    description: |
+        'user1 calls user2 which is set to forward calls to user3.  The 302
+         response coming from user2 contains a diversion header.'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'app_dial'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_diversion'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'user3.xml', '-p':'5063' } }
+                - { 'key-args': { 'scenario':'user2.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'user1.xml', '-p':'5061' } }
diff --git a/tests/channels/pjsip/diversion/tests.yaml b/tests/channels/pjsip/diversion/tests.yaml
index d645973..ea60a32 100644
--- a/tests/channels/pjsip/diversion/tests.yaml
+++ b/tests/channels/pjsip/diversion/tests.yaml
@@ -1,6 +1,9 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - test: 'diversion_basic'
+    - test: 'diversion_basic_drop_options'
     - test: 'diversion_caller_id'
     - test: 'diversion_request'
+    - test: 'diversion_request_drop_options'
     - test: 'diversion_response'
+    - test: 'diversion_response_drop_options'
diff --git a/tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..0b18a63
--- /dev/null
+++ b/tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,4 @@
+[default]
+
+; We just need a single extension to match on
+exten => 1234,1,NoOp()
diff --git a/tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..87f889e
--- /dev/null
+++ b/tests/channels/pjsip/handle_options_request_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,8 @@
+[mytransport]
+type=transport
+protocol=udp
+bind=127.0.0.1:5060
+
+[sipp]
+type=endpoint
+context=default
diff --git a/tests/channels/pjsip/handle_options_request_drop_options/sipp/options_200.xml b/tests/channels/pjsip/handle_options_request_drop_options/sipp/options_200.xml
new file mode 100644
index 0000000..3f0e075
--- /dev/null
+++ b/tests/channels/pjsip/handle_options_request_drop_options/sipp/options_200.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="UAC OPTIONS">
+    <send retrans="500"> <![CDATA[
+
+        OPTIONS sip:1234@[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
+        To: Asterisk <sip:1234@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 OPTIONS
+        Contact: sip:sipp@[local_ip]:[local_port]
+        Max-Forwards: 70
+        Subject: Asterisk Testsuite
+        Content-Length: [len]
+
+        ]]>
+    </send>
+    <recv response="200"/>
+</scenario>
diff --git a/tests/channels/pjsip/handle_options_request_drop_options/sipp/options_404.xml b/tests/channels/pjsip/handle_options_request_drop_options/sipp/options_404.xml
new file mode 100644
index 0000000..a67ec81
--- /dev/null
+++ b/tests/channels/pjsip/handle_options_request_drop_options/sipp/options_404.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="UAC OPTIONS">
+    <send retrans="500"> <![CDATA[
+
+        OPTIONS sip:5555@[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
+        To: Asterisk <sip:5555@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 OPTIONS
+        Contact: sip:sipp@[local_ip]:[local_port]
+        Max-Forwards: 70
+        Subject: Asterisk Testsuite
+        Content-Length: [len]
+
+        ]]>
+    </send>
+    <recv response="404"/>
+</scenario>
diff --git a/tests/channels/pjsip/handle_options_request_drop_options/test-config.yaml b/tests/channels/pjsip/handle_options_request_drop_options/test-config.yaml
new file mode 100644
index 0000000..ec3cf66
--- /dev/null
+++ b/tests/channels/pjsip/handle_options_request_drop_options/test-config.yaml
@@ -0,0 +1,29 @@
+testinfo:
+    summary:     'Test SIP OPTIONS handling'
+    description: |
+        'Run two SIPp scnearios that send an OPTIONS request.  In one instance,
+         we expect a 200 response, and in the other we expect a 404 response.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'options_200.xml', '-i': '127.0.0.1', '-p': '5061'} }
+                - { 'key-args': {'scenario': 'options_404.xml', '-i': '127.0.0.1', '-p': '5062'} }
+
+# TODO: Test authentication of OPTION request
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.0'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..d20be06
--- /dev/null
+++ b/tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,7 @@
+[default]
+
+exten => user1,1,Verbose(1,Got a message from SIPp)
+      same => n,Verbose(1,To: ${MESSAGE(to)})
+      same => n,Verbose(1,From: ${MESSAGE(from)})
+      same => n,Verbose(1,Body: ${MESSAGE(body)})
+      same => n,MessageSend(${MESSAGE(to)},sip:user)
diff --git a/tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..01434aa
--- /dev/null
+++ b/tests/channels/pjsip/message/message_basic_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,34 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user]
+type=aor
+contact=sip:user at 127.0.0.1:5061
+max_contacts=1
+
+[user]
+type=endpoint
+context=default
+aors=user
+direct_media=no
+disallow=all
+allow=ulaw
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+[user1]
+type=aor
+contact=sip:user1 at 127.0.0.1:5062
+max_contacts=1
+
+[user1]
+type=endpoint
+context=default
+aors=user1
+direct_media=no
+disallow=all
+allow=ulaw
diff --git a/tests/channels/pjsip/message/message_basic_drop_options/sipp/message.xml b/tests/channels/pjsip/message/message_basic_drop_options/sipp/message.xml
new file mode 100644
index 0000000..a9a5176
--- /dev/null
+++ b/tests/channels/pjsip/message/message_basic_drop_options/sipp/message.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <send retrans="500">
+    <![CDATA[
+
+      MESSAGE sip:user1@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: user <sip:user@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: <sip:user1@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 MESSAGE
+      Max-Forwards: 70
+      Expires: 3600
+      Content-Type: text/plain
+      Content-Length: 18
+
+      Watson, come here.
+
+    ]]>
+  </send>
+
+  <recv response="202" rtd="true" />
+
+</scenario>
diff --git a/tests/channels/pjsip/message/message_basic_drop_options/sipp/message_recv.xml b/tests/channels/pjsip/message/message_basic_drop_options/sipp/message_recv.xml
new file mode 100644
index 0000000..f2a5756
--- /dev/null
+++ b/tests/channels/pjsip/message/message_basic_drop_options/sipp/message_recv.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <recv request="MESSAGE" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 202 Accepted
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
+      Supported: replaces, timer
+      Content-Length: 0
+
+    ]]>
+  </send>
+</scenario>
diff --git a/tests/channels/pjsip/message/message_basic_drop_options/test-config.yaml b/tests/channels/pjsip/message/message_basic_drop_options/test-config.yaml
new file mode 100644
index 0000000..dda35d1
--- /dev/null
+++ b/tests/channels/pjsip/message/message_basic_drop_options/test-config.yaml
@@ -0,0 +1,26 @@
+testinfo:
+    summary: 'Test inbound and outbound unauthenticated MESSAGE'
+    description: |
+        'Send a SIP MESSAGE to Asterisk and once received use the dialplan
+         application MessageSend to send a MESSAGE to a receiver.'
+
+properties:
+    minversion: '12'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+        - asterisk : 'res_pjsip_messaging'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+             scenarios:
+                - { 'key-args': { 'scenario':'message_recv.xml', '-p':'5062' } }
+                - { 'key-args': { 'scenario':'message.xml', '-p':'5061' } }
diff --git a/tests/channels/pjsip/message/tests.yaml b/tests/channels/pjsip/message/tests.yaml
index faf4e86..ff65d54 100644
--- a/tests/channels/pjsip/message/tests.yaml
+++ b/tests/channels/pjsip/message/tests.yaml
@@ -1,10 +1,11 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - test: 'message_basic'
+    - test: 'message_basic_drop_options'
     - test: 'message_context'
-    - test: 'message_to_uri'
-    - test: 'message_from'
     - test: 'message_cust_hdr'
+    - test: 'message_from'
     - test: 'message_in_dialog'
-    - test: 'message_send_ami'
     - test: 'message_retrans'
+    - test: 'message_send_ami'
+    - test: 'message_to_uri'
diff --git a/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/tests.yaml b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/tests.yaml
index 9576921..60b6e13 100644
--- a/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/tests.yaml
+++ b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/tests.yaml
@@ -1,4 +1,5 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
-    - test: 'unauthed'
     - test: 'authed'
+    - test: 'unauthed'
+    - test: 'unauthed_drop_options'
diff --git a/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..9a86ca1
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,61 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw
+
+[alice](endpoint-template)
+aors=alice
+
+[alice]
+type=aor
+max_contacts=2
+minimum_expiration=5
+default_expiration=30
+
+[bob](endpoint-template)
+aors=bob
+
+[bob]
+type=aor
+max_contacts=2
+minimum_expiration=5
+default_expiration=30
+
+[charlie](endpoint-template)
+aors=charlie
+
+[charlie]
+type=aor
+max_contacts=2
+minimum_expiration=5
+default_expiration=30
+
+[carol](endpoint-template)
+aors=carol
+
+[carol]
+type=aor
+max_contacts=2
+minimum_expiration=5
+default_expiration=30
+
diff --git a/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv4.xml b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv4.xml
new file mode 100644
index 0000000..7443679
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv4.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+    <!-- Send REGISTER with an 'Expires' header and *without* an 'expires' parameter on the Contact headers -->
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+	Contact: "[service]" <sip:[service]-office at 127.0.0.2:5062>;transport=[transport]
+	Contact: "[service]" <sip:[service]-home at 127.0.0.3:5063>;transport=[transport]
+        Subject: Performance Test
+	Expires: 10
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+        <action>
+            <!--
+	     ensure the received expires parameters are what was sent in the expires header with a 5 second tolerance
+            -->
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-office at 127.0.0.2:5062>;expires=(10|[5-9])" search_in="msg" check_it="true" assign_to="1"/>
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-home at 127.0.0.3:5063>;expires=(10|[5-9])" search_in="msg" check_it="true" assign_to="2" />
+        </action>
+    </recv>
+
+
+    <!-- Give enough time to allow the registrations to expire before registering again -->
+    <pause milliseconds="12000"/>
+
+    <!-- Send REGISTER with an 'Expires' header and *with* an 'expires' parameter on the Contact headers -->
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+	Contact: "[service]" <sip:[service]-office at 127.0.0.2:5062>;transport=[transport];expires=15
+	Contact: "[service]" <sip:[service]-home at 127.0.0.3:5063>;transport=[transport];expires=20
+        Subject: Performance Test
+	Expires: 10
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+	<action>
+            <!--
+	     Ensure the received expires parameters are what was sent in the expires parameters with a 5 second tolerance
+            -->
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-office at 127.0.0.2:5062>;expires=1[0-5]" search_in="msg" check_it="true" assign_to="3"/>
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-home at 127.0.0.3:5063>;expires=(20|1[5-9])" search_in="msg" check_it="true" assign_to="4" />
+        </action>
+    </recv>
+
+    <Reference variables="1" />
+    <Reference variables="2" />
+    <Reference variables="3" />
+    <Reference variables="4" />
+</scenario>
diff --git a/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv6.xml b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv6.xml
new file mode 100644
index 0000000..6239986
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/sipp/register-noauth-multi-contact-expiry-ipv6.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+    <!-- Send REGISTER with an 'Expires' header and *without* an 'expires' parameter on the Contact headers -->
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+	Contact: "[service]" <sip:[service]-office@[customip1]:5062>;transport=[transport]
+	Contact: "[service]" <sip:[service]-home@[customip2]:5063>;transport=[transport]
+        Subject: Performance Test
+	Expires: 10
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+        <action>
+            <!--
+	     ensure the received expires parameters are what was sent in the expires header with a 5 second tolerance
+            -->
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-office at .::2.:5062>;expires=(10|[5-9])" search_in="msg" check_it="true" assign_to="1"/>
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-home at .::3.:5063>;expires=(10|[5-9])" search_in="msg" check_it="true" assign_to="2" />
+        </action>
+    </recv>
+
+
+    <!-- Give enough time to allow the registrations to expire before registering again -->
+    <pause milliseconds="12000"/>
+
+    <!-- Send REGISTER with an 'Expires' header and *with* an 'expires' parameter on the Contact headers -->
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+	Contact: "[service]" <sip:[service]-office@[customip1]:5062>;transport=[transport];expires=15
+	Contact: "[service]" <sip:[service]-home@[customip2]:5063>;transport=[transport];expires=20
+        Subject: Performance Test
+	Expires: 10
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+	<action>
+            <!--
+	     Ensure the received expires parameters are what was sent in the expires parameters with a 5 second tolerance
+            -->
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-office at .::2.:5062>;expires=1[0-5]" search_in="msg" check_it="true" assign_to="3"/>
+	    <ereg regexp="Contact: <sip:(alice|bob|charlie|carol)-home at .::3.:5063>;expires=(20|1[5-9])" search_in="msg" check_it="true" assign_to="4" />
+        </action>
+    </recv>
+
+    <Reference variables="1" />
+    <Reference variables="2" />
+    <Reference variables="3" />
+    <Reference variables="4" />
+</scenario>
diff --git a/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/test-config.yaml b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/test-config.yaml
new file mode 100644
index 0000000..81ea388
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/multiple_contacts/unauthed_drop_options/test-config.yaml
@@ -0,0 +1,274 @@
+testinfo:
+    summary:     'Register multiple contacts per AOR with no authentication'
+    description: |
+        'Using all combinations of IPv4/IPv6 and UDP/TCP, run SIPp scenarios
+         that register multiple contacts per AOR. This ensures that the
+         expiration is properly set per contact whether specified in the
+         Expires header or in the expires parameter of the Contact headers.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+
+test-object-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                # IPv4 & UDP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth-multi-contact-expiry-ipv4.xml',
+                                    '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
+                # IPv4 & TCP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth-multi-contact-expiry-ipv4.xml',
+                                    '-i': '127.0.0.1', '-p': '5061', '-t': 't1', '-s': 'bob'} }
+
+                # IPv6 & UDP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth-multi-contact-expiry-ipv6.xml',
+                                    'target': '[::1]', '-i': '[::1]', '-p': '5061', '-s': 'charlie'},
+                    'ordered-args': ['-key', 'customip1', '[::2]', '-key', 'customip2', '[::3]'] }
+
+                # IPv6 & TCP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth-multi-contact-expiry-ipv6.xml',
+                                    'target': '[::1]', '-i': '[::1]', '-p': '5061', '-t': 't1', '-s': 'carol'},
+                    'ordered-args': ['-key', 'customip1', '[::2]', '-key', 'customip2', '[::3]'] }
+
+ami-config:
+    ################
+    # Alice - IPv4 #
+    ################
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:alice-office at 127.0.0.2:5062'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'alice'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:alice-home at 127.0.0.3:5063'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'alice'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:alice-office at 127.0.0.2:5062'
+                Expiration: '15'
+        requirements:
+            match:
+                AOR: 'alice'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:alice-home at 127.0.0.3:5063'
+                Expiration: '20'
+        requirements:
+            match:
+                AOR: 'alice'
+        count: '1'
+    ##############
+    # Bob - IPv4 #
+    ##############
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:bob-office at 127.0.0.2:5062'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'bob'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:bob-home at 127.0.0.3:5063'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'bob'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:bob-office at 127.0.0.2:5062'
+                Expiration: '15'
+        requirements:
+            match:
+                AOR: 'bob'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:bob-home at 127.0.0.3:5063'
+                Expiration: '20'
+        requirements:
+            match:
+                AOR: 'bob'
+        count: '1'
+    ##################
+    # Charlie - IPv6 #
+    ##################
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:charlie-office@\[::2\]:5062'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'charlie'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:charlie-home@\[::3\]:5063'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'charlie'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:charlie-office@\[::2\]:5062'
+                Expiration: '15'
+        requirements:
+            match:
+                AOR: 'charlie'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:charlie-home@\[::3\]:5063'
+                Expiration: '20'
+        requirements:
+            match:
+                AOR: 'charlie'
+        count: '1'
+    ################
+    # Carol - IPv6 #
+    ################
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:carol-office@\[::2\]:5062'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'carol'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:carol-home@\[::3\]:5063'
+                Expiration: '10'
+        requirements:
+            match:
+                AOR: 'carol'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:carol-office@\[::2\]:5062'
+                Expiration: '15'
+        requirements:
+            match:
+                AOR: 'carol'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                Contact: 'sip:carol-home@\[::3\]:5063'
+                Expiration: '20'
+        requirements:
+            match:
+                AOR: 'carol'
+        count: '1'
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - buildoption: 'TEST_FRAMEWORK'
+        - python: 'twisted'
+        - python: 'starpy'
+        - sipp:
+            version: 'v3.3'
+        - asterisk: 'res_pjsip'
+    tags:
+        - pjsip
+
diff --git a/tests/channels/pjsip/registration/inbound/nominal/single_contact/tests.yaml b/tests/channels/pjsip/registration/inbound/nominal/single_contact/tests.yaml
index a4bae5f..60b6e13 100644
--- a/tests/channels/pjsip/registration/inbound/nominal/single_contact/tests.yaml
+++ b/tests/channels/pjsip/registration/inbound/nominal/single_contact/tests.yaml
@@ -2,3 +2,4 @@
 tests:
     - test: 'authed'
     - test: 'unauthed'
+    - test: 'unauthed_drop_options'
diff --git a/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..c9361f3
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,61 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw
+
+[alice](endpoint-template)
+aors=alice
+
+[alice]
+type=aor
+max_contacts=1
+minimum_expiration=5
+default_expiration=30
+
+[bob](endpoint-template)
+aors=bob
+
+[bob]
+type=aor
+max_contacts=1
+minimum_expiration=5
+default_expiration=30
+
+[charlie](endpoint-template)
+aors=charlie
+
+[charlie]
+type=aor
+max_contacts=1
+minimum_expiration=5
+default_expiration=30
+
+[carol](endpoint-template)
+aors=carol
+
+[carol]
+type=aor
+max_contacts=1
+minimum_expiration=5
+default_expiration=30
+
diff --git a/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/sipp/register-noauth.xml b/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/sipp/register-noauth.xml
new file mode 100644
index 0000000..ebd3be0
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/sipp/register-noauth.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+        Contact: <sip:[service]@[local_ip]:[local_port]>;transport=[transport]
+        Subject: Performance Test
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+        <action>
+		<ereg regexp="sip:((alice|bob)@127.0.0.1:506[1-2]>;expires=(30|2[5-9])|(charlie|carol)@.::1.:506[3-4]>;expires=(30|2[5-9]))" search_in="hdr" header="Contact:" check_it="true" assign_to="1" />
+	</action>
+    </recv>
+
+    <Reference variables="1" />
+
+</scenario>
diff --git a/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/test-config.yaml b/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/test-config.yaml
new file mode 100644
index 0000000..9c7d344
--- /dev/null
+++ b/tests/channels/pjsip/registration/inbound/nominal/single_contact/unauthed_drop_options/test-config.yaml
@@ -0,0 +1,99 @@
+testinfo:
+    summary:     'Register a single contact per AOR with no authentication'
+    description: |
+        'Using all combinations of IPv4/IPv6 and UDP/TCP, run SIPp scenarios
+         that register a single contact per AOR.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+
+test-object-config:
+    fail-on-any: False
+    reactor-timeout: 10
+    test-iterations:
+        -
+            scenarios:
+                # IPv4 & UDP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
+                # IPv4 & TCP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth.xml', '-i': '127.0.0.1', '-p': '5062', '-t': 't1', '-s': 'bob'} }
+
+                # IPv6 & UDP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5063', '-s': 'charlie'} }
+
+                # IPv6 & TCP - register with no authentication
+                - { 'key-args': {'scenario': 'register-noauth.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5064', '-t': 't1', '-s': 'carol'} }
+
+ami-config:
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                AOR: 'alice'
+        requirements:
+            match:
+                Contact: 'sip:alice at 127.0.0.1:5061'
+                Expiration: '30'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                AOR: 'bob'
+        requirements:
+            match:
+                Contact: 'sip:bob at 127.0.0.1:5062'
+                Expiration: '30'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                AOR: 'charlie'
+        requirements:
+            match:
+                Contact: 'sip:charlie@\[::1\]:5063'
+                Expiration: '30'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                AOR: 'carol'
+        requirements:
+            match:
+                Contact: 'sip:carol@\[::1\]:5064'
+                Expiration: '30'
+        count: '1'
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - buildoption: 'TEST_FRAMEWORK'
+        - python: 'twisted'
+        - python: 'starpy'
+        - sipp:
+            version: 'v3.3'
+        - asterisk: 'res_pjsip'
+    tags:
+        - pjsip
+
diff --git a/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..ca0dbb7
--- /dev/null
+++ b/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,21 @@
+[global]
+type=global
+debug=yes
+
+[local-transport]
+type=transport
+bind=127.0.0.1
+protocol=udp
+
+[alice]
+type=endpoint
+transport=local-transport
+allow=g722,ulaw,alaw
+context=default
+aors=alice
+
+[alice]
+type=aor
+contact=sip:alice at 127.0.0.1:5061
+max_contacts=1
+mailboxes=alice
diff --git a/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/sipp/mwi_subscription.xml b/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/sipp/mwi_subscription.xml
new file mode 100644
index 0000000..98fe44e
--- /dev/null
+++ b/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/sipp/mwi_subscription.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Subscribe">
+  <!-- Subscribe -->
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: "alice" <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: "alice" <sip:[service]@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Max-Forwards: 70
+      Event: message-summary
+      Expires: 300
+      Accept: application/simple-message-summary
+      Allow-Events: message-summary
+      User-Agent: SIPp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" rtd="true">
+    <action>
+          <ereg regexp="(;tag=.*)" header="To:" search_in="hdr" check_it="true" assign_to="to_tag"/>
+    </action>
+  </recv>
+
+  <recv request="NOTIFY" crlf="true">
+    <action>
+      <ereg regexp="message-summary" check_it="true" search_in="hdr" header="Event" assign_to="subevent" />
+      <ereg regexp="active;expires=[2,3][0,9][0,5-9]" check_it="true" search_in="hdr" header="Subscription-State" assign_to="substate" />
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- Resubscribe -->
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: "alice" <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: "alice" <sip:[service]@[remote_ip]:[remote_port]>[$to_tag]
+      Call-ID: [call_id]
+      CSeq: 2 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Max-Forwards: 70
+      Event: message-summary
+      Expires: 600
+      Accept: application/simple-message-summary
+      Allow-Events: message-summary
+      User-Agent: SIPp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" rtd="true" />
+
+  <recv request="NOTIFY" crlf="true">
+    <action>
+      <ereg regexp="message-summary" check_it="true" search_in="hdr" header="Event" assign_to="resubevent" />
+      <ereg regexp="active;expires=[5,6][0,9][0,5-9]" check_it="true" search_in="hdr" header="Subscription-State" assign_to="resubstate" />
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <pause milliseconds="1000"/>
+
+  <!-- Unsubscribe -->
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: "alice" <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: "alice" <sip:[service]@[remote_ip]:[remote_port]>[$to_tag]
+      Call-ID: [call_id]
+      CSeq: 3 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Max-Forwards: 70
+      Event: message-summary
+      Expires: 0
+      Accept: application/simple-message-summary
+      Allow-Events: message-summary
+      User-Agent: SIPp
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" rtd="true" />
+
+  <recv request="NOTIFY" crlf="true">
+    <action>
+      <ereg regexp="message-summary" check_it="true" search_in="hdr" header="Event" assign_to="unsubevent" />
+      <ereg regexp="terminated" check_it="true" search_in="hdr" header="Subscription-State" assign_to="unsubstate" />
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <Reference variables="subevent,substate,resubevent,resubstate,unsubevent,unsubstate" />
+
+</scenario>
diff --git a/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/test-config.yaml b/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/test-config.yaml
new file mode 100644
index 0000000..8b93740
--- /dev/null
+++ b/tests/channels/pjsip/subscriptions/mwi/sub_setup_teardown_drop_options/test-config.yaml
@@ -0,0 +1,31 @@
+testinfo:
+    summary:     'Test MWI subscribe, un-unsubscribe, and re-subscribe for PJSIP.'
+    description: |
+        'For MWI this subscribes, re-subscribes, and then un-subscribes. It
+        checks the Event and Subscription-State headers to ensure they are what
+        is expected.'
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - python: 'twisted'
+        - python: 'starpy'
+        - asterisk: 'res_pjsip'
+        - sipp:
+            version: 'v3.0'
+    tags:
+        - pjsip
+
+test-modules:
+    add-test-to-search-path: 'True'
+    test-object:
+        config-section: test-case-config
+        typename: 'sipp.SIPpTestCase'
+
+test-case-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'mwi_subscription.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
diff --git a/tests/channels/pjsip/subscriptions/mwi/tests.yaml b/tests/channels/pjsip/subscriptions/mwi/tests.yaml
index dead83e..2769c1e 100644
--- a/tests/channels/pjsip/subscriptions/mwi/tests.yaml
+++ b/tests/channels/pjsip/subscriptions/mwi/tests.yaml
@@ -1,7 +1,8 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
-    - test: 'missing_aor'
     - dir: 'unsolicited'
+    - test: 'missing_aor'
     - test: 'mwi_aggregate'
     - test: 'no_accept_header'
     - test: 'sub_setup_teardown'
+    - test: 'sub_setup_teardown_drop_options'
diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml
index 9852176..3f9ff10 100644
--- a/tests/channels/pjsip/tests.yaml
+++ b/tests/channels/pjsip/tests.yaml
@@ -29,6 +29,7 @@
     - test: 'endpoint_identify'
     - test: 'forward_loop'
     - test: 'handle_options_request'
+    - test: 'handle_options_request_drop_options'
     - test: 'headers'
     - test: 'hold'
     - test: 'hold_ice'
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/extensions.conf b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/extensions.conf
new file mode 100644
index 0000000..5452642
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/extensions.conf
@@ -0,0 +1,24 @@
+[general]
+
+[globals]
+
+[transfertest]
+exten => bob,1,NoOp()
+	same => n,Dial(PJSIP/bob)
+	same => n,Hangup()
+
+exten => bob_two,1,NoOp()
+	same => n,Set(TRANSFER_CONTEXT=other)
+	same => n,Dial(PJSIP/bob)
+	same => n,Hangup()
+
+exten => charlie,1,NoOp()
+	same => n,Dial(PJSIP/charlie)
+	same => n,Hangup()
+
+[other]
+; Second test iteration should execute
+exten => charlie,1,NoOp()
+	same => n,Dial(PJSIP/charlie)
+	same => n,Hangup()
+
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/pjsip.conf b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..271bed7
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/configs/ast1/pjsip.conf
@@ -0,0 +1,61 @@
+[global]
+type=global
+debug=yes
+
+[local-transport]
+type=transport
+bind=127.0.0.1
+protocol=udp
+
+[alice]
+type=endpoint
+allow=g722,ulaw,alaw
+context=transfertest
+direct_media=no
+media_address=127.0.0.1
+aors=alice
+
+[alice]
+type=aor
+max_contacts=1
+contact=sip:alice at 127.0.0.2:5060\;transport=udp
+
+[bob]
+type=endpoint
+allow=g722,ulaw,alaw
+context=transfertest
+direct_media=no
+media_address=127.0.0.1
+aors=bob
+
+[bob]
+type=aor
+max_contacts=1
+contact=sip:bob at 127.0.0.3:5060\;transport=udp
+
+[bob_two]
+type=endpoint
+allow=ulaw
+context=transfertest
+direct_media=no
+media_address=127.0.0.1
+aors=bob_two
+
+[bob_two]
+type=aor
+max_contacts=1
+contact=sip:bob_two at 127.0.0.3:5060\;transport=udp
+
+[charlie]
+type=endpoint
+allow=g722,ulaw,alaw
+context=transfertest
+direct_media=no
+media_address=127.0.0.1
+aors=charlie
+
+[charlie]
+type=aor
+max_contacts=1
+contact=sip:charlie at 127.0.0.4:5060\;transport=udp
+
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/alice.xml b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/alice.xml
new file mode 100644
index 0000000..bc16036
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/alice.xml
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Send Call">
+
+  <send retrans="500">
+    <![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" />
+  <recv response="180" optional="true" />
+  <recv response="183" optional="true" />
+
+  <recv response="200" rtd="true">
+    <!-- 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>
+    <![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>
+
+  <pause milliseconds="1000" />
+
+  <!-- Put call on hold -->
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]2
+      [last_From:]
+      [last_To:]
+      [last_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
+      a=sendonly
+
+    ]]>
+  </send>
+
+  <recv response="100" optional="true" />
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]2
+      [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>
+
+  <pause milliseconds="4000" />
+
+  <!-- Blind transfer bob to charlie -->
+  <send retrans="500">
+    <![CDATA[
+
+      REFER sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+      [last_Via:]3
+      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: 3 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>
+
+  <!-- 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:]4
+      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>
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/bob.xml b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/bob.xml
new file mode 100644
index 0000000..3870eac
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/bob.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic UAS responder">
+
+  <recv request="INVITE" crlf="true" />
+
+  <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>
+
+  <recv request="BYE" />
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/charlie.xml b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/charlie.xml
new file mode 100644
index 0000000..1966182
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/sipp/charlie.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic UAS responder">
+
+  <recv request="INVITE" crlf="true">
+      <action>
+          <!-- Save the From tag. We'll need it when we send our BYE -->
+          <ereg regexp="(;tag=.*)"
+              header="From:"
+              search_in="hdr"
+              check_it="true"
+              assign_to="remote_tag"/>
+          <!-- Save the From user portion of URI. We'll need it when we send our BYE -->
+          <ereg regexp="(sip:bob|sip:bob_two)"
+              header="From:"
+              search_in="hdr"
+              check_it="true"
+              assign_to="remote_user"/>
+          <!-- Check the Referred-By header. -->
+          <ereg regexp="sip:alice at 127.0.0.2:5060"
+              header="Referred-By"
+              search_in="hdr"
+              check_it="true"
+              assign_to="referred_by"/>
+      </action>
+  </recv>
+
+  <!-- Answer inbound call -->
+  <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:charlie@[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>
+
+  <!-- Allow 5s of audio to be sent to bob -->
+  <pause milliseconds="5000" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE [$remote_user]@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:charlie@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
+      To: <[$remote_user]@[remote_ip]:[remote_port]>[$remote_tag]
+      Call-ID: [call_id]
+      CSeq: [cseq] BYE
+      Contact: sip:charlie@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+  <Reference variables="referred_by" />
+
+</scenario>
+
diff --git a/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/test-config.yaml b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/test-config.yaml
new file mode 100644
index 0000000..701cd3d
--- /dev/null
+++ b/tests/channels/pjsip/transfers/blind_transfer/caller_with_hold_drop_options/test-config.yaml
@@ -0,0 +1,130 @@
+testinfo:
+    summary:     'Test SIP Blind Transfer (caller transfers with hold)'
+    description: |
+        'This test verifies a SIP Blind transfer with putting the callee on
+        hold before the transfer occurs. This uses a SIPp instance each for
+        "Alice", "Bob", and "Charlie". Alice calls Bob through Asterisk. Alice
+        puts Bob on hold and Alice then blind transfers Bob to Charlie. A
+        second iteration is performed to ensure correct behavior when the
+        TRANSFER_CONTEXT channel variable is used. This test ensures that the
+        transfer was successful and that various channel variables are set
+        along with Bob being placed on hold and taken off hold appropriately.'
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk : 'app_dial'
+        - asterisk : 'res_pjsip'
+        - sipp :
+            version : 'v3.4.1'
+    tags:
+        - pjsip
+        - transfer
+
+test-modules:
+    add-test-to-search-path: 'True'
+    test-object:
+        config-section: test-case-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+
+test-case-config:
+    connect-ami: 'True'
+    fail-on-any: False
+    test-iterations:
+        # First iteration
+        -
+            scenarios:
+                # Charlie receives transfered call and sends audio to Bob.
+                - { 'key-args': {'scenario': 'charlie.xml', '-p': '5060', '-i': '127.0.0.4', '-timeout': '20s', '-min_rtp_port': '6004', '-max_rtp_port': '6008', '-mi': '127.0.0.4'},
+                    'ordered-args': ['-timeout_error', '-key', 'custom_media_port', '6004'] }
+                # Bob receives call from Alice and sends audio.
+                - { 'key-args': {'scenario': 'bob.xml', '-p': '5060', '-i': '127.0.0.3', '-s': 'alice', '-timeout': '20s', '-min_rtp_port': '6004', '-max_rtp_port': '6008', '-mi': '127.0.0.3'},
+                    'ordered-args': ['-timeout_error', '-key', 'custom_media_port', '6004'] }
+                # Alice calls Bob and sends audio. Alice then attempts to blind transfer Bob to Charlie.
+                - { 'key-args': {'scenario': 'alice.xml', '-p': '5060', '-i': '127.0.0.2', '-s': 'bob', '-timeout': '20s', '-min_rtp_port': '6004', '-max_rtp_port': '6008', '-mi': '127.0.0.2'},
+                    'ordered-args': ['-timeout_error', '-key', 'custom_media_port', '6004'] }
+        # Second iteration
+        -
+            scenarios:
+                # Charlie receives transfered call and sends audio to Bob.
+                - { 'key-args': {'scenario': 'charlie.xml', '-p': '5060', '-i': '127.0.0.4', '-timeout': '20s', '-min_rtp_port': '6004', '-max_rtp_port': '6008', '-mi': '127.0.0.4'},
+                    'ordered-args': ['-timeout_error', '-key', 'custom_media_port', '6004'] }
+                # Bob receives call from Alice and sends audio.
+                - { 'key-args': {'scenario': 'bob.xml', '-p': '5060', '-i': '127.0.0.3', '-s': 'alice', '-timeout': '20s', '-min_rtp_port': '6004', '-max_rtp_port': '6008', '-mi': '127.0.0.3'},
+                    'ordered-args': ['-timeout_error', '-key', 'custom_media_port', '6004'] }
+                # Alice calls Bob and sends audio. Alice then attempts to blind transfer Bob to Charlie.
+                - { 'key-args': {'scenario': 'alice.xml', '-p': '5060', '-i': '127.0.0.2', '-s': 'bob_two', '-timeout': '20s', '-min_rtp_port': '6004', '-max_rtp_port': '6008', '-mi': '127.0.0.2'},
+                    'ordered-args': ['-timeout_error', '-key', 'custom_media_port', '6004'] }
+
+ami-config:
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'MusicOnHoldStart'
+                    Channel: 'PJSIP/bob-.{8}'
+            count: 2
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'MusicOnHoldStop'
+                    Channel: 'PJSIP/bob-.{8}'
+            count: 2
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'VarSet'
+                    Variable: 'SIPTRANSFER'
+                    Value: 'yes'
+            count: 2
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'VarSet'
+                    Channel: 'PJSIP/bob-.{8}'
+                    Variable: 'SIPREFERRINGCONTEXT'
+                    Value: 'transfertest'
+            count: 1
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'VarSet'
+                    Channel: 'PJSIP/bob-.{8}'
+                    Variable: 'SIPREFERRINGCONTEXT'
+                    Value: 'other'
+            count: 1
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'VarSet'
+                    Channel: 'PJSIP/bob-.{8}'
+                    Variable: '_{0,2}SIPREFERREDBYHDR'
+                    Value: 'sip:alice at 127.0.0.2:5060'
+            count: 2
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'VarSet'
+                    Variable: 'SIPREFERTOHDR'
+                    Value: 'sip:charlie at 127.0.0.1'
+            count: 2
+        -
+            type: 'headermatch'
+            conditions:
+                match:
+                    Event: 'BlindTransfer'
+                    TransfererChannel: 'PJSIP/alice-.{8}'
+            count: 2
+
diff --git a/tests/channels/pjsip/transfers/blind_transfer/tests.yaml b/tests/channels/pjsip/transfers/blind_transfer/tests.yaml
index da9a1be..a529add 100644
--- a/tests/channels/pjsip/transfers/blind_transfer/tests.yaml
+++ b/tests/channels/pjsip/transfers/blind_transfer/tests.yaml
@@ -7,5 +7,6 @@
     - test: 'caller_direct_media'
     - test: 'caller_refer_only'
     - test: 'caller_with_hold'
+    - test: 'caller_with_hold_drop_options'
     - test: 'goto_on_blindxfr'
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ad526af5686d9d377d00c7a4891f3fa60156479
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list