summaryrefslogtreecommitdiff
path: root/tests/pjsua/scripts-recvfrom/301_timer_good_retry_after_422.py
blob: c3bbac7e8ebf777cb7d1fe1af0800a071ffcd2a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# $Id$
import inc_sip as sip
import inc_sdp as sdp

# Session timers retry after 422


pjsua = "--null-audio sip:127.0.0.1:$PORT --timer-min-se 100 --timer-se 1000"

# First INVITE with timer rejected with 422
req1 = sip.RecvfromTransaction("INVITE with SE too small", 422,
				include=["Session-Expires:\s*1000"], 
				exclude=[],
				resp_hdr=["Min-SE: 2000"],
                expect="ACK sip"
			  	)

# New INVITE with SE >= Min-SE
req2 = sip.RecvfromTransaction("Retrying with acceptable SE", 200,
				include=["Session-Expires:\s*2000", "Min-SE:\s*2000"], 
				exclude=[],
				resp_hdr=["Session-Expires: 2000;refresher=uac"]
			  	)


recvfrom_cfg = sip.RecvfromCfg("Session timers retry after 422",
			       pjsua, [req1, req2])