Tristan Matthews | 0a329cc | 2013-07-17 13:20:14 -0400 | [diff] [blame] | 1 | # $Id$ |
| 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) |
| 30 | |