add osmo_mgcpc_ep_ci_get_remote_rtp_info()

So far an mgcp_client user can get the RTP address+port information that
the MGW has returned upon a CRCX. Add this function to return the other
RTP end, i.e. address+port that the MGW was told to send RTP to.

This will be used to fix the MGCP in osmo-bsc, which so far mixes up the
two RTP ends and compares the MSC's RTP address+port with the MGW's one
and hence fails to skip unnecessary MDCX.

Change-Id: Ibb488925827d9dc0ccb1f8d6d84728745d086793
diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
index 2b94840..a55281c 100644
--- a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
@@ -508,7 +508,8 @@
 	osmo_mgcpc_ep_fsm_check_state_chg_after_response(ci->ep->fi);
 }
 
-/*! Return the MGW's RTP port information for this connection, as returned by the last CRCX/MDCX OK message. */
+/*! Return the MGW's local RTP port information for this connection, i.e. the local port that MGW is receiving on, as
+ * returned by the last CRCX-OK / MDCX-OK message. */
 const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_rtp_info(const struct osmo_mgcpc_ep_ci *ci)
 {
 	ci = osmo_mgcpc_ep_check_ci((struct osmo_mgcpc_ep_ci*)ci);
@@ -519,6 +520,16 @@
 	return &ci->rtp_info;
 }
 
+/*! Return the MGW's remote RTP port information for this connection, i.e. the remote RTP port that the MGW is sending
+ * to, as sent to the MGW by the last CRCX / MDCX message. */
+const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_remote_rtp_info(const struct osmo_mgcpc_ep_ci *ci)
+{
+	ci = osmo_mgcpc_ep_check_ci((struct osmo_mgcpc_ep_ci*)ci);
+	if (!ci)
+		return NULL;
+	return &ci->verb_info;
+}
+
 /*! Return the MGW's RTP port information for this connection, as returned by the last CRCX/MDCX OK message. */
 bool osmo_mgcpc_ep_ci_get_crcx_info_to_sockaddr(const struct osmo_mgcpc_ep_ci *ci, struct sockaddr_storage *dest)
 {