Debian Codegraph @

Xpjproject/tests/pjsua/scripts-recvfrom/301_timer_good_retry_after_422.py

raw symbols SCIP
1 import inc_sip as sip
2 import inc_sdp as sdp
3
4 # Session timers retry after 422
5
6
7 pjsua = "--null-audio sip:127.0.0.1:$PORT --timer-min-se 100 --timer-se 1000 --no-tcp"
8
9 # First INVITE with timer rejected with 422
10 req1 = sip.RecvfromTransaction("INVITE with SE too small", 422,
11 include=["Session-Expires:\s*1000"],
12 exclude=[],
13 resp_hdr=["Min-SE: 2000"]
14 )
15
16 # Wait for ACK
17 req2 = sip.RecvfromTransaction("Wait ACK", 0, include=["ACK sip"])
18
19 # New INVITE with SE >= Min-SE
20 req3 = sip.RecvfromTransaction("Retrying with acceptable SE", 200,
21 include=["Session-Expires:\s*2000", "Min-SE:\s*2000"],
22 exclude=[],
23 resp_hdr=["Session-Expires: 2000;refresher=uac"]
24 )
25
26
27 recvfrom_cfg = sip.RecvfromCfg("Session timers retry after 422",
28 pjsua, [req1, req2, req3])
29