125_sdp_with_multi_audio_4.py 609 B

1234567891011121314151617181920212223242526
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. # Multiple m=audio, one of them has static PT codec that we don't support
  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=audio 5000 RTP/AVP 80
  12. m=audio 4000 RTP/AVP 0
  13. """
  14. pjsua_args = "--null-audio --auto-answer 200"
  15. extra_headers = ""
  16. include = ["Content-Type: application/sdp", # response must include SDP
  17. "m=audio 0 RTP/AVP[\s\S]+m=audio [1-9]+[0-9]* RTP/AVP"
  18. ]
  19. exclude = []
  20. sendto_cfg = sip.SendtoCfg("Multiple audio lines", pjsua_args, sdp, 200,
  21. extra_headers=extra_headers,
  22. resp_inc=include, resp_exc=exclude)