diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_hangup/configs/ast1/extensions.conf b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/configs/ast1/extensions.conf
new file mode 100644
index 000000000..de8ba2ad4
--- /dev/null
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/configs/ast1/extensions.conf
@@ -0,0 +1,35 @@
+[default]
+
+exten = expect_437_1,1,NoOp()
+same  = n,Wait(1)
+same  = n,Progress()
+same  = n,Wait(1)
+same  = n,PJSIPHangup(437)
+
+exten = expect_437_2,1,NoOp()
+same  = n,Wait(1)
+same  = n,Progress()
+same  = n,Wait(1)
+same  = n,PJSIPHangup(UNSUPPORTED_CERTIFICATE)
+
+exten = expect_200,1,NoOp()
+same  = n,Wait(1)
+same  = n,Progress()
+same  = n,Wait(1)
+same  = n,Answer()
+same  = n,PJSIPHangup(437)
+
+exten = expect_603_1,1,NoOp()
+same  = n,Wait(1)
+same  = n,Progress()
+same  = n,Wait(1)
+same  = n,PJSIPHangup(999)
+
+exten = expect_603_2,1,NoOp()
+same  = n,Wait(1)
+same  = n,Progress()
+same  = n,Wait(1)
+same  = n,PJSIPHangup(SOMETHINGOROTHER)
+
+
+
diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_hangup/configs/ast1/pjsip.conf b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/configs/ast1/pjsip.conf
new file mode 100644
index 000000000..67a24ff8e
--- /dev/null
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/configs/ast1/pjsip.conf
@@ -0,0 +1,28 @@
+[system]
+type=system
+timer_t1=100
+timer_b=6400
+
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[endpoint_t](!)
+type=endpoint
+context=default
+transport=local
+direct_media=no
+disallow=all
+allow=ulaw
+
+[aor_t](!)
+type=aor
+max_contacts=1
+
+[alice](endpoint_t)
+aors=alice
+
+[alice](aor_t)
+contact=sip:alice@127.0.0.1:5061
+
diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-200-then-bye.xml b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-200-then-bye.xml
new file mode 100644
index 000000000..236599b34
--- /dev/null
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-200-then-bye.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Send INVITE from an inbound channel">
+  <send retrans="500">
+    <![CDATA[
+      INVITE sip:[dest]@[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=[pid]SIPpTag00[call_number]
+      To: sut <sip:[dest]@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:sipp@[local_ip]:[local_port]
+      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 [media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+    ]]>
+  </send>
+
+  <recv response="100" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      ACK sip:[dest]@[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=[pid]SIPpTag00[call_number]
+      To: sut <sip:[dest]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:sipp@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <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:]
+      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
+      Allow: INVITE, ACK, MESSAGE, BYE
+      Content-Lnegth: 0
+    ]]>
+  </send>
+
+
+</scenario>
diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-437.xml b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-437.xml
new file mode 100644
index 000000000..eed864dc1
--- /dev/null
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-437.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Send INVITE from an inbound channel">
+  <send retrans="500">
+    <![CDATA[
+      INVITE sip:[dest]@[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=[pid]SIPpTag00[call_number]
+      To: sut <sip:[dest]@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:sipp@[local_ip]:[local_port]
+      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 [media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+    ]]>
+  </send>
+
+  <recv response="100">
+  </recv>
+
+  <recv response="183">
+  </recv>
+
+  <recv response="437">
+  </recv>
+
+  <send>
+    <![CDATA[
+      ACK sip:[dest]@[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=[pid]SIPpTag00[call_number]
+      To: sut <sip:[dest]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:sipp@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+</scenario>
diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-603.xml b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-603.xml
new file mode 100644
index 000000000..dfe2423be
--- /dev/null
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/sipp/invite-expects-603.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Send INVITE from an inbound channel">
+  <send retrans="500">
+    <![CDATA[
+      INVITE sip:[dest]@[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=[pid]SIPpTag00[call_number]
+      To: sut <sip:[dest]@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:sipp@[local_ip]:[local_port]
+      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 [media_port] RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+    ]]>
+  </send>
+
+  <recv response="100">
+  </recv>
+
+  <recv response="183">
+  </recv>
+
+  <recv response="603">
+  </recv>
+
+  <send>
+    <![CDATA[
+      ACK sip:[dest]@[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=[pid]SIPpTag00[call_number]
+      To: sut <sip:[dest]@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:sipp@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+    ]]>
+  </send>
+
+</scenario>
diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_hangup/test-config.yaml b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/test-config.yaml
new file mode 100644
index 000000000..205ad1b53
--- /dev/null
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_hangup/test-config.yaml
@@ -0,0 +1,47 @@
+testinfo:
+    summary: 'Tests PJSIPHangup'
+    description:
+        'Checks PJSIPHangup with good parameters (437 and UNSUPPORTED_CERTIFICATE)
+        which should return 437, and with bad parameters (999 and SOMETHINGOROTHER),
+        which should return 603.  Also test PJSIPHangup after an Answer() which should
+        be ignored and return a 200, then a BYE.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    memcheck-delay-stop: 7
+    fail-on-any: True
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': { 'scenario':'invite-expects-200-then-bye.xml', '-i':'127.0.0.1',
+                        '-p':'5061', '-s':'alice' },
+                  'ordered-args': [ '-bind_local', '-key', 'dest', 'expect_200']}
+
+                - { 'key-args': { 'scenario':'invite-expects-437.xml', '-i':'127.0.0.1',
+                        '-p':'5062', '-s':'alice' },
+                  'ordered-args': [ '-bind_local', '-key', 'dest', 'expect_437_1']}
+
+                - { 'key-args': { 'scenario':'invite-expects-437.xml', '-i':'127.0.0.1',
+                        '-p':'5063', '-s':'alice' },
+                  'ordered-args': [ '-bind_local', '-key', 'dest', 'expect_437_2']}
+
+                - { 'key-args': { 'scenario':'invite-expects-603.xml', '-i':'127.0.0.1',
+                        '-p':'5064', '-s':'alice' },
+                  'ordered-args': [ '-bind_local', '-key', 'dest', 'expect_603_1']}
+
+                - { 'key-args': { 'scenario':'invite-expects-603.xml', '-i':'127.0.0.1',
+                        '-p':'5065', '-s':'alice' },
+                  'ordered-args': [ '-bind_local', '-key', 'dest', 'expect_603_2']}
+
+
+properties:
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'chan_pjsip'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/dialplan_functions/tests.yaml b/tests/channels/pjsip/dialplan_functions/tests.yaml
index 59821e5e9..95d4cc7d4 100644
--- a/tests/channels/pjsip/dialplan_functions/tests.yaml
+++ b/tests/channels/pjsip/dialplan_functions/tests.yaml
@@ -10,3 +10,5 @@ tests:
     - test: 'pjsip_header'
     - test: 'pjsip_parse_uri'
     - test: 'pjsip_session_refresh'
+    - test: 'pjsip_hangup'
+    
\ No newline at end of file