The Source for Java Technology Collaboration


NOTE: This page is obsolete. It is superceded by http://groups.google.com/group/mobicents-public/web/mobicents-media-ra

Media RA Type

The Media RA Type is intended to support several basic media features, including:

  1. Open an inbound RTP stream listener on address and port and direct the media data to a given input stream (or URL).
  2. Fire DTMF events from an inboud media stream
  3. Open outbound RTP media stream on address and port.
  4. Output to an open outbound RTP media stream given a java input stream (or URL). Add requests for output on a priority queue. Serve output
    streams sequentially based on priority or mix them up when they belong in the same logical group and have the same priority.
  5. Text to Speech. Take text as a string and convert to media input stream if translation module is available for a given language.
  6. Speech to text. Attach/Detach to/from an inboud stream and fire text events as the speech is received.
  7. Run VoiceXML script, given VXML script URL, inbound and outbound RTP streams.

Resource adaptor type identifier

The resource adaptor type name is "media_ratype". The resource adaptor type vendor is "org.mobicents.media". The resource adaptor type version is "1.0".

Activity objects

The activity object for Media resource is org.mobicents.slee.resource.media.ra.MediaSession object.

Events

The following lists the events emitted by a Media resource.

Event types

org.mobicents.slee.media.EndMediaStream: This event is fired when the end of the media stream is reached.

org.mobicents.slee.media.DTMF: This event is fired when DTMF is received.

org.mobicents.slee.media.SessionResult: This event is fired to know whether the creation of a Transmitter, Receiver or Transmitter-Receiver was a success or not (async stream creation).

The event type vendor is "org.mobicents.media". The event type version is "1.0"

Event classes

The event class for these events is org.mobicents.slee.resource.media.events.MediaEvent

Resource adaptor object

Resource adaptor object is org.mobicents.slee.resource.media.ratype.MediaProvider: MediaProvider describes the interface between SBBs and Media RA. This interface gives us the chance of creating a new Session using the getNewMediaSession() method which creates and returns a new Media Session with its unique Session ID.

MediaSession?

A session is considered an exchange of data between an association of participants. Let's see some of the features implemented:

public void createTransmitterReceiver(String sdp, URL fileTx, URL fileRcv, boolean dtmf)

This method is used to transmit and receive audio stream:

  • sdp: To establish a session is necessary to know the remote address and audio port. This information is obtained from the SDP
    description sent by a UA.
  • filesTx: Route of the audio file you want to transmit.
  • fileRcv: Route where the received audio will be stored. If it is null, it will be considered that the media received does not want to be stored.
  • dtmf: True if you want process DTMF digits, otherwise False.

At the end of the Transmitter-Receiver creation it will be fired a SessionResultEvent? with the result (if everything goes well: result = ok).

public void updateLocalAddress(InetAddress? localHost)

This method is used to change the values used by default:

  • localHost: By default is 127.0.0.1

public String generateSdpDescription(int version, String userName, String sessionName)

This method is to obtain the SDP description of the session created. This information should be sent to the UA which initiates the creation of the session sending its SDP description.

public void startSession()

To start a session created.

public void stopSession()

To stop a session created.

Related Resources

-- Main.ivelin - 22 Apr 2006

-- Main.VictorHugoRos - 12 Sep 2006

Topic MobicentsMediaRA . { Edit | Ref-By | Printable | Diffs r9 < r8 < r7 < r6 < r5 | More }
 XML java.net RSS

Revision r9 - 07 Jul 2007 - 21:59:18 - Main.ivelin
Parents: WebHome > MobicentsOpenSLEE > MobicentsFAQ