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:
parent
ca538fc5eb
commit
c63f15a9a7
|
@ -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);
|
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));
|
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;
|
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 */
|
/* 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);
|
rc = msgb_printf(sdp, "X-Osmux: %u\r\n", conn->osmux.cid);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue