~noskcaj/ubuntu/saucy/sflphone/merge-1.2.3-2

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/tests/pjsua/scripts-sendto/140_sdp_with_direction_attr_in_session_2.py

  • Committer: Jackson Doak
  • Date: 2013-07-10 21:04:46 UTC
  • mfrom: (20.1.3 sid)
  • Revision ID: noskcaj@ubuntu.com-20130710210446-y8f587vza807icr9
Properly merged from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: 140_sdp_with_direction_attr_in_session_2.py 3086 2010-02-03 14:43:25Z nanang $
 
2
import inc_sip as sip
 
3
import inc_sdp as sdp
 
4
 
 
5
# Offer contains "inactive" attribute in the session, however the media
 
6
# also has "sendonly" attribute. Answer should appropriately respond
 
7
# direction attribute in media, instead of the one in session.
 
8
sdp = \
 
9
"""
 
10
v=0
 
11
o=- 0 0 IN IP4 127.0.0.1
 
12
s=-
 
13
c=IN IP4 127.0.0.1
 
14
t=0 0
 
15
a=inactive
 
16
m=audio 5000 RTP/AVP 0
 
17
a=sendonly
 
18
"""
 
19
 
 
20
pjsua_args = "--null-audio --auto-answer 200"
 
21
extra_headers = ""
 
22
include = ["Content-Type: application/sdp",     # response must include SDP
 
23
               "a=recvonly"
 
24
           ]
 
25
exclude = []
 
26
 
 
27
sendto_cfg = sip.SendtoCfg("SDP direction in session", pjsua_args, sdp, 200,
 
28
                           extra_headers=extra_headers,
 
29
                           resp_inc=include, resp_exc=exclude)