From a3cdab448121c76a56ef547ffdc61e3f58a93dbc Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 9 May 2019 17:54:08 +0200 Subject: Request Osmux CID and forward it in Assign Req and Assign Compl Related: OS#2551 Depends: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de Change-Id: I5b14e34481e890669c9ee02dba81eba84293cebb --- include/osmocom/msc/call_leg.h | 2 ++ include/osmocom/msc/ran_msg.h | 4 ++++ include/osmocom/msc/rtp_stream.h | 10 ++++++++++ 3 files changed, 16 insertions(+) (limited to 'include') diff --git a/include/osmocom/msc/call_leg.h b/include/osmocom/msc/call_leg.h index d8380f52b..f35816c47 100644 --- a/include/osmocom/msc/call_leg.h +++ b/include/osmocom/msc/call_leg.h @@ -44,6 +44,8 @@ struct call_leg { /* 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 4d0485d43..af0822b70 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -84,6 +84,8 @@ struct ran_assignment_command { 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 ran_msg { 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 794e8066f..c53c4f179 100644 --- a/include/osmocom/msc/rtp_stream.h +++ b/include/osmocom/msc/rtp_stream.h @@ -44,6 +44,15 @@ struct rtp_stream { 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 @@ int rtp_stream_do_mdcx(struct rtp_stream *rtps); 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); -- cgit v1.2.3