Powered by Universal Speech Solutions LLC

 MRCP

Server Configuration Manual

Developer Guide

 

Revision: 21

Last updated: March 19, 2017

Created by: Arsen Chaloyan


 

Table of Contents

1  Overview.. 4

1.1         Applicable Versions. 4

2  Configuration Format 5

2.1         Document 5

2.2         Properties. 6

<ip>. 6

<ext-ip>. 7

2.3         Components. 7

<resource-factory>. 7

<sip-uas>. 8

<rtsp-uas>. 9

<mrcpv2-uas>. 10

<media-engine>. 11

<rtp-factory>. 11

<plugin-factory>. 12

2.4         Settings. 13

<rtp-setting>. 13

2.5         Profiles. 14

<mrcpv2-profile>. 15

<mrcpv1-profile>. 16

3  Configuration Steps. 17

3.1         Using the Default Configuration. 17

3.2         Specifying the IP addresses. 17

3.3         Specifying the port numbers. 17

3.4         Specifying the codecs. 18

4  Configuration Examples. 19

4.1         The MRCPv2 Setup. 19

Description. 19

Topology. 19

Parameters. 19

Sample Configuration. 19

Sample Network Captures. 19

4.2         The MRCPv1 Setup. 20

Description. 20

Topology. 20

Parameters. 20

Sample Configuration. 20

Sample Network Captures. 20

4.3         The MRCPv2 Setup behind NAT. 21

Description. 21

Topology. 21

Parameters. 21

Sample Configuration. 21

Sample Network Captures. 21

4.4         The MRCPv1 Setup behind NAT. 21

Description. 21

Topology. 22

Parameters. 22

Sample Configuration. 22

Sample Network Captures. 22

 

 

1       Overview

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.

1.1      Applicable Versions

Unless explicitly stated, instructions provided in this guide are applicable to the following versions.

 

UniMRCP 1.0.0 and above

 

 

2       Configuration Format

The UniMRCP server uses an XML based configuration format described by the XML Schema.

2.1      Document

The root element of the XML document must be <unimrcpserver>.

Attributes

 

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.

 

Parent

None.

Children

 

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.

 

Example

 

<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xsi:noNamespaceSchemaLocation="unimrcpserver.xsd"

               version="1.0">

</unimrcpserver>

 

2.2      Properties

This element is a container of properties. The properties are common parameter encompassing the whole document.

Attributes

            None.

Parent

<unimrcpserver>

Children

 

Name

Description

<ip>

Specifies the local IP address.

<ext-ip>

Specifies the external (NAT) IP address.

 

<ip>

Specifies the local IP address.

Attributes

 

Name

Description

type

Defines the type of the IP address to one of auto or iface.

 

Parent

<properties>

Children

None.

Example

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>

 

<ext-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.

2.3      Components

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.

Attributes

            None.

Parent

<unimrcpserver>

Children

 

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.

<resource-factory>

Specifies the factory of MRCP resources used by the server stack.

Attributes

None.

Parent

<components>

Children

 

Name

Description

<resource >

Specifies the MRCP resource to load.

Example

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>

 

<sip-uas>

Specifies the SIP user agent server which is used for MRCPv2 only.

Attributes

 

Name

Description

id

Defines a unique name of the agent to be referenced in the profiles.

type

Defines the SIP uas type.

 

Parent

<components>

Children

 

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.

Example

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>

<rtsp-uas>

Specifies the RTSP user agent server which is used for MRCPv1 only.

Attributes

 

Name

Description

id

Defines a unique name of the agent to be referenced in the profiles.

type

Defines the RTSP uas type.

 

Parent

<components>

Children

 

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.

Example

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>

 

<mrcpv2-uas>

Specifies the MRCPv2 transport agent.

Attributes

 

Name

Description

id

Defines a unique name of the agent to be referenced in the profiles.

 

Parent

<components>

Children

 

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.

Example

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>

 

<media-engine>

Specifies the media processing engine.

Attributes

 

Name

Description

id

