411_fmtp_amrnb_offer_band_eff.py 717 B

123456789101112131415161718192021222324252627282930
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. # Answer for codec AMR should not contain fmtp octet-align=1
  4. sdp = \
  5. """
  6. v=0
  7. o=- 3428650655 3428650655 IN IP4 192.168.1.9
  8. s=pjmedia
  9. c=IN IP4 192.168.1.9
  10. t=0 0
  11. a=X-nat:0
  12. m=audio 4000 RTP/AVP 99 101
  13. a=rtcp:4001 IN IP4 192.168.1.9
  14. a=rtpmap:99 AMR/8000
  15. a=sendrecv
  16. a=rtpmap:101 telephone-event/8000
  17. a=fmtp:101 0-15
  18. """
  19. pjsua_args = "--null-audio --auto-answer 200 --add-codec AMR"
  20. extra_headers = ""
  21. include = [""]
  22. exclude = ["octet-align=1"] # response must not include fmtp 'octet-align=1'
  23. sendto_cfg = sip.SendtoCfg("AMR negotiation should not contain 'octet-align=1'", pjsua_args, sdp, 200,
  24. extra_headers=extra_headers,
  25. resp_inc=include, resp_exc=exclude)