blob: 4dd73e0f6836df09bdb2b90b104098306bd6d118 [file] [log] [blame]
Tristan Matthews0a329cc2013-07-17 13:20:14 -04001# $Id$
2import inc_sip as sip
3import inc_sdp as sdp
4
5sdp = \
6"""
7v=0
8o=- 0 0 IN IP4 127.0.0.1
9s=pjmedia
10c=IN IP4 127.0.0.1
11t=0 0
12m=audio 4000 RTP/AVP 0 101
13a=rtpmap:0 PCMU/8000
14a=sendrecv
15a=rtpmap:101 telephone-event/8000
16a=fmtp:101 0-15
17"""
18
19# RFC 4028 Section 9:
20# If the incoming request contains a Supported header field with a
21# value 'timer' but does not contain a Session-Expires header, it means
22# that the UAS is indicating support for timers but is not requesting
23# one. The UAS may request a session timer in the 2XX response by
24# including a Session-Expires header field. The value MUST NOT be set
25# to a duration lower than the value in the Min-SE header field in the
26# request, if it is present.
27
28pjsua_args = "--null-audio --auto-answer 200 --use-timer 2 --timer-min-se 90 --timer-se 1800"
29extra_headers = "Supported: timer\n"
30include = ["Session-Expires: .*;refresher=.*"]
31exclude = []
32sendto_cfg = sip.SendtoCfg("Session Timer initiated by UAS", pjsua_args, sdp, 200,
33 extra_headers=extra_headers,
34 resp_inc=include, resp_exc=exclude)
35
36