summaryrefslogtreecommitdiff
path: root/pjsip-apps
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-08-05 20:14:39 +0000
committerBenny Prijono <bennylp@teluu.com>2008-08-05 20:14:39 +0000
commite73b94482189299eaf05fdca2850650d1f033663 (patch)
tree63c06c4610e9003ce8488437218030119d13693c /pjsip-apps
parentc99d9cd5ab9be3bce89f84a54abbe87348529a2e (diff)
Ticket #585: Handle non-SIP URI in Contact header of incoming INVITE and SUBSCRIBE requests
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2194 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r--pjsip-apps/src/test-pjsua/scripts-sendto/360_non_sip_uri.py27
-rw-r--r--pjsip-apps/src/test-pjsua/scripts-sendto/361_non_sip_uri.py26
-rw-r--r--pjsip-apps/src/test-pjsua/scripts-sendto/362_non_sip_uri.py27
-rw-r--r--pjsip-apps/src/test-pjsua/scripts-sendto/363_non_sip_uri_subscribe.py31
-rw-r--r--pjsip-apps/src/test-pjsua/scripts-sendto/364_non_sip_uri_subscribe.py30
5 files changed, 141 insertions, 0 deletions
diff --git a/pjsip-apps/src/test-pjsua/scripts-sendto/360_non_sip_uri.py b/pjsip-apps/src/test-pjsua/scripts-sendto/360_non_sip_uri.py
new file mode 100644
index 00000000..ad827cc7
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-sendto/360_non_sip_uri.py
@@ -0,0 +1,27 @@
+# $Id:$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Some non-SIP URI's in Contact header
+#
+complete_msg = \
+"""INVITE sip:localhost SIP/2.0
+Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9
+Max-Forwards: 70
+From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e59c6961d298
+To: <sip:localhost>
+Call-ID: 3373d9eb32aa458db7e69c7ea51e0bd7
+CSeq: 0 INVITE
+Contact: mailto:dontspam@pjsip.org
+Contact: <mailto:dontspam@pjsip.org>
+Contact: http://www.pjsip.org/the%20path.cgi?pname=pvalue
+Contact: <sip:localhost>
+User-Agent: PJSUA v0.9.0-trunk/win32
+Content-Length: 0
+"""
+
+
+sendto_cfg = sip.SendtoCfg( "Non SIP URI in Contact",
+ "--null-audio --auto-answer 200",
+ "", 200, complete_msg=complete_msg)
+
diff --git a/pjsip-apps/src/test-pjsua/scripts-sendto/361_non_sip_uri.py b/pjsip-apps/src/test-pjsua/scripts-sendto/361_non_sip_uri.py
new file mode 100644
index 00000000..b21f6eb1
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-sendto/361_non_sip_uri.py
@@ -0,0 +1,26 @@
+# $Id:$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# No SIP URI in Contact header
+#
+complete_msg = \
+"""INVITE sip:localhost SIP/2.0
+Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9
+Max-Forwards: 70
+From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e59c6961d298
+To: <sip:localhost>
+Call-ID: 3373d9eb32aa458db7e69c7ea51e0bd7
+CSeq: 0 INVITE
+Contact: mailto:dontspam@pjsip.org
+Contact: <mailto:dontspam@pjsip.org>
+Contact: http://www.pjsip.org/the%20path.cgi?pname=pvalue
+User-Agent: PJSUA v0.9.0-trunk/win32
+Content-Length: 0
+"""
+
+
+sendto_cfg = sip.SendtoCfg( "No SIP URI in Contact",
+ "--null-audio --auto-answer 200",
+ "", 500, complete_msg=complete_msg)
+
diff --git a/pjsip-apps/src/test-pjsua/scripts-sendto/362_non_sip_uri.py b/pjsip-apps/src/test-pjsua/scripts-sendto/362_non_sip_uri.py
new file mode 100644
index 00000000..25e30e08
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-sendto/362_non_sip_uri.py
@@ -0,0 +1,27 @@
+# $Id:$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Some non-SIP URI's in Contact header
+#
+complete_msg = \
+"""INVITE sip:localhost SIP/2.0
+Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9
+Max-Forwards: 70
+From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e59c6961d298
+To: <sip:localhost>
+Call-ID: 3373d9eb32aa458db7e69c7ea51e0bd7
+CSeq: 0 INVITE
+Contact: <sip:localhost>
+Contact: mailto:dontspam@pjsip.org
+Contact: <mailto:dontspam@pjsip.org>
+Contact: http://www.pjsip.org/the%20path.cgi?pname=pvalue
+User-Agent: PJSUA v0.9.0-trunk/win32
+Content-Length: 0
+"""
+
+
+sendto_cfg = sip.SendtoCfg( "Non SIP URI in Contact",
+ "--null-audio --auto-answer 200",
+ "", 200, complete_msg=complete_msg)
+
diff --git a/pjsip-apps/src/test-pjsua/scripts-sendto/363_non_sip_uri_subscribe.py b/pjsip-apps/src/test-pjsua/scripts-sendto/363_non_sip_uri_subscribe.py
new file mode 100644
index 00000000..a191fee0
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-sendto/363_non_sip_uri_subscribe.py
@@ -0,0 +1,31 @@
+# $Id:$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Some non-SIP URI's in Contact header
+#
+complete_msg = \
+"""SUBSCRIBE sip:localhost SIP/2.0
+Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9
+Max-Forwards: 70
+From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e59c6961d298
+To: <sip:localhost>
+Call-ID: 3373d9eb32aa458db7e69c7ea51e0bd7
+CSeq: 0 SUBSCRIBE
+Contact: mailto:dontspam@pjsip.org
+Contact: <mailto:dontspam@pjsip.org>
+Contact: http://www.pjsip.org/the%20path.cgi?pname=pvalue
+Contact: <sip:localhost>
+Event: presence
+Expires: 600
+Accept: application/pidf+xml, application/xpidf+xml
+Allow-Events: presence, refer
+User-Agent: PJSUA v0.9.0-trunk/win32
+Content-Length: 0
+"""
+
+
+sendto_cfg = sip.SendtoCfg( "Non SIP URI in Contact",
+ "--null-audio --auto-answer 200",
+ "", 200, complete_msg=complete_msg)
+
diff --git a/pjsip-apps/src/test-pjsua/scripts-sendto/364_non_sip_uri_subscribe.py b/pjsip-apps/src/test-pjsua/scripts-sendto/364_non_sip_uri_subscribe.py
new file mode 100644
index 00000000..88741bca
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-sendto/364_non_sip_uri_subscribe.py
@@ -0,0 +1,30 @@
+# $Id:$
+import inc_sip as sip
+import inc_sdp as sdp
+
+# Some non-SIP URI's in Contact header
+#
+complete_msg = \
+"""SUBSCRIBE sip:localhost SIP/2.0
+Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9
+Max-Forwards: 70
+From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e59c6961d298
+To: <sip:localhost>
+Call-ID: 3373d9eb32aa458db7e69c7ea51e0bd7
+CSeq: 0 SUBSCRIBE
+Contact: mailto:dontspam@pjsip.org
+Contact: <mailto:dontspam@pjsip.org>
+Contact: http://www.pjsip.org/the%20path.cgi?pname=pvalue
+Event: presence
+Expires: 600
+Accept: application/pidf+xml, application/xpidf+xml
+Allow-Events: presence, refer
+User-Agent: PJSUA v0.9.0-trunk/win32
+Content-Length: 0
+"""
+
+
+sendto_cfg = sip.SendtoCfg( "Non SIP URI in Contact",
+ "--null-audio --auto-answer 200",
+ "", 400, complete_msg=complete_msg)
+