summaryrefslogtreecommitdiff
path: root/tests/pjsua/scripts-recvfrom/205_reg_good_no_realm.py
blob: 53438545d2c354c558db7199a4b69823a2873adc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# $Id: 205_reg_good_no_realm.py 2392 2008-12-22 18:54:58Z bennylp $
import inc_sip as sip
import inc_sdp as sdp

pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
	"--realm=provider --user=username --password=password"

req1 = sip.RecvfromTransaction("", 401,
				include=["REGISTER sip"], 
				exclude=["Authorization"],
				resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""],
				expect="PJSIP_ENOCREDENTIAL"
			  )

recvfrom_cfg = sip.RecvfromCfg("Failed registration because of realm test",
			       pjsua, [req1])