205_reg_good_no_realm.py 498 B

123456789101112131415
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
  4. "--realm=provider --user=username --password=password"
  5. req1 = sip.RecvfromTransaction("", 401,
  6. include=["REGISTER sip"],
  7. exclude=["Authorization"],
  8. resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""],
  9. expect="PJSIP_ENOCREDENTIAL"
  10. )
  11. recvfrom_cfg = sip.RecvfromCfg("Failed registration because of realm test",
  12. pjsua, [req1])