mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user