pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37551?usp=email )


Change subject: msc: Use RAB_ID obtained from RAB-AssReq
......................................................................

msc: Use RAB_ID obtained from RAB-AssReq

The helper function will be used too by follow-up patches.

Change-Id: If532c41304803d223591ce8e0c10dda4a562dfb8
---
M library/ranap/RANAP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
2 files changed, 24 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/51/37551/1

diff --git a/library/ranap/RANAP_Templates.ttcn 
b/library/ranap/RANAP_Templates.ttcn
index 8e6c8f3..7fb374d 100644
--- a/library/ranap/RANAP_Templates.ttcn
+++ b/library/ranap/RANAP_Templates.ttcn
@@ -1870,5 +1870,12 @@
        return omit;
 }

+function f_ranap_rab_ass_req_extract_rab_id(RANAP_PDU ranap) return RAB_ID
+{
+       var RAB_AssignmentRequest.protocolIEs ies := 
ranap.initiatingMessage.value_.rAB_AssignmentRequest.protocolIEs;
+       var RAB_ID rab_id := 
ies[0].value_.rAB_SetupOrModifyList[0][0].firstValue.rAB_SetupOrModifyItemFirst.rAB_ID;
+       return rab_id;
+}
+

 }
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 16309ed..c82d36a 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1122,6 +1122,7 @@
        var template MgcpResponse mgcp_resp;
        var MgcpOsmuxCID osmux_cid;
        var PDU_BSSAP bssap;
+       var RANAP_PDU ranap;

        f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);

@@ -1294,8 +1295,9 @@
                        log("f_mt_call_complete 5.iu");
                        }

-               [] BSSAP.receive(tr_RANAP_RabAssReq(?)) {
+               [] BSSAP.receive(tr_RANAP_RabAssReq(?)) -> value ranap {
                        log("f_mt_call_complete 6.iu");
+                       var RAB_ID rab_id := 
f_ranap_rab_ass_req_extract_rab_id(ranap);
                        var RAB_SetupOrModifiedList l := {
                                {
                                        {
@@ -1303,7 +1305,7 @@
                                                criticality := ignore,
                                                value_ := {
                                                  rAB_SetupOrModifiedItem := {
-                                                       rAB_ID := int2bit(23, 
8),
+                                                       rAB_ID := rab_id,
                                                        transportLayerAddress 
:= hex2bit( '350001c0a8021500000000000000000000000000'H),
                                                        iuTransportAssociation 
:= {
                                                                bindingID := 
'040c0000'O
@@ -1777,6 +1779,7 @@
                }
        [] BSSAP.receive(tr_RANAP_RabAssReq(*)) -> value ranap {
                log("f_mo_call_establish 4.iu: rx RANAP RAB Assignment 
Request");
+               var RAB_ID rab_id := f_ranap_rab_ass_req_extract_rab_id(ranap);
                var RAB_SetupOrModifiedList l := {
                        {
                                {
@@ -1784,7 +1787,7 @@
                                        criticality := ignore,
                                        value_ := {
                                          rAB_SetupOrModifiedItem := {
-                                               rAB_ID := int2bit(23, 8),
+                                               rAB_ID := rab_id,
                                                transportLayerAddress := 
hex2bit( '350001c0a8021500000000000000000000000000'H),
                                                iuTransportAssociation := {
                                                        bindingID := '040c0000'O

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37551?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If532c41304803d223591ce8e0c10dda4a562dfb8
Gerrit-Change-Number: 37551
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to