| 1 |
import inc_sip as sip |
| 2 |
import inc_sdp as sdp |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
sdp = \ |
| 7 |
""" |
| 8 |
v=0 |
| 9 |
o=- 0 0 IN IP4 127.0.0.1 |
| 10 |
s=- |
| 11 |
c=IN IP4 127.0.0.1 |
| 12 |
t=0 0 |
| 13 |
m=audio 5000 RTP/SAVP 0 |
| 14 |
a=crypto:1 aes_cm_128_hmac_sha1_80 inline:WnD7c1ksDGs+dIefCEo8omPg4uO8DYIinNGL5yxQ |
| 15 |
m=audio 4000 RTP/AVP 0 |
| 16 |
""" |
| 17 |
|
| 18 |
pjsua_args = "--null-audio --auto-answer 200 --use-srtp 0" |
| 19 |
extra_headers = "" |
| 20 |
include = ["Content-Type: application/sdp", |
| 21 |
"m=audio 0 RTP/SAVP[\\s\\S]+m=audio [1-9]+[0-9]* RTP/AVP" |
| 22 |
] |
| 23 |
exclude = ["a=crypto"] |
| 24 |
|
| 25 |
sendto_cfg = sip.SendtoCfg("Prefer RTP/SAVP", pjsua_args, sdp, 200, |
| 26 |
extra_headers=extra_headers, |
| 27 |
resp_inc=include, resp_exc=exclude) |
| 28 |
|