aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-05-29 12:02:38 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-05-29 12:02:38 +0200
commit5046db98b106a3c583d7fe296e0748f1bde34629 (patch)
treedfde6a8438afd4d635c3612b0743242d519fcf52
parent65d8d0d9b5b0a59bc34d5b5f3677e3cbe9d21a64 (diff)
mgcp: hack to keep IuUP working
Since change If9a81d057f73150e483286472e73c45e7a453a6d removes the RTP loopback at the beginning. This also means that the Hack we do to run the IuUP negotiation via looping back the first few RTP packets will not work anymore. However, we should keep that hack as long as we do not have IuUP support in the MGW. - Start RTP connection in loopback mode for IuUP Change-Id: I4c7d90de4dc87e8baf7cf4a0c69d0e9e8c92e27b
-rw-r--r--src/libmsc/msc_mgcp.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 67a2142a1..c77e389bb 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -278,10 +278,22 @@ static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data
struct msgb *msg;
int rc;
+#ifdef BUILD_IU
+ struct gsm_trans *trans;
+ struct gsm_subscriber_connection *conn;
+#endif
+
OSMO_ASSERT(mgcp_ctx);
mgcp = mgcp_ctx->mgcp;
OSMO_ASSERT(mgcp);
+#ifdef BUILD_IU
+ trans = mgcp_ctx->trans;
+ OSMO_ASSERT(trans);
+ conn = trans->conn;
+ OSMO_ASSERT(conn);
+#endif
+
/* NOTE: In case of error, we will not be able to perform any DLCX
* operation because until this point we do not have requested any
* endpoint yet. */
@@ -302,6 +314,14 @@ static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data
return;
}
+ /* HACK: We put the connection in loopback mode at the beginnig to
+ * trick the NodeB into doing the IuUP negotiation with itsself.
+ * this is a hack we need because osmo-mgw does not support IuUP yet */
+#ifdef BUILD_IU
+ if (conn->via_ran == RAN_UTRAN_IU)
+ mgcp_msg.conn_mode = MGCP_CONN_LOOPBACK;
+#endif
+
msg = mgcp_msg_gen(mgcp, &mgcp_msg);
OSMO_ASSERT(msg);
@@ -377,10 +397,22 @@ static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
struct msgb *msg;
int rc;
+#ifdef BUILD_IU
+ struct gsm_trans *trans;
+ struct gsm_subscriber_connection *conn;
+#endif
+
OSMO_ASSERT(mgcp_ctx);
mgcp = mgcp_ctx->mgcp;
OSMO_ASSERT(mgcp);
+#ifdef BUILD_IU
+ trans = mgcp_ctx->trans;
+ OSMO_ASSERT(trans);
+ conn = trans->conn;
+ OSMO_ASSERT(conn);
+#endif
+
switch (event) {
case EV_CRCX_RAN_RESP:
break;
@@ -405,6 +437,14 @@ static void fsm_crcx_cn_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
return;
}
+ /* HACK: We put the connection in loopback mode at the beginnig to
+ * trick the NodeB into doing the IuUP negotiation with itsself.
+ * this is a hack we need because osmo-mgw does not support IuUP yet */
+#ifdef BUILD_IU
+ if (conn->via_ran == RAN_UTRAN_IU)
+ mgcp_msg.conn_mode = MGCP_CONN_LOOPBACK;
+#endif
+
msg = mgcp_msg_gen(mgcp, &mgcp_msg);
OSMO_ASSERT(msg);