Debian Codegraph @

Xpjproject/tests/pjsua/scripts-sendto/171_timer_initiated_by_uas.py

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