In addition to configuring the Gateway Server to connect to an NCS, the NCS must also be configured to communicate with the Gateway. Communication between the Gateway and NCS servers or control stations is done using either raw TCP connections (MOS version 2.8.5 and earlier), or websocket connections (MOS version 4.0). This section describes the server endpoints of the Gateway, and how the NCS can connect to the Gateway.
Message Flow
Most MOS messages take the form of request and response messages. For example, the roList message is a response to an roReq message. There are two families of messages:
Media Object Server messages for communicating metadata about available media objects.
Running Order messages for communicating information about running orders (rundowns) on the NCS.
Each family of messages is sent over specific connections between the NCS and the Gateway. There are two connections for each family of messages, one for outgoing requests from the Gateway to the NCS, and one for incoming requests from the NCS to the Gateway. In total there will be four connections between the Gateway and an NCS, enabling bidirectional communication.
TCP Endpoints
For establishing connections from the NCS to the Gateway for MOS protocol 2.8.5 or earlier, the Gateway listens to the following TCP ports:
TCP port | Default | Purpose |
|---|---|---|
Media Object Metadata Endpoint | 10540 | Set in General config tab. |
Running Order Endpoint | 10541 | Set in General config tab. |
Control Station Endpoint | 10640 | Enables Media Sequencers running on control stations to connect to the Gateway. Media Sequencers can be configured to connect to a Gateway with the MOS Config web application. See section Launch Standalone MOS Config Web-Application. Note: NCS servers should not connect to this port. |
Limitations
When using TCP connections from an NCS to the Gateway:
The IP address of the connecting NCS is used for routing messages to the correct recipient, so TCP connections from the NCS to the Gateway must be established from this same IP address, as configured in NCS Server Configuration.
Websocket Endpoints
When using MOS version 4.0, all communication between the Gateway and the NCS is done over websocket. All websocket connections from an NCS to the Gateway are established via the HTTP server on the MSE hosting the Gateway. If using the default HTTP server ports, the endpoint is one of the following:
Insecure websocket:
ws://<Gateway hostname>:8580/api/gatewaySecure websocket (Requires configuration):
wss://<Gateway hostname>:8543/api/gateway
See Secure Communication.
Even though the same endpoint is used, there must be separate connections for Media Object Metadata and for Running Order messages, similar to the TCP connections for MOS 2.8.5 and earlier. When establishing the connection, URL query parameters are used to specify the type of connection, as described in introductory section MOS Protocol. You can specify the following query parameters when establishing a websocket connection to the Gateway:
ncsID=<NCS ID>
Needed for the Gateway to identify the NCS that established the connection. The NCS ID must be the same as configured when adding the NCS to the Gateway configuration (see NCS Server Configuration).
channel=mom|ro
The channel parameter must be set to mom to indicate that this connection will be used for Media Object Metadata. This is equivalent to the Lower port for MOS 2.8.5 and earlier.
The channel parameter must be set to ro to indicate that this connection will be used for Running Order information. This is equivalent to the Upper port for MOS 2.8.5 and earlier.
passive (optional)=true|false
Whether or not this is a passive connection. Default value is false.
Example URLs
Media Object Metadata:
wss://example-gateway:8543/api/gateway?ncsID=MYNCS&channel=momRunning Order:
wss://example-gateway:8543/api/gateway?ncsID=MYNCS&channel=ro
Passive Connections
MOS 4.0 allows for setups where all four connections are established by the same device. When adding an NCS to the Gateway configuration (see NCS Server Configuration), the default behavior is to expect two connections from the Gateway to the NCS, and two connections from the NCS to the Gateway. However, it is also possible to configure the Gateway to establish all four connections to the NCS and vice versa. This is done by establishing passive connections in place of the connections that would normally be established in the opposite direction. Using passive connections makes it possible for either the Gateway or the NCS to be protected by a firewall, as one will be the client establishing outgoing connections to the server.
When using NCS passive mode ‘client’, the NCS must establish all four connections to the Gateway:
Media Object Metadata connection
The NCS creates this connection to send Media Object Server messages to the Gateway, for example a mosReq message to request a single MOS object.
Example URL:
wss://example-gateway:8543/api/gateway?ncsID=MYNCS&channel=mom
Passive Media Object Metadata connection
The NCS creates this connection to receive and respond to Media Object Server messages from the Gateway, for example mosObj messages for the Gateway to push information about available MOS objects to the NCS.
Example URL:
wss://example-gateway:8543/api/gateway?ncsID=MYNCS&channel=mom&passive=true
Running Order connection
The NCS creates this connection to send Running Order messages to the Gateway, for example roCreate messages to provide information about a new running order to the Gateway.
Example URL:
wss://example-gateway:8543/api/gateway?ncsID=MYNCS&channel=ro
Passive Running Order connection
The NCS creates this connection to receive and respond to Running Order messages from the Gateway, for example a roReq message for the Gateway to request information about a running order from the NCS.
Example URL:
wss://example-gateway:8543/api/gateway?ncsID=MYNCS&channel=ro&passive=true
Authentication
If the Gateway has been configured to require authentication with a username and password, the NCS will have to provide these credentials with a basic authentication HTTP header in the HTTP request establishing the websocket connection.
For further details, see section MOS 4 Websocket Server Settings.
Control Station Websocket Endpoint
Media Sequencers running on control stations may also connect to the Gateway over websocket. This can be configured on the control station with the MOS Config web application, by enabling secure communication (see Launch Standalone MOS Config Web-Application). The control stations will use the same websocket endpoint as NCS servers, but query parameters are different.
The channel parameter must be set to mse
Instead of providing ncsID, the control station must provide an mseID, a unique identifier for that Media Sequencer.
By default this is the hostname of the control station, but can be configured in MOS Config.