Debian Codegraph @

Xpjproject/tests/pjsua/scripts-sipp/alt-pjsua-uas-custom-sdp.py

raw symbols SCIP
1 #
2 # Test driver for alt-pjsua-uas-custom-sdp.xml
3 #
4 # alt_pjsua (or pjsua) acts as UAS with --auto-answer=200. SIPp sends an
5 # INVITE with a PCMU offer. pjsua answers with its custom SDP. The call
6 # should reach STATE_CONFIRMED before SIPp terminates it with BYE.
7 #
8 # Run with standard pjsua:
9 # cd tests/pjsua && python3 run.py mod_sipp.py \
10 # scripts-sipp/alt-pjsua-uas-custom-sdp.xml
11 #
12 # Run with alt_pjsua:
13 # cd tests/pjsua && python3 run.py \
14 # --exe ../../pjsip-apps/src/3rdparty_media_sample/alt_pjsua \
15 # mod_sipp.py scripts-sipp/alt-pjsua-uas-custom-sdp.xml
16 #
17 import inc_const as const
18
19 # pjsua instance: UAS, auto-answers with custom SDP.
20 # --rtp-port 4002 pins the audio RTP port; video uses 4004 (next even port).
21 PJSUA = [
22 "--null-audio --max-calls=1 --no-tcp --rtp-port 4002 "
23 "--auto-answer=200 "
24 "--custom-sdp \"v=0\\r\\no=- 1234567890 1234567890 IN IP4 127.0.0.1"
25 "\\r\\ns=-\\r\\nc=IN IP4 127.0.0.1\\r\\nt=0 0"
26 "\\r\\nm=audio 4002 RTP/AVP 0\\r\\na=rtpmap:0 PCMU/8000"
27 "\\r\\nm=video 4004 RTP/AVP 96\\r\\na=rtpmap:96 H263-1998/90000\""
28 ]
29
30 PJSUA_CLI_EXPECTS = [
31 # Verify the full SDP SIPp sends in its INVITE is received by alt_pjsua.
32 # Codec check only (no IP/port) for environment independence.
33 [0, r"v=0", ""],
34 [0, r"s=-", ""],
35 [0, r"t=0 0", ""],
36 [0, r"a=rtpmap:0 PCMU/8000", ""],
37 [0, r"a=rtpmap:96 H263-1998/90000", ""],
38 [0, const.STATE_CONFIRMED, ""],
39 ]