301_timer_good_retry_after_422.py 796 B

1234567891011121314151617181920212223242526272829
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. # Session timers retry after 422
  4. pjsua = "--null-audio sip:127.0.0.1:$PORT --timer-min-se 100 --timer-se 1000 --no-tcp"
  5. # First INVITE with timer rejected with 422
  6. req1 = sip.RecvfromTransaction("INVITE with SE too small", 422,
  7. include=["Session-Expires:\s*1000"],
  8. exclude=[],
  9. resp_hdr=["Min-SE: 2000"]
  10. )
  11. # Wait for ACK
  12. req2 = sip.RecvfromTransaction("Wait ACK", 0, include=["ACK sip"])
  13. # New INVITE with SE >= Min-SE
  14. req3 = sip.RecvfromTransaction("Retrying with acceptable SE", 200,
  15. include=["Session-Expires:\s*2000", "Min-SE:\s*2000"],
  16. exclude=[],
  17. resp_hdr=["Session-Expires: 2000;refresher=uac"]
  18. )
  19. recvfrom_cfg = sip.RecvfromCfg("Session timers retry after 422",
  20. pjsua, [req1, req2, req3])