Debian Codegraph @

Xpjproject/tests/pjsua/scripts-recvfrom/208_reg_good_retry_nonce_ok.py

raw symbols SCIP
1 import inc_sip as sip
2 import inc_sdp as sdp
3
4 pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
5 "--realm=python --user=username --password=password " + \
6 "--auto-update-nat=0"
7
8 req1 = sip.RecvfromTransaction("Initial request", 401,
9 include=["REGISTER sip"],
10 exclude=["Authorization"],
11 resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1\""]
12 )
13
14 req2 = sip.RecvfromTransaction("REGISTER first retry", 401,
15 include=["REGISTER sip", "Authorization", "nonce=\"1\""],
16 exclude=["Authorization:[\\s\\S]+Authorization:"],
17 resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"2\", stale=true"]
18 )
19
20
21 req3 = sip.RecvfromTransaction("REGISTER retry with new nonce", 200,
22 include=["REGISTER sip", "Authorization", "nonce=\"2\""],
23 exclude=["Authorization:[\\s\\S]+Authorization:"],
24 expect="registration success"
25 )
26
27 recvfrom_cfg = sip.RecvfromCfg("Authentication okay after retry with new nonce",
28 pjsua, [req1, req2, req3])