Change in osmo-bsc[master]: bsc: Use correct MGCP endpoint name for IPA/SCCPlite

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri May 25 17:25:17 UTC 2018


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/9319


Change subject: bsc: Use correct MGCP endpoint name for IPA/SCCPlite
......................................................................

bsc: Use correct MGCP endpoint name for IPA/SCCPlite

In IPA/SCCPlite, we have to use the CIC to construct the MGCP
endpoint name instead of the usual dynamic endpoint allocation.

Change-Id: I03e2cdbc8e40169e52df3720c40b66734e880525
---
M src/libbsc/bsc_subscr_conn_fsm.c
1 file changed, 20 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/9319/1

diff --git a/src/libbsc/bsc_subscr_conn_fsm.c b/src/libbsc/bsc_subscr_conn_fsm.c
index d741f00..0598535 100644
--- a/src/libbsc/bsc_subscr_conn_fsm.c
+++ b/src/libbsc/bsc_subscr_conn_fsm.c
@@ -386,6 +386,25 @@
 	}
 }
 
+static const char *get_mgw_ep_name(struct gsm_subscriber_connection *conn)
+{
+	static char ep_name[256];
+	struct bsc_msc_data *msc = conn->sccp.msc;
+
+	switch (conn->sccp.msc->a.asp_proto) {
+	case OSMO_SS7_ASP_PROT_IPA:
+		/* derive endpoint name from CIC on A interface side */
+		snprintf(ep_name, sizeof(ep_name), "%x at mgw",
+			 mgcp_port_to_cic(conn->user_plane.rtp_port, msc->rtp_base));
+		break;
+	default:
+		/* use dynamic RTPBRIDGE endpoint allocation in MGW */
+		osmo_strlcpy(ep_name, ENDPOINT_ID, sizeof(ep_name));
+		break;
+	}
+	return ep_name;
+}
+
 /* We're on an active subscriber connection, passing DTAP back and forth */
 static void gscon_fsm_active(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
@@ -416,7 +435,7 @@
 			 * mgcp-ass-mgcp state-chain (see FIXME above) */
 			memset(&conn_peer, 0, sizeof(conn_peer));
 			conn_peer.call_id = conn->sccp.conn_id;
-			osmo_strlcpy(conn_peer.endpoint, ENDPOINT_ID, sizeof(conn_peer.endpoint));
+			osmo_strlcpy(conn_peer.endpoint, get_mgw_ep_name(conn), sizeof(conn_peer.endpoint));
 
 			/* (Pre)Change state and create the connection */
 			osmo_fsm_inst_state_chg(fi, ST_WAIT_CRCX_BTS, MGCP_MGW_TIMEOUT, MGCP_MGW_TIMEOUT_TIMER_NR);

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03e2cdbc8e40169e52df3720c40b66734e880525
Gerrit-Change-Number: 9319
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180525/e6ff19d1/attachment.htm>


More information about the gerrit-log mailing list