Change in osmo-bsc[master]: bssap: Feed Assign Complete with Osmux CID retrieved from MGW

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed May 8 17:05:24 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13927


Change subject: bssap: Feed Assign Complete with Osmux CID retrieved from MGW
......................................................................

bssap: Feed Assign Complete with Osmux CID retrieved from MGW

Change-Id: I77dfdd965ae828c39a9818669177aefd22bc02f2
---
M src/osmo-bsc/assignment_fsm.c
1 file changed, 24 insertions(+), 2 deletions(-)



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

diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c
index 834b58b..aefa4af 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -128,6 +128,13 @@
 	}
 }
 
+static void _gsm0808_ass_compl_extend_osmux(struct msgb *msg, uint8_t cid)
+{
+	OSMO_ASSERT(msg->l3h[1] == msgb_l3len(msg) - 2); /*TL not in len */
+	msgb_tv_put(msg, GSM0808_IE_OSMO_OSMUX_CID, cid);
+	msg->l3h[1] = msgb_l3len(msg) - 2;
+}
+
 static void send_assignment_complete(struct gsm_subscriber_connection *conn)
 {
 	int rc;
@@ -135,6 +142,7 @@
 	struct gsm0808_speech_codec *sc_ptr = NULL;
 	struct sockaddr_storage addr_local;
 	struct sockaddr_storage *addr_local_p = NULL;
+	uint8_t osmux_cid = 0;
 	int perm_spch = 0;
 	uint8_t chosen_channel;
 	struct msgb *resp;
@@ -164,6 +172,15 @@
 			addr_local_p = &addr_local;
 		}
 
+		if (gscon_is_aoip(conn) && conn->assignment.req.use_osmux) {
+			if (!osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(conn->user_plane.mgw_endpoint_ci_msc,
+									 &osmux_cid)) {
+				assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE,
+						"Unable to compose Osmux CID of MGW -> MSC");
+				return;
+			}
+		}
+
 		/* Only AoIP networks include a speech codec (choosen) in the
 		 * assignment complete message. */
 		if (gscon_is_aoip(conn)) {
@@ -185,6 +202,10 @@
 		return;
 	}
 
+	if (gscon_is_aoip(conn) && conn->assignment.requires_voice_stream &&
+	    conn->assignment.req.use_osmux)
+		_gsm0808_ass_compl_extend_osmux(resp, osmux_cid);
+
 	rc = gscon_sigtran_send(conn, resp);
 	if (rc) {
 		assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE,
@@ -466,10 +487,11 @@
 
 	assignment_fsm_update_id(conn);
 	LOG_ASSIGNMENT(conn, LOGL_INFO, "Starting Assignment: chan_mode=%s, chan_type=%s,"
-		       " aoip=%s MSC-rtp=%s:%u\n",
+		       " aoip=%s MSC-rtp=%s:%u (osmux=%s)\n",
 		       gsm48_chan_mode_name(conn->lchan->ch_mode_rate.chan_mode),
 		       rate_names[conn->lchan->ch_mode_rate.chan_rate],
-		       req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port);
+		       req->aoip ? "yes" : "no", req->msc_rtp_addr, req->msc_rtp_port,
+		       req->use_osmux ? "yes" : "no");
 
 	assignment_fsm_state_chg(ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE);
 	info = (struct lchan_activate_info){

-- 
To view, visit https://gerrit.osmocom.org/13927
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: I77dfdd965ae828c39a9818669177aefd22bc02f2
Gerrit-Change-Number: 13927
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190508/63ad37a6/attachment.htm>


More information about the gerrit-log mailing list