Change in osmo-mgw[master]: add osmo_mgcpc_ep_ci_get_remote_rtp_info()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Wed May 5 14:42:35 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/24145 )


Change subject: add osmo_mgcpc_ep_ci_get_remote_rtp_info()
......................................................................

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
---
M include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
M src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
2 files changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/45/24145/1

diff --git a/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h b/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
index 736da22..78e3a41 100644
--- a/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
+++ b/include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h
@@ -23,6 +23,8 @@
 bool osmo_mgcpc_ep_ci_get_crcx_info_to_sockaddr(const struct osmo_mgcpc_ep_ci *ci, struct sockaddr_storage *dest);
 bool osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(const struct osmo_mgcpc_ep_ci *ci, uint8_t* cid);
 
+const struct mgcp_conn_peer *osmo_mgcpc_ep_ci_get_remote_rtp_info(const struct osmo_mgcpc_ep_ci *ci);
+
 void osmo_mgcpc_ep_ci_request(struct osmo_mgcpc_ep_ci *ci,
 			      enum mgcp_verb verb, const struct mgcp_conn_peer *verb_info,
 			      struct osmo_fsm_inst *notify,
diff --git a/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c b/src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c
index 2b94840..8ab5961 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 RTP port information that MGW is receiving on for this connection, 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 RTP port information that the MGW is sending to for this connection, 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)
 {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/24145
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibb488925827d9dc0ccb1f8d6d84728745d086793
Gerrit-Change-Number: 24145
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210505/09ad6d1c/attachment.htm>


More information about the gerrit-log mailing list