MNCC v6: add optional SDP to the socket protocol

Add the new SDP section to the MNCC socket protocol, but do not yet implement
forwarding SDP from SIP. Implementing SDP forwarding follows in a subsequent
patch.

It is still possible to establish a call with empty SDP: the new osmo-msc on
the MT side, receiving an MNCC_SETUP_REQ, will hit an error log:
"Got no information of remote audio codecs: neither SDP nor Bearer Capability.
Trying anyway."
and then hold thumbs to hit a codec match, analogous to previous behavior.

Note that osmo-sip-connector should actually always have encoded a Bearer
Capability in the MNCC protocol in the MT MNCC_SETUP_REQ message, but never
has. Now we are ready to leapfrog from zero codec info to full SDP.

This patch must be merged at the same time as osmo-msc patch
Ie16f0804c4d99760cd4a0c544d0889b6313eebb7, so that both sides have a matching
MNCC protocol version number.

Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925
changes/21/16221/3
Neels Hofmeyr 3 years ago
parent b544ea396a
commit 2e2db3e0ad
  1. 5
      src/call.h
  2. 6
      src/mncc_protocol.h

@ -54,6 +54,11 @@ struct call_leg {
uint32_t payload_type;
uint32_t payload_msg_type;
/* SDP as received for this call leg. If this is an MNCC call leg, contains the SDP most recently received in an
* MNCC message; if this is a SIP call leg, contains the SDP most recently received in a SIP message. If no SDP
* was received yet, this string is empty. Otherwise a nul terminated string. */
char sdp[1024];
/**
* Remote started to ring/alert
*/

@ -158,6 +158,9 @@ struct gsm_mncc {
unsigned char lchan_type;
unsigned char lchan_mode;
/* A buffer to contain SDP ('\0' terminated) */
char sdp[1024];
};
struct gsm_data_frame {
@ -166,7 +169,7 @@ struct gsm_data_frame {
unsigned char data[0];
};
#define MNCC_SOCK_VERSION 5
#define MNCC_SOCK_VERSION 6
struct gsm_mncc_hello {
uint32_t msg_type;
uint32_t version;
@ -189,6 +192,7 @@ struct gsm_mncc_rtp {
uint16_t port;
uint32_t payload_type;
uint32_t payload_msg_type;
char sdp[1024];
};
struct gsm_mncc_bridge {

Loading…
Cancel
Save