1
# $Id: 203_reg_good_empty_realm.py 3150 2010-04-29 00:23:43Z bennylp $
5
pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
6
"--realm=* --user=username --password=password " + \
9
# 401 Response, missing realm value
10
req1 = sip.RecvfromTransaction("Initial request", 401,
11
include=["REGISTER sip"],
13
resp_hdr=['WWW-Authenticate: Digest']
16
# Client should retry, we giving it another 401 with empty realm
17
req2 = sip.RecvfromTransaction("REGISTER retry #1 of 2", 407,
18
include=["REGISTER sip"],
20
resp_hdr=['Proxy-Authenticate: Digest realm=""']
24
req3 = sip.RecvfromTransaction("REGISTER retry #2 of 2", 200,
27
expect="registration success"
30
recvfrom_cfg = sip.RecvfromCfg("Registration with empty realm",
31
pjsua, [req1, req2, req3])