Review at  https://gerrit.osmocom.org/6169

bsc: Expect CRCX and send an ACK back

Change-Id: Ic4fabc2a2cf034a831e446697b3a22f4d1d0c6d6
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index f763994..d619068 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -164,6 +164,7 @@
                endpoint := omit,
                transid := omit
        };
+       var SDP_Message sdp;
 
        mgcp_conn_id := f_mgcp_alloc_conn_id();
        f_create_chan_and_exp(pars);
@@ -172,10 +173,13 @@
        BSSAP.receive(tr_BSSMAP_ComplL3);
        f_create_mgcp_expect(mgcpcrit);
        BSSAP.send(ass_cmd);
+       MGCP.receive(tr_CRCX) -> value cmd;
+       sdp := valueof(ts_SDP("127.0.0.1", "127.0.0.1", "foo", "21", 1000, { 
"98" },
+               {valueof(ts_SDP_rtpmap(98, "AMR/8000")),
+               valueof(ts_SDP_ptime(20)) } ));
+       MGCP.send(ts_CRCX_ACK(cmd.line.trans_id, mgcp_conn_id, sdp))
+
        alt {
-       [] MGCP.receive(tr_CRCX) -> value cmd {
-               MGCP.send(ts_CRCX_ACK(cmd.line.trans_id, mgcp_conn_id, cmd.sdp))
-               }
        /* if we receive exactly what we expected, always return + pass */
        [] BSSAP.receive(exp_ass_cpl) -> value bssap {
                setverdict(pass);

-- 
To view, visit https://gerrit.osmocom.org/6169
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4fabc2a2cf034a831e446697b3a22f4d1d0c6d6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: daniel <[email protected]>

Reply via email to