diff options
Diffstat (limited to 'pjsip-apps/src/test-pjsua/scripts-recvfrom')
11 files changed, 0 insertions, 309 deletions
diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/200_reg_good_enocredentiall.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/200_reg_good_enocredentiall.py deleted file mode 100644 index 9a0cd41a..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/200_reg_good_enocredentiall.py +++ /dev/null @@ -1,15 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT" - -req1 = sip.RecvfromTransaction("", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""], - expect="PJSIP_ENOCREDENTIAL" - ) - -recvfrom_cfg = sip.RecvfromCfg("Failed registration test", - pjsua, [req1]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/201_reg_good_ok.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/201_reg_good_ok.py deleted file mode 100644 index 5532d73f..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/201_reg_good_ok.py +++ /dev/null @@ -1,23 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--username user --realm python --password passwd --auto-update-nat=0" - -req1 = sip.RecvfromTransaction("Initial registration", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""], - expect="SIP/2.0 401" - ) - -req2 = sip.RecvfromTransaction("Registration retry with auth", 200, - include=["REGISTER sip", "Authorization:", - "realm=\"python\"", "username=\"user\"", - "nonce=\"1234\"", "response="], - expect="registration success" - ) - -recvfrom_cfg = sip.RecvfromCfg("Successful registration test", - pjsua, [req1, req2]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/202_reg_good_ok_wildcard.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/202_reg_good_ok_wildcard.py deleted file mode 100644 index 4fd9cdb7..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/202_reg_good_ok_wildcard.py +++ /dev/null @@ -1,23 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--username user --realm \"*\" --password passwd --auto-update-nat=0" - -req1 = sip.RecvfromTransaction("Initial registration", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""], - expect="SIP/2.0 401" - ) - -req2 = sip.RecvfromTransaction("Registration retry with auth", 200, - include=["REGISTER sip", "Authorization:", - "realm=\"python\"", "username=\"user\"", - "nonce=\"1234\"", "response="], - expect="registration success" - ) - -recvfrom_cfg = sip.RecvfromCfg("Successful registration with wildcard realm test", - pjsua, [req1, req2]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/205_reg_good_no_realm.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/205_reg_good_no_realm.py deleted file mode 100644 index 69c0ecfd..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/205_reg_good_no_realm.py +++ /dev/null @@ -1,16 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--realm=provider --user=username --password=password" - -req1 = sip.RecvfromTransaction("", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""], - expect="PJSIP_ENOCREDENTIAL" - ) - -recvfrom_cfg = sip.RecvfromCfg("Failed registration because of realm test", - pjsua, [req1]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/206_reg_good_efailedcredential.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/206_reg_good_efailedcredential.py deleted file mode 100644 index 11f11bfc..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/206_reg_good_efailedcredential.py +++ /dev/null @@ -1,26 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -# Authentication failure test with same nonce - - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--realm=python --user=username --password=password" - -req1 = sip.RecvfromTransaction("Initial request", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""] - ) - -req2 = sip.RecvfromTransaction("REGISTER retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"1\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""], - expect="PJSIP_EFAILEDCREDENTIAL" - ) - - -recvfrom_cfg = sip.RecvfromCfg("Authentication failure with same nonce", - pjsua, [req1, req2]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/208_reg_good_retry_nonce_ok.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/208_reg_good_retry_nonce_ok.py deleted file mode 100644 index 5f47a7bd..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/208_reg_good_retry_nonce_ok.py +++ /dev/null @@ -1,29 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--realm=python --user=username --password=password " + \ - "--auto-update-nat=0" - -req1 = sip.RecvfromTransaction("Initial request", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""] - ) - -req2 = sip.RecvfromTransaction("REGISTER first retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"1\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"2\", stale=true"] - ) - - -req3 = sip.RecvfromTransaction("REGISTER retry with new nonce", 200, - include=["REGISTER sip", "Authorization", "nonce=\"2\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - expect="registration success" - ) - -recvfrom_cfg = sip.RecvfromCfg("Authentication okay after retry with new nonce", - pjsua, [req1, req2, req3]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/215_reg_good_multi_ok.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/215_reg_good_multi_ok.py deleted file mode 100644 index 32970f41..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/215_reg_good_multi_ok.py +++ /dev/null @@ -1,28 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--username theuser1 --realm python1 --password passwd --next-cred " + \ - "--username theuser2 --realm python2 --password passwd " + \ - "--auto-update-nat=0" - -req1 = sip.RecvfromTransaction("Initial registration", 401, - include=["REGISTER sip"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python1\", nonce=\"1234\"", - "WWW-Authenticate: Digest realm=\"python2\", nonce=\"6789\""], - expect="SIP/2.0 401" - ) - -req2 = sip.RecvfromTransaction("Registration retry with auth", 200, - include=["REGISTER sip", - "Authorization:[\\s\\S]+Authorization:", # Must have 2 Auth hdrs - "realm=\"python1\"", "realm=\"python2\"", - "username=\"theuser1\"", "username=\"theuser2\"", - "nonce=\"1234\"", "nonce=\"6789\"", - "response="], - expect="registration success" - ) - -recvfrom_cfg = sip.RecvfromCfg("Multiple authentication challenges", - pjsua, [req1, req2]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/220_reg_good_ims_ok.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/220_reg_good_ims_ok.py deleted file mode 100644 index 3d02a1d6..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/220_reg_good_ims_ok.py +++ /dev/null @@ -1,26 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--username user@ims-domain --realm python --password passwd --use-ims --auto-update-nat=0" - -req1 = sip.RecvfromTransaction("Initial registration", 401, - include=["REGISTER sip", "Authorization", - "username=\"user@ims-domain\"", - "realm=\"python\""], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""], - expect="SIP/2.0 401" - ) - -req2 = sip.RecvfromTransaction("Registration retry with auth", 200, - include=["REGISTER sip", "Authorization:", - "realm=\"python\"", "username=\"user@ims-domain\"", - "nonce=\"1234\"", "response="], - # Must not have double Authorization header: - exclude=["Authorization:[\\s\\S]+Authorization:"], - expect="registration success" - ) - -recvfrom_cfg = sip.RecvfromCfg("Successful IMS registration test", - pjsua, [req1, req2]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/230_reg_bad_fail_stale_true.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/230_reg_bad_fail_stale_true.py deleted file mode 100644 index 396a7bc8..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/230_reg_bad_fail_stale_true.py +++ /dev/null @@ -1,41 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -# In this test we simulate broken server, where it always sends -# stale=true with all 401 responses. We should expect pjsip to -# retry the authentication until PJSIP_MAX_STALE_COUNT is -# exceeded. When pjsip retries the authentication, it should -# use the new nonce from server - - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--realm=python --user=username --password=password" - -req1 = sip.RecvfromTransaction("Initial request", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""] - ) - -req2 = sip.RecvfromTransaction("First retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"1\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"2\", stale=true"] - ) - -req3 = sip.RecvfromTransaction("Second retry retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"2\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"3\", stale=true"] - ) - -req4 = sip.RecvfromTransaction("Third retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"3\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"4\", stale=true"], - expect="PJSIP_EAUTHSTALECOUNT" - ) - -recvfrom_cfg = sip.RecvfromCfg("Failed registration retry (server rejects with stale=true) ", - pjsua, [req1, req2, req3, req4]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/231_reg_bad_fail_stale_false_nonce_changed.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/231_reg_bad_fail_stale_false_nonce_changed.py deleted file mode 100644 index ab0798d8..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/231_reg_bad_fail_stale_false_nonce_changed.py +++ /dev/null @@ -1,41 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -# In this test we simulate broken server, where: -# - it wants to signal that NONCE has change -# - but it sets stale=false -# For this case pjsip will retry authentication until -# PJSIP_MAX_STALE_COUNT is exceeded. -# - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--realm=python --user=username --password=password" - -req1 = sip.RecvfromTransaction("Initial request", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""] - ) - -req2 = sip.RecvfromTransaction("First retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"1\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"2\", stale=true"] - ) - -req3 = sip.RecvfromTransaction("Second retry retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"2\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"3\", stale=true"] - ) - -req4 = sip.RecvfromTransaction("Third retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"3\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"4\", stale=true"], - expect="PJSIP_EAUTHSTALECOUNT" - ) - -recvfrom_cfg = sip.RecvfromCfg("Failed registration retry (server rejects with stale=true) ", - pjsua, [req1, req2, req3, req4]) diff --git a/pjsip-apps/src/test-pjsua/scripts-recvfrom/234_reg_bad_stale_ok.py b/pjsip-apps/src/test-pjsua/scripts-recvfrom/234_reg_bad_stale_ok.py deleted file mode 100644 index 1be92c5f..00000000 --- a/pjsip-apps/src/test-pjsua/scripts-recvfrom/234_reg_bad_stale_ok.py +++ /dev/null @@ -1,41 +0,0 @@ -# $Id:$ -import inc_sip as sip -import inc_sdp as sdp - -# In this test we simulate broken server, where it wants to -# change the nonce, but it fails to set stale to true. In this -# case, we should expect pjsip to retry the authentication until -# PJSIP_MAX_STALE_COUNT is exceeded as it should have detected -# that that nonce has changed - - -pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \ - "--realm=python --user=username --password=password " + \ - "--auto-update-nat=0" - -req1 = sip.RecvfromTransaction("Initial request", 401, - include=["REGISTER sip"], - exclude=["Authorization"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""] - ) - -req2 = sip.RecvfromTransaction("First retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"1\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"2\""] - ) - -req3 = sip.RecvfromTransaction("Second retry retry", 401, - include=["REGISTER sip", "Authorization", "nonce=\"2\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"3\""] - ) - -req4 = sip.RecvfromTransaction("Third retry", 200, - include=["REGISTER sip", "Authorization", "nonce=\"3\""], - exclude=["Authorization:[\\s\\S]+Authorization:"], - expect="registration success" - ) - -recvfrom_cfg = sip.RecvfromCfg("Successful auth server changes nonce but with stale=false", - pjsua, [req1, req2, req3, req4]) |