neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-sip-connector/+/16221 )

Change subject: MNCC v6: add optional SDP to the socket protocol
......................................................................

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
---
M src/call.h
M src/mncc_protocol.h
2 files changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  neels: Looks good to me, approved



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 @@
        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 @@

        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 @@
        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 @@
        uint16_t        port;
        uint32_t        payload_type;
        uint32_t        payload_msg_type;
+       char            sdp[1024];
 };

 struct gsm_mncc_bridge {

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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: Iaca9ed6611fc5ca8ca749bbbefc31f54bea5e925
Gerrit-Change-Number: 16221
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to