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