blob: 10737411566aa437c832f12c3f90f0a86af9a93c [file] [log] [blame]
Tristan Matthews0a329cc2013-07-17 13:20:14 -04001# $Id$
2import inc_sip as sip
3import inc_sdp as sdp
4
5# Answer for codec G722.1 should contain fmtp bitrate
6
7sdp = \
8"""
9v=0
10o=- 3428650655 3428650655 IN IP4 192.168.1.9
11s=pjmedia
12c=IN IP4 192.168.1.9
13t=0 0
14a=X-nat:0
15m=audio 4000 RTP/AVP 99 100 101
16a=rtcp:4001 IN IP4 192.168.1.9
17a=rtpmap:99 G7221/16000
18a=fmtp:99 bitrate=24000
19a=rtpmap:100 G7221/16000
20a=fmtp:100 bitrate=32000
21a=sendrecv
22a=rtpmap:101 telephone-event/8000
23a=fmtp:101 0-15
24"""
25
26pjsua_args = "--null-audio --auto-answer 200 --add-codec G7221"
27extra_headers = ""
28include = ["fmtp:[\d]+ bitrate="] # response must include fmtp bitrate
29exclude = []
30
31sendto_cfg = sip.SendtoCfg("Answer should contain fmtp bitrate for codec G722.1", pjsua_args, sdp, 200,
32 extra_headers=extra_headers,
33 resp_inc=include, resp_exc=exclude)
34