JBoss.orgCommunity Documentation

Chapter 5. Configuring the JBoss Communications Media Server

5.1. MainDeployer
5.2. Server instance
5.3. Media types definition
5.4. Media format definition
5.4.1. Audio format definition
5.5. Codec definition
5.6. RTP Audio Video profile
5.7. RTP Manager
5.8. Dual-tone multi-frequency (DTMF) tones
5.8.1. DTMF Detector
5.8.2. DTMF Generator
5.9. Text-to-Speech engine
5.9.1. MBrola configuration
5.9.2. FreeTTS configuration
5.9.3. Voice pool configuration
5.10. Connection state manager
5.11. MGCP controller configuration

The JBoss Communications Media Server is developed on top of existing Java technologies. The Java platform is ideal for network computing. It offers single, unified-and-unifying programming model that can connect all elements of a business infrastructure. The modularization effort is supported by use of the JBoss Microcontainer which allows to deploy services written as Plain Java Objects into a Standard Java SE runtime environment in controlled manner and achieve great level of customization.

The configurable aspects of MainDeployer are:

The modularization effort allows to construct and start more then one instance of the media server in the single JBoss microcontainer. The single server instance is defined by the following description


The configurable aspects of the server instance are:

rtpManager

Specifies the relationship between the Real Time Transmission Protocol Manager and Server instance

Thus it is possible to run Media several media server instances with different RTP configuration. Such configuration is used when Media server acts as gateway at the boundaries of the different networks.

Each media type to be processed must be declared. The following listing shows declaration of Audio and Video media types



    <bean name="MediaType.audio" class="org.mobicents.media.server.spi.MediaType">
        <constructor factoryClass="org.mobicents.media.server.spi.MediaType" factoryMethod="getInstance">
            <parameter>audio</parameter>
        </constructor>
    </bean>

    <bean name="MediaType.Video" class="org.mobicents.media.server.spi.MediaType">
        <constructor factoryClass="org.mobicents.media.server.spi.MediaType" factoryMethod="getInstance">
            <parameter>video</parameter>
        </constructor>
    </bean> 

The configurable aspects of the Media type object are:

Format specifies a particular arrangement of data in a media stream. By examing the information stored in the format, components can discover how to interpret the bits in the binary sound data. Format accommodates a number of common encoding techniques, including pulse-code modulation (PCM), mu-law encoding or a-law encoding. These encoding techniques are predefined, but user can create new encoding types.

In addition to the encoding, the format includes other properties that further specify the exact arrangement of the data which are specific for each media type.

A codec is a component capable of encoding and/or decoding a digital data stream or signal


Codecs can be grouped into processors like depicted at the following example


Real-time audio and video conferencing and communication applications that use the Real-time Transport Protocol (RTP) employ a standardized description format (Session Description Protocol, SDP) to describe the media streams carried in a multi-media session. This description format specifies the technical parameters of the media streams. Such a set of RTP parameters of the media stream and its compression or encoding methods is known as a media profile, or RTP audio video profile (RTP/AVP). Each profile is identified by a standardized payload type identifier (RFC 3551 and others)


Payload identifiers 96–127 are reserved for payloads defined dynamically during a session. The minimum payload support is defined as 0 (PCMU) and 5 (DVI4). The document recommends dynamically assigned port numbers, although 5004 and 5005 have been registered for use of the profile and can be used instead. The standard also describes the process of registering new payload types with IANA.

Dynamic payloads can be configured using Format description and A/V Profile description

This is the starting point for creating, maintaining and closing an RTP session. RTP Manager supports unicast session only.

The configurable aspects of the RTPFactory are:


Dual-tone multi-frequency (DTMF) signaling is used for telephone signaling over the line in the voice-frequency band to the call switching center. The version of DTMF used for telephone tone dialing is known by the trademarked term Touch-Tone, and is standardised by ITU-T Recommendation Q.23. Other multi-frequency systems are used for signaling internal to the telephone network

Changing text to speech is a capability to stream speach generated from text. JBoss Communications Media Server supports two TTS engines:

By default Server provides following set of voices:


JBoss Communications Media Server has pool of voices. At startup it creates desired number of voice generating objects. This reduces runtime overhead and delays in response from Server. Size of pool, for each voice can be configured via media player configuration property: voices.

Voices property is of Map type. Table below describes values stored in this propert:


Example configuration looks as follows:



        
<bean name="media.audio"
    class="org.mobicents.media.server.impl.resource.mediaplayer.audio.AudioPlayerFactory">
    <property name="name">media.player</property>
    <property name="audioMediaDirectory">${mms.media.dir}</property>

    <property name="voices">
        <map class="java.util.Hashtable" keyClass="java.lang.String"
            valueClass="java.lang.Integer">

            <entry>
                <key>alan</key>
                <value>1</value>
            </entry>
            <entry>
                <key>kevin16</key>
                <value>1</value>
            </entry>
            <entry>
                <key>kevin</key>
                <value>1</value>
            </entry>
            <entry>
                <key>mbrola_us3</key>
                <value>1</value>
            </entry>
            <entry>
                <key>mbrola_us2</key>
                <value>1</value>
            </entry>
            <entry>
                <key>mbrola_us1</key>
                <value>1</value>
            </entry>

        </map>
    </property>

</bean>
        
        

The Connection can be in one of the following four operational states.

There is no direct control over the states of Connection but only through Controller module

The ConnectionStateManager maps various state's of Connection with life-time (in milli seconds) of Connection in that state

ConnectionStateManager is defined by the following component:



<bean name="ConnectionStateManager" class="org.mobicents.media.server.ConnectionStateManager">
    <constructor>
        <parameter>
            <map class="java.util.Hashtable" keyClass="org.mobicents.media.server.spi.ConnectionState" valueClass="java.lang.Integer">
                <entry>
                    <key><inject bean="ConnectionState.NULL"></inject></key>    
                    <value>0</value>                    
                </entry>
                <entry>
                    <key><inject bean="ConnectionState.IDLE"></inject></key>    
                    <value>30000</value>                    
                </entry>
                <entry>
                    <key><inject bean="ConnectionState.HALF_OPEN"></inject></key>   
                    <value>3600000</value>                  
                </entry>
                <entry>
                    <key><inject bean="ConnectionState.OPEN"></inject></key>    
                    <value>3600000</value>                  
                </entry>
                <entry>
                    <key><inject bean="ConnectionState.CLOSED"></inject></key>  
                    <value>0</value>                    
                </entry>                
            </map>              
        </parameter>            
    </constructor>
</bean>

Irrespective if Connection is running or not, the Connection will be deleted after timeout (time starting from transition to this state) value specified for that state

MGCP Controller is implemented by the following component



<bean name="MgcpController"
        class="org.mobicents.media.server.ctrl.mgcp.MgcpController">
        <property name="server">
            <inject bean="MediaServer" />
        </property>
        <property name="defaultNotifiedEntity">client@localhost:2727</property>
        <property name="bindAddress">${mms.bind.address}</property>
        <property name="port">2427</property>
        <incallback method="addPackage" />
        <uncallback method="removePackage" />
    </bean>

Configurable aspects of the MGCP controller are