MRCP
Server Configuration Manual
Developer Guide
Last updated: March 19, 2017
Created by: Arsen Chaloyan
Table of Contents
3.1 Using the Default Configuration
3.2 Specifying the IP addresses
3.3 Specifying the port numbers
4.3 The MRCPv2 Setup behind NAT
4.4 The MRCPv1 Setup behind NAT
This guide describes configuration format of the UniMRCP server. Major configuration steps and configuration examples for typical setups are also provided in this guide.
The document is intended for developers and system administrators. A basic knowledge of the Extended Markup Language (XML) is required.
Unless explicitly stated, instructions provided in this guide are applicable to the following versions.
UniMRCP 1.0.0 and above |
The UniMRCP server uses an XML based configuration format described by the XML Schema.
The root element of the XML document must be <unimrcpserver>.
Name |
Description |
xmlns:xsi |
Defines the XML namespace. |
xsi:noNamespaceSchemaLocation |
References the XML Schema document. |
version |
Specifies the version number of the UniMRCP server document. |
None.
Name |
Description |
<properties> |
Specifies the common properties encompassing the whole document. |
<components> |
Specifies the core entities of the server stack. |
<settings> |
Specifies the supplementary settings of the server stack. |
<profiles> |
Specifies the profiles. |
<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0"> </unimrcpserver> |
This element is a container of properties. The properties are common parameter encompassing the whole document.
None.
<unimrcpserver>
Name |
Description |
<ip> |
Specifies the local IP address. |
<ext-ip> |
Specifies the external (NAT) IP address. |
Specifies the local IP address.
Name |
Description |
type |
Defines the type of the IP address to one of auto or iface. |
<properties>
None.
The IP address can be explicitly specified in the numeric format. For example:
<ip>10.10.0.1</ip> |
If the type attribute is set to auto, then the IP address is implicitly determined by the hostname.
<ip type=”auto”/> |
Alternatively, if the type attribute is set to iface, the IP address is determined by the specified name of the network interface. For example:
<ip type=”iface”>eth0</ip> |
Specifies the external IP address to be used in case the server is allocated behind NAT. The details and usage are the same as for the <ip> element.
This element is a container of components. The components are core entities of the UniMRCP server stack such as the resource factory, the user agent, the media engine, etc.
None.
<unimrcpserver>
Name |
Description |
<resource-factory> |
Specifies the factory of the MRCP resources. |
<sip-uas> |
Specifies the SIP user agent server (MRCPv2 only). |
<rtsp-uas> |
Specifies the RTSP user agent server (MRCPv1 only). |
<mrcpv2-uas> |
Specifies the MRCPv2 transport agent (MRCPv2 only). |
<media-engine> |
Specifies the media processing engine. |
<rtp-factory> |
Specifies the factory of RTP media terminations. |
<plugin-factory> |
Specifies the factory of MRCP resource engines/plugins. |
Specifies the factory of MRCP resources used by the server stack.
None.
<components>
Name |
Description |
<resource > |
Specifies the MRCP resource to load. |
The example below defines a resource factory which has the speech synthesizer and recognizer resources enabled and the recorder and verification resources disabled.
<resource-factory> <resource id="speechsynth" enable="true"/> <resource id="speechrecog" enable="true"/> <resource id="recorder" enable="false"/> <resource id="speakverify" enable="false"/> </resource-factory> |
Specifies the SIP user agent server which is used for MRCPv2 only.
Name |
Description |
id |
Defines a unique name of the agent to be referenced in the profiles. |
type |
Defines the SIP uas type. |
<components>
Name |
Description |
<sip-ip> |
Specifies the local IP address to bind the SIP user agent to. If not specified, the <ip> property is used. |
<sip-ext-ip> |
Specifies the external (NAT) IP address to be used for the SIP user agent. If not specified, the <ext-ip> property is used. |
<sip-port> |
Specifies the local port to bind the SIP user agent to. |
<sip-transport> |
Specifies the SIP transport either UDP or TCP. |
<sip-t1x64> |
Specifies the timeout for incoming SIP ACK messages. |
<ua-name> |
Specifies the user agent name included in the SIP messages. |
<sdp-origin> |
Specifies the SDP origin field. |
The example below defines a SIP user agent bound to 10.10.0.1:8060 which uses UDP and TCP for SIP message transport.
<sip-uas id="SIP-Agent-1" type="SofiaSIP"> <sip-ip>10.10.0.1</sip-ip> <sip-port>8060</sip-port> <sip-transport>udp,tcp</sip-transport> <ua-name>UniMRCP SofiaSIP</ua-name> <sdp-origin>UniMRCPServer</sdp-origin> </sip-uas> |
Specifies the RTSP user agent server which is used for MRCPv1 only.
Name |
Description |
id |
Defines a unique name of the agent to be referenced in the profiles. |
type |
Defines the RTSP uas type. |
<components>
Name |
Description |
<rtsp-ip> |
Specifies the local IP address to bind the RTSP user agent to. If not specified, the <ip> property is used. |
<rtsp-ext-ip> |
Specifies the external (NAT) IP address to be used for the RTSP user agent. If not specified, the <ext-ip> property is used. |
<rtsp-port> |
Specifies the local port to bind the RTSP user agent to. |
<resource-map> |
Specifies the names of MRCP resources used in RTSP messages. |
<max-connection-count> |
Specifies the maximum number of TCP/RTSP connections per agent. |
<sdp-origin> |
Specifies the SDP origin field. |
The example below defines an RTSP user agent bound to 10.10.0.1:1554.
<rtsp-uas id="RTSP-Agent-1" type="UniRTSP"> <rtsp-ip>10.10.0.1</rtsp-ip> <rtsp-port>8060</rtsp-port> <max-connection-count>300</max-connection-count> <sdp-origin>UniMRCPServer</sdp-origin> </rtsp-uas> |
Specifies the MRCPv2 transport agent.
Name |
Description |
id |
Defines a unique name of the agent to be referenced in the profiles. |
<components>
Name |
Description |
<mrcp-ip> |
Specifies the local IP address to bind the MRCPv2 transport agent to. If not specified, the <ip> property is used. |
<mrcp-port> |
Specifies the local port to bind the MRCPv2 transport agent to. |
<max-connection-count> |
Specifies the maximum number of TCP/MRCPv2 connections per agent. |
<force-new-connection> |
Specifies whether to force the client to establish a new connection or to proceed with the client preference. |
The example below defines an MRCPv2 transport agent bound to 10.10.0.1:1544 which has the max connection count set to 300.
<mrcpv2-uas id="MRCPv2-Agent-1"> <mrcp-ip>10.10.0.1</mrcp-ip> <mrcp-port>1544</mrcp-port> <max-connection-count>300</max-connection-count> <force-new-connection>false</force-new-connection> </mrcpv2-uas> |
Specifies the media processing engine.
Name |
Description |
id |
Defines a unique name of the media engine to be referenced in the profiles. |
<components>
Name |
Description |
<realtime-rate> |
Specifies the real-time rate of the engine, which must be set to 1 for the most of the cases. |
The example below defines a media engine with the real-time rate set to 1.
<media-engine id="Media-Engine-1"> <realtime-rate>1</realtime-rate> </media-engine> |
Specifies the factory of RTP media terminations.
Name |
Description |
id |
Defines a unique name of the RTP factory to be referenced in the profiles. |
<components>
Name |
Description |
<rtp-ip> |
Specifies the local IP address to be used for RTP streaming. If not specified, the <ip> property is used. |
<rtp-ext-ip> |
Specifies the external (NAT) IP address to be used for RTP streaming. If not specified, the <ext-ip> property is used. |
The example below defines a factory of RTP media terminations with the port range set to [4000-5000) and the IP address set to 10.10.0.1.
<rtp-factory id="RTP-Factory-1"> <rtp-ip>10.10.0.1</rtp-ip> <rtp-port-min>4000</rtp-port-min> <rtp-port-max>5000</rtp-port-max> </rtp-factory> |
Specifies the factory of MRCP resource engines (plugins).
Name |
Description |
id |
Defines a unique name of the plugin factory to be referenced in the profiles. |
<components>
Name |
Description |
<engine> |
Specifies the resource engine which is a run-time loadable library. |
The example below defines a factory of resource engines which has the demo synthesizer and recognition plugins enabled and the demo verification and recorder plugins disabled.
<plugin-factory> <engine id="Demo-Synth-1" name="demosynth" enable="true"/> <engine id="Demo-Recog-1" name="demorecog" enable="true"/> <engine id="Demo-Verifier-1" name="demoverifier" enable="false"/> <engine id="Recorder-1" name="mrcprecorder" enable="false"/> </plugin-factory> |
This element is a container of the RTP settings. The settings are used in conjunction with the corresponding components. Associations between the settings and the components are defined in the profiles. For example, the same RTP settings can be used in two different profiles: one for MRCPv1 and the other for MRCPv2.
None.
<unimrcpserver>
Name |
Description |
<rtp-settings> |
Specifies the RTP settings. |
Specifies the settings used for RTP/RTCP streaming.
Name |
Description |
id |
Defines a unique name of the RTP settings to be referenced in the profiles. |
<settings>
Name |
Description |
<jitter-buffer> |
Specifies the jitter buffer settings. |
<ptime> |
Specifies the packetization time. |
<codecs> |
Specifies the supported codecs. |
<rtcp> |
Specifies the RTCP settings. |
The example below defines typical RTP settings.
<rtp-settings id="RTP-Settings-1"> <jitter-buffer> <adaptive>1</adaptive> <playout-delay>50</playout-delay> <max-playout-delay>600</max-playout-delay> <time-skew-detection>1</time-skew-detection> </jitter-buffer> <ptime>20</ptime> <codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs> <rtcp enable="false"/> </rtp-settings> |
This element is a container of the MRCPv2 and MRCPv1 profiles. The profiles define associations between certain components and settings. The profile must be assigned a unique identifier to be referenced by the server stack. There can be multiple MRCPv1 and MRCPv2 profiles defined.
None.
<unimrcpserver>
Name |
Description |
<mrcpv2-profile> |
Specifies the MRCPv2 profile. |
<mrcpv1-profile> |
Specifies the MRCPv1 profile. |
Specifies the MRCPv2 profile as a collection of SIP user and MRCPv2 transport agents, media engines, RTP and resource engine factories, RTP settings.
Name |
Description |
id |
Defines a unique name of the profile to be referenced by the server stack. |
<profiles>
Name |
Description |
<sip-uas> |
References one or more SIP user agents. |
<mrcpv2-uas> |
References one or more MRCPv2 transport agents. |
<media-engine> |
References one or more media engines. |
<rtp-factory> |
References an RTP factory. |
<rtp-settings> |
References RTP settings. |
<resource-engine-map> |
Defines a map of resource engines for the profile. |
The example below defines a typical MRCPv2 profile.
<mrcpv2-profile id="uni2"> <sip-uas>SIP-Agent-1</sip-uas> <mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas> <media-engine>Media-Engine-1</media-engine> <rtp-factory>RTP-Factory-1</rtp-factory> <rtp-settings>RTP-Settings-1</rtp-settings> </mrcpv2-profile> |
Specifies the MRCPv1 profile as a collection of RTSP user agents, media engines, RTP and resource engine factories, RTP settings.
Name |
Description |
id |
Defines a unique name of the profile to be referenced by the server stack. |
<profiles>
Name |
Description |
<rtsp-uas> |
References one or more RTSP user agents. |
<media-engine> |
References one or more media engines. |
<rtp-factory> |
References an RTP factory. |
<rtp-settings> |
References RTP settings. |
<resource-engine-map> |
Defines a map of resource engines for the profile. |
The example below defines a typical MRCPv1 profile.
<mrcpv1-profile id="uni1"> <rtsp-uas>RTSP-Agent-1</rtsp-uas> <media-engine>Media-Engine-1</media-engine> <rtp-factory>RTP-Factory-1</rtp-factory> <rtp-settings>RTP-Settings-1</rtp-settings> </mrcpv1-profile> |
This section outlines major configuration steps.
The default configuration files are located in the conf directory of the source tree and are being copied to the output directory upon installation. The default server configuration is stored in the unimrcpserver.xml document.
Specify the IP address of the server in the common <properties> element. Note that by default the IP address of the server is implicitly identified by its hostname.
Set the server IP address. For example:
<ip>10.10.0.1</ip> |
Specify the port numbers of the SIP, MRCPv2 and RTSP user agents and the RTP port range for the server. Note that the default settings should be sufficient for the use against the UniMRCP client.
Set the port number of SIP user agent server in the corresponding <sip-uas> element. For example:
<sip-port>8060</sip-port> |
Set the port number of MRCPv2 transport agent in the corresponding <mrcpv2-uas> element. For example:
<mrcp-port>1544</mrcp-port> |
Set the port number of RTSP user agent server in the corresponding <rtsp-uas> element. For example:
<rtsp-port>1554</rtsp-port> |
Set the RTP port range for the server in the corresponding <rtp-factory> element. For example:
<rtp-port-min>5000</rtp-port-min> <rtp-port-max>6000</rtp-port-max> |
Specify the supported codecs for the server. In the default configuration, only the codecs with 8 kHz sampling rate are enabled. The list of supported codecs can be expanded to include also the codecs with 16 kHz sampling rate or, vice versa, be restricted to offer a particular codec.
Set the list of supported codecs in the corresponding <rtp-settings> element. For example:
<codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs> |
This section provides configuration examples for typical server setups.
The UniMRCP server is configured for MRCPv2 clients located on the same network.
· server IP address: 192.168.1.10 · server SIP port: 8060 · server MRCPv2 port: 1544 · server RTP port range: [5000, 6000) · server codecs: PCMU, PCMA, L16, telephone-event |
The UniMRCP server is configured for MRCPv1 clients located on the same network.
· server IP address: 192.168.1.10 · server RTSP port: 1554 · server RTP port range: [5000, 6000) · server codecs: PCMU, PCMA, L16, telephone-event |
The UniMRCP server is located behind NAT and configured for external MRCPv2 clients.
· server IP address: 192.168.1.10 · router internal IP address: 192.168.1.1 · router external IP address: 10.10.1.1 · server SIP port: 8060 · server MRCPv2 port: 1544 · server RTP port range: [5000, 6000) · server codecs: PCMU, PCMA, L16, telephone-event |
None.
The UniMRCP server is located behind NAT and configured for external MRCPv1 clients.
· server IP address: 192.168.1.10 · router internal IP address: 192.168.1.1 · router external IP address: 10.10.1.1 · server RTSP port: 1554 · server RTP port range: [5000, 6000) · server codecs: PCMU, PCMA, L16, telephone-event |
None.