blob: 5532d73fe8bd4556ae4b72b60c58878a33e77b35 [file] [log] [blame]
Benny Prijonoe9a82242008-07-07 20:14:41 +00001# $Id:$
2import inc_sip as sip
3import inc_sdp as sdp
4
5pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
6 "--username user --realm python --password passwd --auto-update-nat=0"
7
8req1 = sip.RecvfromTransaction("Initial registration", 401,
9 include=["REGISTER sip"],
10 exclude=["Authorization"],
11 resp_hdr=["WWW-Authenticate: Digest realm=\"python\", nonce=\"1234\""],
12 expect="SIP/2.0 401"
13 )
14
15req2 = sip.RecvfromTransaction("Registration retry with auth", 200,
16 include=["REGISTER sip", "Authorization:",
17 "realm=\"python\"", "username=\"user\"",
18 "nonce=\"1234\"", "response="],
19 expect="registration success"
20 )
21
22recvfrom_cfg = sip.RecvfromCfg("Successful registration test",
23 pjsua, [req1, req2])