~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.1.0/tests/pjsua/scripts-recvfrom/203_reg_good_empty_realm.py

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: 203_reg_good_empty_realm.py 3150 2010-04-29 00:23:43Z bennylp $
2
 
import inc_sip as sip
3
 
import inc_sdp as sdp
4
 
 
5
 
pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
6
 
        "--realm=* --user=username --password=password " + \
7
 
        "--auto-update-nat=0"
8
 
 
9
 
# 401 Response, missing realm value
10
 
req1 = sip.RecvfromTransaction("Initial request", 401,
11
 
                                include=["REGISTER sip"], 
12
 
                                exclude=[],
13
 
                                resp_hdr=['WWW-Authenticate: Digest']
14
 
                                )
15
 
 
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"], 
19
 
                                exclude=[],
20
 
                                resp_hdr=['Proxy-Authenticate: Digest realm=""']
21
 
                                )
22
 
 
23
 
# Client should retry
24
 
req3 = sip.RecvfromTransaction("REGISTER retry #2 of 2", 200,
25
 
                                include=[], 
26
 
                                exclude=[],
27
 
                                expect="registration success"
28
 
                                )
29
 
 
30
 
recvfrom_cfg = sip.RecvfromCfg("Registration with empty realm",
31
 
                               pjsua, [req1, req2, req3])