Change in osmo-mgw[master]: mgcp-cli: Parse X-Osmux on MDCX response

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun May 19 07:16:01 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14029 )

Change subject: mgcp-cli: Parse X-Osmux on MDCX response
......................................................................

mgcp-cli: Parse X-Osmux on MDCX response

During MDCX state is already changed to ACTIVATING but we still want to
send the local CID back to announce that we still use same local CID.

Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9
---
M src/libosmo-mgcp-client/mgcp_client_fsm.c
M src/libosmo-mgcp/mgcp_protocol.c
2 files changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c
index ab7af10..e83a119 100644
--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c
@@ -404,6 +404,12 @@
 	}
 	LOGPFSML(fi, LOGL_DEBUG, "MGW/MDCX: MGW responded with address %s:%u\n", r->audio_ip, r->audio_port);
 
+	if (r->head.x_osmo_osmux_use) {
+		LOGPFSML(fi, LOGL_DEBUG, "MGW/CRCX: MGW responded using Osmux %u\n", r->head.x_osmo_osmux_cid);
+		mgcp_ctx->conn_peer_remote.x_osmo_osmux_use = true;
+		mgcp_ctx->conn_peer_remote.x_osmo_osmux_cid = r->head.x_osmo_osmux_cid;
+	}
+
 	osmo_strlcpy(mgcp_ctx->conn_peer_remote.addr, r->audio_ip, sizeof(mgcp_ctx->conn_peer_remote.addr));
 	mgcp_ctx->conn_peer_remote.port = r->audio_port;
 
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 35141f8..555d6c6 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -323,7 +323,7 @@
 	}
 
 	/* Attach optional OSMUX parameters */
-	if (conn->osmux.state == OSMUX_STATE_NEGOTIATING) {
+	if (mgcp_conn_rtp_is_osmux(conn)) {
 		rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid);
 		if (rc < 0)
 			goto error;

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

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If182a48743ebe03f97caf9034e49b9947014bdf9
Gerrit-Change-Number: 14029
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190519/d73ead74/attachment.html>


More information about the gerrit-log mailing list