Media Server Configuration

This guide covers the configuration parameters for the Media Server, which handles MRCP communication between your voice platform and the speech services. For an overview of the Media Server architecture, see Media Server Connectivity.

Configuration File

Media Server settings are stored in media_server.conf, located at:

mrcp-api/docker/lumenvox/media_server.conf

To modify the configuration, follow these steps:

1. Extract the configuration from the running container:

docker cp docker-cloud-media-server-1:/etc/lumenvox ./lumenvox

2. Stop the running instance:

docker compose down

3. Configure volume mappings in docker-compose.yml:

Ensure your docker-compose.yml includes the following volume mappings so the container uses your local configuration:

- ./certs:/certs
- ./lumenvox:/etc/lumenvox
- ./logs:/var/log/lumenvox/

4. Edit the configuration file:

Modify ./lumenvox/media_server.conf with your desired settings.

5. Restart the service:

docker compose up -d

The MRCP-API instance will start with your updated configuration.

Global Settings

ParameterDefaultDescription
mrcp_server_ip127.0.0.1IP address of the machine running the Media Server, used for RTSP/SIP responses. Must be reachable by your MRCP client platform. You must change this from the default.
num_channels200Maximum concurrent channels/sessions. Valid range: 1–5000.
mrcp_server_resmaxautoMaximum concurrent resources. Should exceed your licensed port count.
mrcp_server_port_base20000Lowest port used for MRCP. One port is used per MRCP resource.
rtp_server_port_base25000Lowest port used for RTP/RTCP. One pair of ports is used per RTP resource.
port_allocation_mode0Port allocation strategy. 0 = round-robin, 1 = first-available.
listening_socket_size5Number of sockets allowed to backlog on the listen function. Valid range: 5–1000.
max_num_rtp_packets_buffered0Unprocessed RTP packets held when not in recognition mode. Valid range: 0–1000.
max_rtp_packet_size200Maximum size of received RTP packets in bytes. Valid range: 180–3000.

Threading

Thread pool sizes default to auto, scaling automatically based on num_channels. Valid range for manual setting: 1–256.

ParameterDefaultDescription
num_spawning_threadsautoThreads for RTSP and SIP call creation.
num_graveyard_threadsautoThreads for RTSP and SIP session cleanup.
num_mrcp_event_threadsautoThreads for MRCP event processing.
num_rtp_event_threadsautoThreads for RTP event processing.

SIP Configuration

ParameterDefaultDescription
sip_port5060Port for MRCPv2 sessions via SIP.
sips_port5061Port for MRCPv2 sessions via SIPS (secure SIP).
sips_ssl_cert_fileself-signedSSL certificate file (*.pem) for SIPS connections.
sips_cipher_listAll validAllowed ciphers for SIPS SSL/TLS negotiation.
sip_retransmission_interval0SIP retransmission interval in milliseconds (T1 timer). Valid: 0, or 500–32000.
reuse_sip_tcp_socketfalseWhen true, keeps the SIP socket open even when all sessions are idle.

RTSP Configuration

ParameterDefaultDescription
rtsp_port554Port for incoming RTSP requests (MRCPv1).

Maintenance Mode

ParameterDefaultDescription
out_of_service0When enabled (1), rejects new sessions while existing sessions complete gracefully.
rtsp_out_of_service_code404Response code for out-of-service RTSP clients. Valid: 404 or 503.
sip_out_of_service_code503Response code for out-of-service SIP clients. Valid: 480, 486, 488, or 503.

Vendor Specific Settings

ParameterDefaultDescription
wind_back_time480Milliseconds of audio captured before voice activity detection, sent to ASR. Prevents clipping. Valid range: 0–5000.
barge_in_timeout15000Milliseconds ASR waits for speech before returning a no-input event. Valid range: 0–40000.
end_of_speech_timeout20000Milliseconds between barge-in and end-of-speech before timing out. Valid range: 0–400000.
vad_stream_init_delay100Milliseconds of silence/noise guaranteed before user starts speaking.
vad_bargein_threshold50VAD confidence threshold for triggering barge-in. Valid range: 0–100.
compatibility_mode0Result encoding mode. 0 = standard, 1 = compatibility with other vendors.
secure_context0When enabled (1), suppresses sensitive ASR data from logs.
tts_secure_context1When enabled (1), suppresses sensitive TTS data from logs, replacing content with _SUPPRESSED.

MRCP Settings

ParameterDefaultDescription
save_waveformfalseOverrides the default behavior of the Save-Waveform header.
waveform_url_location(blank)Disk location for saving waveforms.
remove_waveform_files(blank)When enabled, waveform files are deleted at the end of each MRCP session.
waveform_url_prefix(blank)Prefix for returned waveform URLs.
send_sip_trying0When enabled (1), sends optional "100 TRYING" responses to INVITE requests.
use_speech_incomplete0When enabled (1), uses the greater of speech-complete-timeout or speech-incomplete-timeout.

MRCPv1 Settings

ParameterDefaultDescription
recognizer_resource_url/media/speechrecognizerURL path for MRCPv1 speech recognition resource requests.
synthesizer_resource_url/media/synthesizerURL path for MRCPv1 TTS resource requests.
force_increment_rtsp_cseq0When enabled (1), increments RTSP CSeq numbers for server-originated packets.
enable_rtsp_idle_timeout0When enabled (1), drops RTSP connections idle for more than 10 seconds.

MRCPv2 Settings

ParameterDefaultDescription
mrcp_tls_cert_fileself-signedSSL certificate file (*.pem) for MRCPv2/TLS connections.
mrcp_tls_cipher_listAll validAllowed ciphers for MRCPv2 TLS negotiation.
allow_unauthenticated_srtp1When enabled (1), allows SIPS calls specifying UNAUTHENTICATED_SRTP in SDP crypto parameter.
allow_unencrypted_srtp1When enabled (1), allows SIPS calls specifying UNENCRYPTED_SRTP in SDP crypto parameter.

Was this article helpful?