aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libosmo-mgcp-client/mgcp_client_fsm.c6
-rw-r--r--src/libosmo-mgcp/mgcp_protocol.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c
index ab7af10b2..e83a11947 100644
--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c
@@ -404,6 +404,12 @@ static void mgw_mdcx_resp_cb(struct mgcp_response *r, void *priv)
}
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 35141f848..555d6c644 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -323,7 +323,7 @@ static struct msgb *create_response_with_sdp(struct mgcp_endpoint *endp,
}
/* 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;