Request Osmux CID and forward it in Assign Req and Assign Compl
Related: OS#2551
Depends: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de
Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb
diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h
index d8380f5..f35816c 100644
--- a/include/osmocom/msc/call_leg.h
+++ b/include/osmocom/msc/call_leg.h
@@ -44,6 +44,8 @@
/* Prevent events from deallocating for certain release code paths, to prevent use-after-free problems. */
bool deallocating;
+
+ bool ran_peer_supports_osmux;
};
enum call_leg_event {
diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h
index 4d0485d..af0822b 100644
--- a/include/osmocom/msc/ran_msg.h
+++ b/include/osmocom/msc/ran_msg.h
@@ -84,6 +84,8 @@
const struct osmo_sockaddr_str *cn_rtp;
const struct gsm0808_channel_type *channel_type;
enum nsap_addr_enc rab_assign_addr_enc;
+ bool osmux_present;
+ uint8_t osmux_cid;
};
struct ran_cipher_mode_command {
@@ -223,6 +225,8 @@
struct osmo_sockaddr_str remote_rtp;
bool codec_present;
enum mgcp_codecs codec;
+ bool osmux_present;
+ uint8_t osmux_cid;
} assignment_complete;
struct {
enum gsm0808_cause bssap_cause;
diff --git a/include/osmocom/msc/rtp_stream.h b/include/osmocom/msc/rtp_stream.h
index 794e806..c53c4f1 100644
--- a/include/osmocom/msc/rtp_stream.h
+++ b/include/osmocom/msc/rtp_stream.h
@@ -44,6 +44,15 @@
struct osmo_mgcpc_ep_ci *ci;
enum mgcp_connection_mode crcx_conn_mode;
+
+ /* configured to use Osmux */
+ bool use_osmux;
+ /* Allocated by our MGW, negative means invalid, not yet known */
+ int local_osmux_cid;
+ /* Allocated by BSC MGW, negative means invalid, not yet known */
+ int remote_osmux_cid;
+ /* Whether remote_osmux_cid has been communicated to MGW */
+ bool remote_osmux_cid_sent_to_mgw;
};
#define RTP_STREAM_FMT "local=" RTP_IP_PORT_FMT ",remote=" RTP_IP_PORT_FMT
@@ -57,6 +66,7 @@
void rtp_stream_set_codec(struct rtp_stream *rtps, enum mgcp_codecs codec);
void rtp_stream_set_remote_addr(struct rtp_stream *rtps, const struct osmo_sockaddr_str *r);
+void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t osmux_cid);
int rtp_stream_commit(struct rtp_stream *rtps);
void rtp_stream_release(struct rtp_stream *rtps);