Configuring transport parameters

Transport parameters control protocols voice browsers use to communicate during a Speech Server session. These parameters are optional: you typically use them to integrate Nuance products with an existing system. You can set values for several types of protocol:

  • Network transport layer: TCP, UDP
  • Session control: SIP (RTSP for MRCPv1)
  • Messaging: MRCPv1 or MRCPv2
  • Audio: RTP
  • MRCPv2 security: TLS (messaging), SRTP (audio). For TLS parameters, see Configuring network security.

You may need to modify transport parameters to improve performance; for example, to split RTP and SIP traffic or to control the allowed range for RTP/RTCP ports used by Speech Server.

Splitting traffic

In order to improve performance, you may choose to split RTP and SIP traffic such that they are handled on a separate network interface cards (NICs).

You can do so by assigning IP addresses as values for parameters in the NSSserver.cfg file:

  • server.transport.bindrtptoip—Specifies the IP address of the NIC card that is to be used exclusively for RTP traffic. (Do no specify 127.0.0.1.)
  • server.mrcp2.sip.transport.interface.n—By default the system uses all available IPv4 addresses on the host. Use this parameter to dedicate SIP traffic exclusively to a specific NIC card. You can specify several cards using the index n for each instance of the parameter: assign the first address to server.mrcp2.sip.transport.interface.0, the second to server.mrcp2.sip.transport.interface.1, and so on.

Flexible port usage

Speech Server configures a range of allowed audio ports, and assigns ports as follows:

  1. When an MRCP client sends an INVITE (MRCPv1: SETUP) request to Speech Server, the server searches the local host for a pair of available ports to create the RTP/SRTP session. The server skips ports that are already being used.
  2. When a pair of adjacent ports are found, Speech Server allocates both: the first for the RTP stream and the second for the RTCP (MRCPv1: RTSP) stream.
  3. When it receives the next INVITE (SETUP) request, Speech Server starts the next search at the last allocated port. In this way, all ports in the allowed range are used. When Speech Server arrives at the end of the range, it restarts at the beginning.
  4. If Speech Server cannot find a pair of available ports, it responds to the INVITE (SETUP) request with an error.

The allowed range for RTP/RTCP (RTSP) ports used by Speech Server is specified using the following parameters:

server.rtp.port VXIInteger 7892
server.rtp.maxCountOfSession VXIInteger 600
server.mrcp1.rtsp.maxCountOfSession VXIInteger 500
server.mrcp2.sip.maxCountOfSession VXIInteger 96

The starting point for range of RTP ports is specified by the following parameter:

server.rtp.port = Start port

The end-of-range is specified by taking the maximum of the following three parameters:

server.rtp.maxCountOfSession VXIInteger 600
server.mrcp1.rtsp.maxCountOfSession VXIInteger 500
server.mrcp2.sip.maxCountOfSession VXIInteger 96

To calculate the range of available ports, use the following formula:

range = [first_RTP_Port, last_RTCP_Port] 
first_RTP_Port = server.rtp.port 
last_RTCP_Port = first_RTP_Port +2*(<end-of-range>) - 1

For the above values:

first_RTP_Port = 7892
last_RTCP_Port = 7892 + 600*2 - 1 = 9091

The UDP port range that needs to be available for RTP/RTCP (RTSP) is therefore 7892 through 9091 (inclusive).