Debian Codegraph @

Xpjproject/tests/pjsua/scripts-sendto/401_fmtp_g7221_with_bitrate_24000.py

raw symbols SCIP
1 import inc_sip as sip
2 import inc_sdp as sdp
3
4 # Answer with codec G722.1 should choose the same bitrate
5 # which in this test is 24000
6
7 sdp = \
8 """
9 v=0
10 o=- 3428650655 3428650655 IN IP4 192.168.1.9
11 s=pjmedia
12 c=IN IP4 192.168.1.9
13 t=0 0
14 a=X-nat:0
15 m=audio 4000 RTP/AVP 100 101
16 a=rtcp:4001 IN IP4 192.168.1.9
17 a=rtpmap:100 G7221/16000
18 a=fmtp:100 bitrate=24000
19 a=sendrecv
20 a=rtpmap:101 telephone-event/8000
21 a=fmtp:101 0-15
22 """
23
24 pjsua_args = "--null-audio --auto-answer 200 --add-codec G7221"
25 extra_headers = ""
26 include = ["a=rtpmap:[\d]+ G7221/16000", # response must choose G722.1
27 "fmtp:[\d]+ bitrate=24000" # response must choose the same bitrate
28 ]
29 exclude = []
30
31 sendto_cfg = sip.SendtoCfg("Answer with G722.1 should choose bitrate 24000", pjsua_args, sdp, 200,
32 extra_headers=extra_headers,
33 resp_inc=include, resp_exc=exclude)
34