summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-08-15 06:12:54 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2019-11-28 21:05:49 +0100
commit2e2db3e0ada8b8ea2fbffc98b2be2bec24bfc139 (patch)
tree967152be90ab7b69e60a9ba571ff3fdb9d10e070
parentb544ea396af5673b74a8829efda888698c389896 (diff)
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
-rw-r--r--src/call.h5
-rw-r--r--src/mncc_protocol.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/call.h b/src/call.h
index bc772a4..7f67066 100644
--- a/src/call.h
+++ b/src/call.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
*/
diff --git a/src/mncc_protocol.h b/src/mncc_protocol.h
index 4950a77..b6f6635 100644
--- a/src/mncc_protocol.h
+++ b/src/mncc_protocol.h
@@ -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 {