Debian Codegraph @

Xpjproject/tests/pjsua/scripts-recvfrom/220_reg_good_ims_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 "--username user@ims-domain --realm python --password passwd --use-ims --auto-update-nat=0"
6
7 req1 = sip.RecvfromTransaction("Initial registration", 401,
8 include=["REGISTER sip", "Authorization",
9 "username=\"user@ims-domain\"",
10 "realm=\"python\""],
11 resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""],
12 expect="SIP/2.0 401"
13 )
14
15 req2 = sip.RecvfromTransaction("Registration retry with auth", 200,
16 include=["REGISTER sip", "Authorization:",
17 "realm=\"python\"", "username=\"user@ims-domain\"",
18 "nonce=\"1234\"", "response="],
19 # Must not have double Authorization header:
20 exclude=["Authorization:[\\s\\S]+Authorization:"],
21 expect="registration success"
22 )
23
24 recvfrom_cfg = sip.RecvfromCfg("Successful IMS registration test",
25 pjsua, [req1, req2])