From dafed581f04ba80f9376324fb29bd793f0e4aee4 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 5 Oct 2010 16:32:04 +0000 Subject: Fix #1143: - Fixed no audio bug when pjsua with SRTP optional-with-duplicated-offer calls pjsua with SRTP disabled, by updating active media index after SDP negotiation done. - Fixed bug in generating SDP, pjsua_media_channel_create_sdp(), by making sure all media in the SDP candidate are aligned with current active SDP before calling pjmedia_transport_encode_sdp(). - Fixed bug in modifying SDP for call hold, the media index to be modified was hardcoded to 0, should be active media index. - Added python tests for calls with SRTP optional-with-duplicated-offer. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3334 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/pjsua/scripts-call/150_srtp_0_3.py | 11 +++++++++++ tests/pjsua/scripts-call/150_srtp_1_3.py | 11 +++++++++++ tests/pjsua/scripts-call/150_srtp_2_3.py | 11 +++++++++++ tests/pjsua/scripts-call/150_srtp_3_0.py | 11 +++++++++++ tests/pjsua/scripts-call/150_srtp_3_1.py | 11 +++++++++++ tests/pjsua/scripts-call/150_srtp_3_2.py | 11 +++++++++++ tests/pjsua/scripts-call/150_srtp_3_3.py | 11 +++++++++++ 7 files changed, 77 insertions(+) create mode 100644 tests/pjsua/scripts-call/150_srtp_0_3.py create mode 100644 tests/pjsua/scripts-call/150_srtp_1_3.py create mode 100644 tests/pjsua/scripts-call/150_srtp_2_3.py create mode 100644 tests/pjsua/scripts-call/150_srtp_3_0.py create mode 100644 tests/pjsua/scripts-call/150_srtp_3_1.py create mode 100644 tests/pjsua/scripts-call/150_srtp_3_2.py create mode 100644 tests/pjsua/scripts-call/150_srtp_3_3.py (limited to 'tests') diff --git a/tests/pjsua/scripts-call/150_srtp_0_3.py b/tests/pjsua/scripts-call/150_srtp_0_3.py new file mode 100644 index 00000000..447a5b09 --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_0_3.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=no SRTP, caller=optional (with duplicated offer) SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=0 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1") + ] + ) diff --git a/tests/pjsua/scripts-call/150_srtp_1_3.py b/tests/pjsua/scripts-call/150_srtp_1_3.py new file mode 100644 index 00000000..a3d2c814 --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_1_3.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=optional SRTP, caller=optional (with duplicated offer) SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=1 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1") + ] + ) diff --git a/tests/pjsua/scripts-call/150_srtp_2_3.py b/tests/pjsua/scripts-call/150_srtp_2_3.py new file mode 100644 index 00000000..62a8e0ca --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_2_3.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=mandatory SRTP, caller=optional (with duplicated offer) SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=2 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1") + ] + ) diff --git a/tests/pjsua/scripts-call/150_srtp_3_0.py b/tests/pjsua/scripts-call/150_srtp_3_0.py new file mode 100644 index 00000000..2783b226 --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_3_0.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=optional (with duplicated offer) SRTP, caller=no SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=0 --srtp-secure=0 --max-calls=1") + ] + ) diff --git a/tests/pjsua/scripts-call/150_srtp_3_1.py b/tests/pjsua/scripts-call/150_srtp_3_1.py new file mode 100644 index 00000000..3028766b --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_3_1.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=optional (with duplicated offer) SRTP, caller=optional SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=1 --srtp-secure=0 --max-calls=1") + ] + ) diff --git a/tests/pjsua/scripts-call/150_srtp_3_2.py b/tests/pjsua/scripts-call/150_srtp_3_2.py new file mode 100644 index 00000000..3ab73f90 --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_3_2.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=optional (with duplicated offer) SRTP, caller=mandatory SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=2 --srtp-secure=0 --max-calls=1") + ] + ) diff --git a/tests/pjsua/scripts-call/150_srtp_3_3.py b/tests/pjsua/scripts-call/150_srtp_3_3.py new file mode 100644 index 00000000..1a5fd56d --- /dev/null +++ b/tests/pjsua/scripts-call/150_srtp_3_3.py @@ -0,0 +1,11 @@ +# $Id$ +# +from inc_cfg import * + +test_param = TestParam( + "Callee=optional (with duplicated offer) SRTP, caller=optional (with duplicated offer) SRTP", + [ + InstanceParam("callee", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1"), + InstanceParam("caller", "--null-audio --use-srtp=3 --srtp-secure=0 --max-calls=1") + ] + ) -- cgit v1.2.3