Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/9941 )

Change subject: BSC_Tests_LCLS: try call legs with different codec/rate
......................................................................

BSC_Tests_LCLS: try call legs with different codec/rate

since the local MGW may not support transcoding, osmo-bsc should
avoid to LCLS call legs that use different codec/rate. This test
attemts to set up a call with different codec rate and checks if
those legs do not get LCLSed

Change-Id: I91b132306e530ad9ca03fb4a34012381be6b0b52
Depends: osmo-bsc I157549129a40c64364dc126f67195759e5f1d60f
Related: OS#1602
---
M bsc/BSC_Tests_LCLS.ttcn
M bsc/expected-results.xml
2 files changed, 38 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn
index da9fe94..dfbd946 100644
--- a/bsc/BSC_Tests_LCLS.ttcn
+++ b/bsc/BSC_Tests_LCLS.ttcn
@@ -303,6 +303,42 @@
         f_tc_lcls_gcr_bway_connect(true)
 }

+/* Unless explicitly enabled, osmo-bsc will avoid LCLSs when the codecs or 
rates
+ * of both legs are different */
+testcase TC_lcls_gcr_bway_codec_mismatch() runs on lcls_test_CT {
+       var TestHdlrParams pars_a := valueof(t_def_TestHdlrPars);
+       var TestHdlrParams pars_b;
+       var MSC_ConnHdlr vc_conn;
+       var MgcpCommand mgcp_cmd;
+
+       f_lcls_init();
+
+       /* First call leg uses full rate */
+       pars_a.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
+       pars_a.lcls.gcr := valueof(ts_GCR('010203'O, '0405'O, '060708090a'O));
+       pars_a.lcls.cfg := LCLS_CFG_both_way;
+       pars_a.lcls.csc := LCLS_CSC_connect;
+
+       /* The second call leg uses half-rate */
+       pars_b := pars_a;
+       pars_a.ass_codec_list := valueof(ts_BSSMAP_IE_CodecList({ts_CodecHR}));
+
+       /* first call is not possible to be LS (no second leg yet) */
+       pars_a.lcls.exp_sts := LCLS_STS_not_possible_ls;
+
+       /* second call is also not possible to be LS (codec/rate does not 
match) */
+       pars_b.lcls.exp_sts := LCLS_STS_not_yet_ls;
+       f_lcls_test_init(pars_a, pars_b);
+
+       interleave {
+       [] CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
+       [] CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
+       [] CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
+       }
+
+       f_lcls_test_fini();
+}
+
 /* Send an ASSIGNMENT REQ with LCLS CFG+CSC enabling LCLS but GCR doesn't 
match! */
 testcase TC_lcls_gcr_nomatch_bway_connect() runs on lcls_test_CT {
        var TestHdlrParams pars_a := valueof(t_def_TestHdlrPars);
@@ -600,6 +636,7 @@
        execute( TC_lcls_gcr_only() );
        execute( TC_lcls_gcr_bway_connect() );
        execute( TC_lcls_gcr_bway_connect_hr() );
+       execute( TC_lcls_gcr_bway_codec_mismatch() );
        execute( TC_lcls_gcr_nomatch_bway_connect() );
        execute( TC_lcls_gcr_bway_dont_connect() );
        execute( TC_lcls_gcr_unsuppported_cfg() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index dbe3d2c..7339951 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -88,6 +88,7 @@
   <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_only' time='MASKED'/>
   <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_connect' 
time='MASKED'/>
   <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_connect_hr' 
time='MASKED'/>
+  <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_codec_mismatch' 
time='MASKED'/>
   <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_nomatch_bway_connect' 
time='MASKED'/>
   <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_bway_dont_connect' 
time='MASKED'/>
   <testcase classname='BSC_Tests_LCLS' name='TC_lcls_gcr_unsuppported_cfg' 
time='MASKED'/>

--
To view, visit https://gerrit.osmocom.org/9941
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I91b132306e530ad9ca03fb4a34012381be6b0b52
Gerrit-Change-Number: 9941
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pma...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder

Reply via email to