~ubuntu-branches/ubuntu/vivid/sflphone/vivid

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/tests/pjsua/scripts-recvfrom/209c_reg_handle_423_bad_min_expires2.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2013-06-30 11:40:56 UTC
  • mfrom: (4.1.18 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130630114056-0np50jkyqo6vnmii
Tags: 1.2.3-2
* changeset_r92d62cfc54732bbbcfff2b1d36c096b120b981a5.diff 
  - fixes automatic endian detection 
* Update Vcs: fixes vcs-field-not-canonical

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: 209c_reg_handle_423_bad_min_expires2.py 3105 2010-02-23 11:03:07Z 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=python --user=username --password=password " + \
 
7
        "--auto-update-nat=0 --reg-timeout 300"
 
8
 
 
9
# 423 without Min-Expires. PJSIP would retry with Expires: 3601
 
10
req1 = sip.RecvfromTransaction("Initial request", 423,
 
11
                                include=["REGISTER sip"],
 
12
                                exclude=[],
 
13
                                resp_hdr=[]
 
14
                                )
 
15
 
 
16
# Another 423, still without Min-Expires
 
17
req2 = sip.RecvfromTransaction("Retry with guessed Expires header", 423,
 
18
                                include=["REGISTER sip", "Expires: 3601"],
 
19
                                exclude=[],
 
20
                                resp_hdr=[],
 
21
                                expect="without Min-Expires header is invalid"
 
22
                                )
 
23
 
 
24
recvfrom_cfg = sip.RecvfromCfg("Invalid 423 response to REGISTER",
 
25
                               pjsua, [req1, req2])