From fe6325e5fb8839a3a8624941a3c898e2d13edd4a Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 26 Jun 2012 02:28:59 +0000 Subject: Close #1523: - updated scenarios to work with mod_sipp.py (adding config .py file, etc) - integrated mod_sipp.py to runall.py - removed uas.xml, as it is similar to recvfrom\100_simple.py (REGISTER+resp 200) - renamed scenarios (to allow running these SIPp scenarios without .py file): - prack_fork.xml -> uas-prack_fork.xml - inv_401_retry_after_100.xml -> uas-inv_401_retry_after_100.xml git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4177 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/pjsua/inc_const.py | 2 + tests/pjsua/mod_sipp.py | 32 +++-- tests/pjsua/runall.py | 8 +- .../pjsua/scripts-sipp/inv_401_retry_after_100.xml | 106 --------------- tests/pjsua/scripts-sipp/prack_fork.xml | 151 --------------------- tests/pjsua/scripts-sipp/strict-route.py | 9 ++ tests/pjsua/scripts-sipp/strict-route.xml | 47 ++----- .../scripts-sipp/uac-inv-multiple-require.xml | 26 +--- ...uac-inv-two-media-but-one-disabled-no-rtpmap.py | 7 + ...ac-inv-two-media-but-one-disabled-no-rtpmap.xml | 2 - tests/pjsua/scripts-sipp/uac-inv-without-sdp.py | 11 ++ tests/pjsua/scripts-sipp/uac-inv-without-sdp.xml | 110 +++++++++++++++ tests/pjsua/scripts-sipp/uac-ticket-1148.py | 7 + tests/pjsua/scripts-sipp/uac-ticket-1148.xml | 2 - ...uas-answer-180-multiple-fmts-support-update.xml | 6 +- .../scripts-sipp/uas-answer-180-multiple-fmts.xml | 5 +- ...uas-answer-200-multiple-fmts-support-update.xml | 5 +- .../scripts-sipp/uas-answer-200-multiple-fmts.xml | 6 +- .../uas-answer-200-reinvite-without-sdp.py | 7 + .../uas-answer-200-reinvite-without-sdp.xml | 4 - .../uas-answer-200-update-without-sdp.py | 7 + .../uas-answer-200-update-without-sdp.xml | 4 - tests/pjsua/scripts-sipp/uas-auth.py | 7 + tests/pjsua/scripts-sipp/uas-auth.xml | 3 - tests/pjsua/scripts-sipp/uas-cancel-no-final.py | 7 + tests/pjsua/scripts-sipp/uas-forked-200.xml | 15 -- .../scripts-sipp/uas-inv_401_retry_after_100.xml | 106 +++++++++++++++ tests/pjsua/scripts-sipp/uas-invite.xml | 6 +- tests/pjsua/scripts-sipp/uas-mwi-0.py | 7 + tests/pjsua/scripts-sipp/uas-mwi-0.xml | 7 - tests/pjsua/scripts-sipp/uas-mwi.py | 7 + tests/pjsua/scripts-sipp/uas-mwi.xml | 9 +- tests/pjsua/scripts-sipp/uas-prack_fork.xml | 129 ++++++++++++++++++ tests/pjsua/scripts-sipp/uas-reinv-glare.py | 7 + .../scripts-sipp/uas-subscribe-late-notify.py | 11 ++ .../scripts-sipp/uas-subscribe-late-notify.xml | 2 +- .../scripts-sipp/uas-subscribe-multipart-notify.py | 11 ++ .../uas-subscribe-multipart-notify.xml | 2 +- .../scripts-sipp/uas-subscribe-notify-terminate.py | 10 ++ .../scripts-sipp/uas-subscribe-refresh-481.py | 11 ++ .../scripts-sipp/uas-subscribe-refresh-481.xml | 9 +- .../scripts-sipp/uas-subscribe-terminated-retry.py | 11 ++ tests/pjsua/scripts-sipp/uas.xml | 67 --------- 43 files changed, 534 insertions(+), 474 deletions(-) delete mode 100644 tests/pjsua/scripts-sipp/inv_401_retry_after_100.xml delete mode 100644 tests/pjsua/scripts-sipp/prack_fork.xml create mode 100644 tests/pjsua/scripts-sipp/strict-route.py create mode 100644 tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.py create mode 100644 tests/pjsua/scripts-sipp/uac-inv-without-sdp.py create mode 100644 tests/pjsua/scripts-sipp/uac-inv-without-sdp.xml create mode 100644 tests/pjsua/scripts-sipp/uac-ticket-1148.py create mode 100644 tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.py create mode 100644 tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.py create mode 100644 tests/pjsua/scripts-sipp/uas-auth.py create mode 100644 tests/pjsua/scripts-sipp/uas-cancel-no-final.py create mode 100644 tests/pjsua/scripts-sipp/uas-inv_401_retry_after_100.xml create mode 100644 tests/pjsua/scripts-sipp/uas-mwi-0.py create mode 100644 tests/pjsua/scripts-sipp/uas-mwi.py create mode 100644 tests/pjsua/scripts-sipp/uas-prack_fork.xml create mode 100644 tests/pjsua/scripts-sipp/uas-reinv-glare.py create mode 100644 tests/pjsua/scripts-sipp/uas-subscribe-late-notify.py create mode 100644 tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.py create mode 100644 tests/pjsua/scripts-sipp/uas-subscribe-notify-terminate.py create mode 100644 tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.py create mode 100644 tests/pjsua/scripts-sipp/uas-subscribe-terminated-retry.py delete mode 100644 tests/pjsua/scripts-sipp/uas.xml (limited to 'tests') diff --git a/tests/pjsua/inc_const.py b/tests/pjsua/inc_const.py index b8b761e1..c54c0c49 100644 --- a/tests/pjsua/inc_const.py +++ b/tests/pjsua/inc_const.py @@ -21,6 +21,8 @@ EVENT_INCOMING_CALL = "Press .* answer" # Call state is CALLING STATE_CALLING = "state.*CALLING" +# Call state is EARLY +STATE_EARLY = "state.*EARLY" # Call state is CONFIRMED STATE_CONFIRMED = "state.*CONFIRMED" # Call state is DISCONNECTED diff --git a/tests/pjsua/mod_sipp.py b/tests/pjsua/mod_sipp.py index 1c7e6320..a42767d3 100644 --- a/tests/pjsua/mod_sipp.py +++ b/tests/pjsua/mod_sipp.py @@ -7,20 +7,26 @@ import os import re import subprocess from inc_cfg import * +import inc_const # SIPp executable path and param #SIPP_PATH = '"C:\\Program Files (x86)\\Sipp_3.2\\sipp.exe"' SIPP_PATH = 'sipp' SIPP_PARAM = "-i 127.0.0.1 -p 6000 -m 1 127.0.0.1" -SIPP_TIMEOUT = 10 +SIPP_TIMEOUT = 60 # On BG mode, SIPp doesn't require special terminal # On non-BG mode, on win, it needs env var: "TERMINFO=c:\cygwin\usr\share\terminfo" SIPP_BG_MODE = True -PJSUA_DEF_PARAM = "--null-audio --max-calls=1 --no-tcp" +# Will be updated based on configuration file (a .py file whose the same name as SIPp XML file) PJSUA_INST_PARAM = [] PJSUA_EXPECTS = [] +# Default PJSUA param if configuration file (the corresponding .py file) is not available: +# - no-tcp as SIPp is on UDP only +# - id, username, and realm: to allow PJSUA sending re-INVITE with auth after receiving 401/407 response +PJSUA_DEF_PARAM = "--null-audio --max-calls=1 --no-tcp --id=sip:a@localhost --username=a --realm=*" + # Get SIPp scenario (XML file) SIPP_SCEN_XML = "" if ARGS[1].endswith('.xml'): @@ -57,7 +63,7 @@ def start_sipp(): if SIPP_BG_MODE: sipp_param = sipp_param + " -bg" if SIPP_TIMEOUT: - sipp_param = sipp_param + " -timeout "+str(SIPP_TIMEOUT)+"s -timeout_error" + sipp_param = sipp_param + " -timeout "+str(SIPP_TIMEOUT)+"s -timeout_error" + " -deadcall_wait "+str(SIPP_TIMEOUT)+"s" fullcmd = os.path.normpath(SIPP_PATH) + " " + sipp_param print "Running SIPP: " + fullcmd if SIPP_BG_MODE: @@ -131,15 +137,6 @@ def exec_pjsua_expects(t, sipp): for ua_idx in range(len(PJSUA_INST_PARAM)): ua.append(t.process[ua_idx]) - # If there is no PJSUA EXPECT scenario, must keep polling PJSUA stdout - # otherwise PJSUA process may stuck (due to stdout pipe buffer full?) - # Ideally the poll should be done contiunously until SIPp process is - # terminated. - if len(PJSUA_EXPECTS)==0: - import inc_const - ua[0].expect(inc_const.STDOUT_REFRESH, raise_on_error = False) - return "" - ua_err_st = "" while len(PJSUA_EXPECTS): expect = PJSUA_EXPECTS.pop(0) @@ -159,6 +156,17 @@ def exec_pjsua_expects(t, sipp): ua_err_st = "Unknown error" break; + # Need to poll here for handling these cases: + # - If there is no PJSUA EXPECT scenario, we must keep polling the stdout, + # otherwise PJSUA process may stuck (due to stdout pipe buffer full?). + # - last PJSUA_EXPECT contains a pjsua command that needs time to + # finish, for example "v" (re-INVITE), the SIPp XML scenario may expect + # that re-INVITE transaction to be completed and without stdout poll + # PJSUA process may stuck. + # Ideally the poll should be done contiunously until SIPp process is + # terminated. + ua[0].expect(inc_const.STDOUT_REFRESH, raise_on_error = False) + return ua_err_st diff --git a/tests/pjsua/runall.py b/tests/pjsua/runall.py index 5dbfaf18..046a0cb6 100644 --- a/tests/pjsua/runall.py +++ b/tests/pjsua/runall.py @@ -55,6 +55,11 @@ for f in os.listdir("scripts-pesq"): for f in os.listdir("scripts-recvfrom"): tests.append("mod_recvfrom.py scripts-recvfrom/" + f) +# Add sipp tests +for f in os.listdir("scripts-sipp"): + if f.endswith(".xml"): + tests.append("mod_sipp.py scripts-sipp/" + f) + # Filter-out excluded tests for pat in excluded_tests: tests = [t for t in tests if t.find(pat)==-1] @@ -103,7 +108,7 @@ while len(sys.argv): for t in tests: (mod,param) = t.split(None,2) tname = mod[4:mod.find(".py")] + "_" + \ - param[param.find("/")+1:param.find(".py")] + param[param.find("/")+1:param.rfind(".")] c = "" if len(sys.argv): c = " ".join(sys.argv) + " " @@ -162,6 +167,7 @@ for t in tests: logname = re.search(".*\s+(.*)", t).group(1) logname = re.sub("[\\\/]", "_", logname) logname = re.sub("\.py$", ".log", logname) + logname = re.sub("\.xml$", ".log", logname) logname = "logs/" + logname shutil.move("output.log", logname) print "Please see '" + logname + "' for the test log." diff --git a/tests/pjsua/scripts-sipp/inv_401_retry_after_100.xml b/tests/pjsua/scripts-sipp/inv_401_retry_after_100.xml deleted file mode 100644 index 6debd134..00000000 --- a/tests/pjsua/scripts-sipp/inv_401_retry_after_100.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/pjsua/scripts-sipp/prack_fork.xml b/tests/pjsua/scripts-sipp/prack_fork.xml deleted file mode 100644 index 6caf3220..00000000 --- a/tests/pjsua/scripts-sipp/prack_fork.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - - - - - - ]]> - - - - - - - - - - - - - - - Content-Type: application/sdp - - v=0 - o=- 3442013205 3442013205 IN IP4 192.168.0.13 - s=pjsip - c=IN IP4 192.168.0.13 - t=0 0 - m=audio 4002 RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/pjsua/scripts-sipp/strict-route.py b/tests/pjsua/scripts-sipp/strict-route.py new file mode 100644 index 00000000..1c9908f4 --- /dev/null +++ b/tests/pjsua/scripts-sipp/strict-route.py @@ -0,0 +1,9 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id=sip:pjsua@localhost --username=pjsua --realm=* sip:sipp@localhost:6000"] + +PJSUA_EXPECTS = [[0, "ACK sip:proxy@.* SIP/2\.0", ""], + [0, const.STATE_CONFIRMED, "h"] + ] diff --git a/tests/pjsua/scripts-sipp/strict-route.xml b/tests/pjsua/scripts-sipp/strict-route.xml index a855209f..0ed6935f 100644 --- a/tests/pjsua/scripts-sipp/strict-route.xml +++ b/tests/pjsua/scripts-sipp/strict-route.xml @@ -88,14 +88,14 @@ [last_To:];tag=[call_number] [last_Call-ID:] [last_CSeq:] - Contact: - Record-route: + Contact: + Record-route: Content-Type: application/sdp v=0 - o=- 3442013205 3442013205 IN IP4 192.168.0.13 + o=- 3442013205 3442013205 IN IP4 [local_ip] s=pjsip - c=IN IP4 192.168.0.13 + c=IN IP4 [local_ip] t=0 0 m=audio 4002 RTP/AVP 0 a=rtpmap:0 PCMU/8000 @@ -111,43 +111,14 @@ [last_To:];tag=[call_number] [last_Call-ID:] [last_CSeq:] - Contact: - Record-route: + Contact: + Record-route: Content-Type: application/sdp v=0 - o=- 3442013205 3442013205 IN IP4 192.168.0.13 + o=- 3442013205 3442013205 IN IP4 [local_ip] s=pjsip - c=IN IP4 192.168.0.13 - t=0 0 - m=audio 4002 RTP/AVP 0 - a=rtpmap:0 PCMU/8000 - ]]> - - - - - - - - Record-route: - Content-Type: application/sdp - - v=0 - o=- 3442013205 3442013205 IN IP4 192.168.0.13 - s=pjsip - c=IN IP4 192.168.0.13 + c=IN IP4 [local_ip] t=0 0 m=audio 4002 RTP/AVP 0 a=rtpmap:0 PCMU/8000 @@ -177,7 +148,7 @@ - + diff --git a/tests/pjsua/scripts-sipp/uac-inv-multiple-require.xml b/tests/pjsua/scripts-sipp/uac-inv-multiple-require.xml index b0790f6e..384be82f 100644 --- a/tests/pjsua/scripts-sipp/uac-inv-multiple-require.xml +++ b/tests/pjsua/scripts-sipp/uac-inv-multiple-require.xml @@ -36,10 +36,7 @@ optional="true"> - - - - + @@ -59,27 +56,6 @@ ]]> - - - - ;tag=[call_number] - To: sut [peer_tag_param] - Call-ID: [call_id] - CSeq: 2 BYE - Contact: sip:sipp@[local_ip]:[local_port] - Max-Forwards: 70 - Subject: Performance Test - Content-Length: 0 - - ]]> - - - - diff --git a/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.py b/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.py new file mode 100644 index 00000000..7a457ad0 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --auto-answer=200"] + +PJSUA_EXPECTS = [[0, const.STATE_CONFIRMED, "v"]] diff --git a/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.xml b/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.xml index e2b5b60f..0770fe92 100644 --- a/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.xml +++ b/tests/pjsua/scripts-sipp/uac-inv-two-media-but-one-disabled-no-rtpmap.xml @@ -87,8 +87,6 @@ - - diff --git a/tests/pjsua/scripts-sipp/uac-inv-without-sdp.py b/tests/pjsua/scripts-sipp/uac-inv-without-sdp.py new file mode 100644 index 00000000..a822bf04 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uac-inv-without-sdp.py @@ -0,0 +1,11 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1"] + +PJSUA_EXPECTS = [[0, const.EVENT_INCOMING_CALL, "a"], + [0, "", "200"], + [0, const.MEDIA_ACTIVE, ""], + [0, const.STATE_CONFIRMED, "h"] + ] diff --git a/tests/pjsua/scripts-sipp/uac-inv-without-sdp.xml b/tests/pjsua/scripts-sipp/uac-inv-without-sdp.xml new file mode 100644 index 00000000..929c83a0 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uac-inv-without-sdp.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + ;tag=[call_number] + To: sut + Call-ID: [call_id] + CSeq: 1 INVITE + Contact: sip:sipp@[local_ip]:[local_port] + Max-Forwards: 70 + Subject: Performance Test + Content-Type: application/sdp + Content-Length: [len] + + ]]> + + + + + + + + + + + + + ;tag=[call_number] + To: sut [peer_tag_param] + Call-ID: [call_id] + CSeq: 1 ACK + Contact: sip:sipp@[local_ip]:[local_port] + Max-Forwards: 70 + Subject: Performance Test + Content-Type: application/sdp + Content-Length: [len] + +v=0 +o=BroadWorks 1378618 0 IN IP4 192.168.2.25 +s=- +c=IN IP4 192.168.2.25 +t=0 0 +m=audio 4020 RTP/AVP 0 101 +c=IN IP4 192.168.2.25 +a=rtpmap:101 telephone-event/8000 +a=fmtp:101 0-15 +m=video 4022 RTP/AVP 97 +c=IN IP4 192.168.2.25 +b=TIAS:512000 +a=rtpmap:97 H264/90000 +a=fmtp:97 profile-level-id=42900b +a=orient:portrait +a=rtcp-fb:* nack pli + + ]]> + + + + + + + + + + + + + + + + + + + diff --git a/tests/pjsua/scripts-sipp/uac-ticket-1148.py b/tests/pjsua/scripts-sipp/uac-ticket-1148.py new file mode 100644 index 00000000..7a457ad0 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uac-ticket-1148.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --auto-answer=200"] + +PJSUA_EXPECTS = [[0, const.STATE_CONFIRMED, "v"]] diff --git a/tests/pjsua/scripts-sipp/uac-ticket-1148.xml b/tests/pjsua/scripts-sipp/uac-ticket-1148.xml index b617b37a..2a2ec8be 100644 --- a/tests/pjsua/scripts-sipp/uac-ticket-1148.xml +++ b/tests/pjsua/scripts-sipp/uac-ticket-1148.xml @@ -88,8 +88,6 @@ - - diff --git a/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts-support-update.xml b/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts-support-update.xml index e75e7c76..80162722 100644 --- a/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts-support-update.xml +++ b/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts-support-update.xml @@ -155,10 +155,8 @@ ]]> - - - - + + diff --git a/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts.xml b/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts.xml index bc27c9df..5ff1f996 100644 --- a/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts.xml +++ b/tests/pjsua/scripts-sipp/uas-answer-180-multiple-fmts.xml @@ -157,9 +157,8 @@ ]]> - - - + + diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts-support-update.xml b/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts-support-update.xml index 5d576003..86053814 100644 --- a/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts-support-update.xml +++ b/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts-support-update.xml @@ -124,9 +124,8 @@ ]]> - - - + + diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts.xml b/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts.xml index 4e4170d2..9fee67be 100644 --- a/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts.xml +++ b/tests/pjsua/scripts-sipp/uas-answer-200-multiple-fmts.xml @@ -125,10 +125,8 @@ ]]> - - - - + + diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.py b/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.py new file mode 100644 index 00000000..7f1de45d --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 sip:localhost:6000"] + +PJSUA_EXPECTS = [[0, const.STATE_CONFIRMED, "v"]] diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.xml b/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.xml index 7634545f..f51c4212 100644 --- a/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.xml +++ b/tests/pjsua/scripts-sipp/uas-answer-200-reinvite-without-sdp.xml @@ -75,10 +75,6 @@ - - - - diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.py b/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.py new file mode 100644 index 00000000..8699d0b2 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 sip:localhost:6000"] + +PJSUA_EXPECTS = [[0, const.STATE_CONFIRMED, "U"]] diff --git a/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.xml b/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.xml index 646e1f4f..e561db1d 100644 --- a/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.xml +++ b/tests/pjsua/scripts-sipp/uas-answer-200-update-without-sdp.xml @@ -72,10 +72,6 @@ ]]> - - - - diff --git a/tests/pjsua/scripts-sipp/uas-auth.py b/tests/pjsua/scripts-sipp/uas-auth.py new file mode 100644 index 00000000..38a88eb5 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-auth.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id=sip:a@localhost --username=a --realm=* --registrar=sip:localhost:6000"] + +PJSUA_EXPECTS = [] diff --git a/tests/pjsua/scripts-sipp/uas-auth.xml b/tests/pjsua/scripts-sipp/uas-auth.xml index 71da30f2..96be0b9c 100644 --- a/tests/pjsua/scripts-sipp/uas-auth.xml +++ b/tests/pjsua/scripts-sipp/uas-auth.xml @@ -54,9 +54,6 @@ - - - diff --git a/tests/pjsua/scripts-sipp/uas-cancel-no-final.py b/tests/pjsua/scripts-sipp/uas-cancel-no-final.py new file mode 100644 index 00000000..4d100a14 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-cancel-no-final.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 sip:localhost:6000"] + +PJSUA_EXPECTS = [[0, const.STATE_EARLY, "h"]] diff --git a/tests/pjsua/scripts-sipp/uas-forked-200.xml b/tests/pjsua/scripts-sipp/uas-forked-200.xml index 229f7d89..3878ad4a 100644 --- a/tests/pjsua/scripts-sipp/uas-forked-200.xml +++ b/tests/pjsua/scripts-sipp/uas-forked-200.xml @@ -117,21 +117,6 @@ crlf="true"> - - - - - - - - diff --git a/tests/pjsua/scripts-sipp/uas-inv_401_retry_after_100.xml b/tests/pjsua/scripts-sipp/uas-inv_401_retry_after_100.xml new file mode 100644 index 00000000..6debd134 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-inv_401_retry_after_100.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/pjsua/scripts-sipp/uas-invite.xml b/tests/pjsua/scripts-sipp/uas-invite.xml index 040f14ba..1f928e7c 100644 --- a/tests/pjsua/scripts-sipp/uas-invite.xml +++ b/tests/pjsua/scripts-sipp/uas-invite.xml @@ -46,7 +46,7 @@ [last_To:];tag=[call_number] [last_Call-ID:] [last_CSeq:] - Contact: + Contact: Content-Type: application/sdp v=0 @@ -66,10 +66,6 @@ - - - - diff --git a/tests/pjsua/scripts-sipp/uas-mwi-0.py b/tests/pjsua/scripts-sipp/uas-mwi-0.py new file mode 100644 index 00000000..722e0b3f --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-mwi-0.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --mwi"] + +PJSUA_EXPECTS = [] diff --git a/tests/pjsua/scripts-sipp/uas-mwi-0.xml b/tests/pjsua/scripts-sipp/uas-mwi-0.xml index 58f2bd48..6697c17e 100644 --- a/tests/pjsua/scripts-sipp/uas-mwi-0.xml +++ b/tests/pjsua/scripts-sipp/uas-mwi-0.xml @@ -16,13 +16,6 @@ - - - - - - - diff --git a/tests/pjsua/scripts-sipp/uas-mwi.py b/tests/pjsua/scripts-sipp/uas-mwi.py new file mode 100644 index 00000000..722e0b3f --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-mwi.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --mwi"] + +PJSUA_EXPECTS = [] diff --git a/tests/pjsua/scripts-sipp/uas-mwi.xml b/tests/pjsua/scripts-sipp/uas-mwi.xml index 00e70371..ed811956 100644 --- a/tests/pjsua/scripts-sipp/uas-mwi.xml +++ b/tests/pjsua/scripts-sipp/uas-mwi.xml @@ -16,13 +16,6 @@ - - - - - - - @@ -74,7 +67,7 @@ - + diff --git a/tests/pjsua/scripts-sipp/uas-prack_fork.xml b/tests/pjsua/scripts-sipp/uas-prack_fork.xml new file mode 100644 index 00000000..ae1c6054 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-prack_fork.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + ]]> + + + + + + + + + + + + + + + Content-Type: application/sdp + + v=0 + o=- 3442013205 3442013205 IN IP4 192.168.0.13 + s=pjsip + c=IN IP4 192.168.0.13 + t=0 0 + m=audio 4002 RTP/AVP 0 + a=rtpmap:0 PCMU/8000 + ]]> + + + + + + + + + + + + + + + diff --git a/tests/pjsua/scripts-sipp/uas-reinv-glare.py b/tests/pjsua/scripts-sipp/uas-reinv-glare.py new file mode 100644 index 00000000..8699d0b2 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-reinv-glare.py @@ -0,0 +1,7 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 sip:localhost:6000"] + +PJSUA_EXPECTS = [[0, const.STATE_CONFIRMED, "U"]] diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.py b/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.py new file mode 100644 index 00000000..c69332ea --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.py @@ -0,0 +1,11 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --add-buddy sip:sipp@localhost:6000"] + +PJSUA_EXPECTS = [[0, "", "s"], + [0, "Subscribe presence of:", "1"], + [0, "subscription state is ACTIVE", ""], + [0, "subscription state is TERMINATED", ""] + ] diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.xml b/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.xml index 918a382d..7bf06648 100644 --- a/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.xml +++ b/tests/pjsua/scripts-sipp/uas-subscribe-late-notify.xml @@ -74,7 +74,7 @@ Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Event: presence - Subscription-State: active;expires=50 + Subscription-State: active;expires=10 Content-Type: application/pidf+xml diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.py b/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.py new file mode 100644 index 00000000..c792bdda --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.py @@ -0,0 +1,11 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --add-buddy sip:sipp@localhost:6000"] + +PJSUA_EXPECTS = [[0, "", "s"], + [0, "Subscribe presence of:", "1"], + [0, "sip:sipp@localhost:6000 .* Online", ""], + [0, "subscription state is TERMINATED", ""] + ] diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.xml b/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.xml index 7cfdef27..e2e1f9b1 100644 --- a/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.xml +++ b/tests/pjsua/scripts-sipp/uas-subscribe-multipart-notify.xml @@ -55,7 +55,7 @@ Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Event: presence - Subscription-State: active;expires=50 + Subscription-State: active;expires=10 Content-Type: multipart/mixed;boundary=abcd --abcd diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-notify-terminate.py b/tests/pjsua/scripts-sipp/uas-subscribe-notify-terminate.py new file mode 100644 index 00000000..66c09f55 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-subscribe-notify-terminate.py @@ -0,0 +1,10 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --add-buddy sip:sipp@localhost:6000"] + +PJSUA_EXPECTS = [[0, "", "s"], + [0, "Subscribe presence of:", "1"], + [0, "subscription state is TERMINATED", ""] + ] diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.py b/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.py new file mode 100644 index 00000000..c792bdda --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.py @@ -0,0 +1,11 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --add-buddy sip:sipp@localhost:6000"] + +PJSUA_EXPECTS = [[0, "", "s"], + [0, "Subscribe presence of:", "1"], + [0, "sip:sipp@localhost:6000 .* Online", ""], + [0, "subscription state is TERMINATED", ""] + ] diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.xml b/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.xml index 5f116501..0cb26829 100644 --- a/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.xml +++ b/tests/pjsua/scripts-sipp/uas-subscribe-refresh-481.xml @@ -16,13 +16,6 @@ - - - - - - - @@ -60,7 +53,7 @@ Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Event: presence - Subscription-State: active;expires=50 + Subscription-State: active;expires=10 Content-Type: application/pidf+xml diff --git a/tests/pjsua/scripts-sipp/uas-subscribe-terminated-retry.py b/tests/pjsua/scripts-sipp/uas-subscribe-terminated-retry.py new file mode 100644 index 00000000..404603c0 --- /dev/null +++ b/tests/pjsua/scripts-sipp/uas-subscribe-terminated-retry.py @@ -0,0 +1,11 @@ +# $Id$ +# +import inc_const as const + +PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost:6000 --add-buddy sip:sipp@localhost:6000"] + +PJSUA_EXPECTS = [[0, "", "s"], + [0, "Subscribe presence of:", "1"], + [0, "Presence subscription .* is TERMINATED", ""], + [0, "Resubscribing .* in 5000 ms", ""] + ] diff --git a/tests/pjsua/scripts-sipp/uas.xml b/tests/pjsua/scripts-sipp/uas.xml deleted file mode 100644 index a6d4854f..00000000 --- a/tests/pjsua/scripts-sipp/uas.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3