120_sdp_with_video_dynamic_2.py 619 B

123456789101112131415161718192021222324252627
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. # In this case the video codec uses dynamic payload type
  4. sdp = \
  5. """
  6. v=0
  7. o=- 0 0 IN IP4 127.0.0.1
  8. s=-
  9. c=IN IP4 127.0.0.1
  10. t=0 0
  11. m=video 4000 RTP/AVP 100
  12. a=rtpmap:100 myvideo/96000
  13. m=audio 5000 RTP/AVP 0
  14. """
  15. pjsua_args = "--null-audio --auto-answer 200"
  16. extra_headers = ""
  17. include = ["Content-Type: application/sdp", # response must include SDP
  18. "m=video 0 RTP[\\s\\S]+m=audio [1-9]+[0-9]* RTP/AVP"
  19. ]
  20. exclude = []
  21. sendto_cfg = sip.SendtoCfg("Mixed audio and video", pjsua_args, sdp, 200,
  22. extra_headers=extra_headers,
  23. resp_inc=include, resp_exc=exclude)