Defines a unique name of the media engine to be referenced in the profiles.

 

Parent

<components>

Children

 

Name

Description

<realtime-rate>

Specifies the real-time rate of the engine, which must be set to 1 for the most of the cases.

Example

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>

 

<rtp-factory>

Specifies the factory of RTP media terminations.

Attributes

 

Name

Description

id

Defines a unique name of the RTP factory to be referenced in the profiles.

 

Parent

<components>

Children

 

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.

Example

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>

 

<plugin-factory>

Specifies the factory of MRCP resource engines (plugins).

Attributes

 

Name

Description

id

Defines a unique name of the plugin factory to be referenced in the profiles.

 

Parent

<components>

Children

 

Name

Description

<engine>

Specifies the resource engine which is a run-time loadable library.

Example

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>

 

2.4      Settings

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.

Attributes

            None.

Parent

<unimrcpserver>

Children

 

Name

Description

<rtp-settings>

Specifies the RTP settings.

 

<rtp-setting>

Specifies the settings used for RTP/RTCP streaming.

Attributes

 

Name

Description

id

Defines a unique name of the RTP settings to be referenced in the profiles.

 

Parent

<settings>

Children

 

Name

Description

<jitter-buffer>

Specifies the jitter buffer settings.

<ptime>

Specifies the packetization time.

<codecs>

Specifies the supported codecs.

<rtcp>

Specifies the RTCP settings.

Example

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>

 

2.5      Profiles

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.

Attributes

            None.

Parent

<unimrcpserver>

Children

 

Name

Description

<mrcpv2-profile>

Specifies the MRCPv2 profile.

<mrcpv1-profile>

Specifies the MRCPv1 profile.

<mrcpv2-profile>

Specifies the MRCPv2 profile as a collection of SIP user and MRCPv2 transport agents, media engines, RTP and resource engine factories, RTP settings.

Attributes

 

Name

Description

id

Defines a unique name of the profile to be referenced by the server stack.

 

Parent

<profiles>

Children

 

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.

Example

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>

<mrcpv1-profile>

Specifies the MRCPv1 profile as a collection of RTSP user agents, media engines, RTP and resource engine factories, RTP settings.

Attributes

 

Name

Description

id

Defines a unique name of the profile to be referenced by the server stack.

 

Parent

<profiles>

Children

 

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.

Example

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>

 

3       Configuration Steps

This section outlines major configuration steps.

3.1      Using the Default Configuration

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.

3.2      Specifying the IP addresses

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>

 

3.3      Specifying the port numbers

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>

 

3.4      Specifying the codecs

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>

 

4       Configuration Examples

This section provides configuration examples for typical server setups.

4.1      The MRCPv2 Setup

Description

The UniMRCP server is configured for MRCPv2 clients located on the same network.

Topology

MRCPv2.png

Parameters

·         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

Sample Configuration

unimrcpserver.xml

Sample Network Captures

§  Speech Synthesis Resource

§  Speech Recognition Resource

 

4.2      The MRCPv1 Setup

Description

The UniMRCP server is configured for MRCPv1 clients located on the same network.

Topology

MRCPv2.png

Parameters

·         server IP address: 192.168.1.10

·         server RTSP port: 1554

·         server RTP port range: [5000, 6000)

·         server codecs: PCMU, PCMA, L16, telephone-event

Sample Configuration

unimrcpserver.xml

Sample Network Captures

§  Speech Synthesis Resource

§  Speech Recognition Resource

 

4.3      The MRCPv2 Setup behind NAT

Description

The UniMRCP server is located behind NAT and configured for external MRCPv2 clients.

Topology

MRCPv2.png

Parameters

·         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

Sample Configuration

unimrcpserver.xml

Sample Network Captures

None.

4.4      The MRCPv1 Setup behind NAT

Description

The UniMRCP server is located behind NAT and configured for external MRCPv1 clients.

Topology

MRCPv2.png

Parameters

·         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

Sample Configuration

unimrcpserver.xml

Sample Network Captures

None.