1
# $Id: 215_reg_good_multi_ok.py 2392 2008-12-22 18:54:58Z bennylp $
5
pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
6
"--username theuser1 --realm python1 --password passwd --next-cred " + \
7
"--username theuser2 --realm python2 --password passwd " + \
10
req1 = sip.RecvfromTransaction("Initial registration", 401,
11
include=["REGISTER sip"],
12
resp_hdr=["WWW-Authenticate: Digest realm=\"python1\", nonce=\"1234\"",
13
"WWW-Authenticate: Digest realm=\"python2\", nonce=\"6789\""],
17
req2 = sip.RecvfromTransaction("Registration retry with auth", 200,
18
include=["REGISTER sip",
19
"Authorization:[\\s\\S]+Authorization:", # Must have 2 Auth hdrs
20
"realm=\"python1\"", "realm=\"python2\"",
21
"username=\"theuser1\"", "username=\"theuser2\"",
22
"nonce=\"1234\"", "nonce=\"6789\"",
24
expect="registration success"
27
recvfrom_cfg = sip.RecvfromCfg("Multiple authentication challenges",