java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic MobicentsMediaRA (9 - 07 Jul 2007 - Main.ivelin)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
NOTE: This page is obsolete. It is superceded by http://groups.google.com/group/mobicents-public/web/mobicents-media-ra

 <<O>>  Difference Topic MobicentsMediaRA (8 - 07 Jul 2007 - Main.ivelin)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
Changed:
<
<
NOTE: The media resource adapter is being actively developed at the moment (July 2006). A prototype is expected withing the next few weeks.
>
>
NOTE: This page is obsolete. It is superceded by http://groups.google.com/group/mobicents-public/web/mobicents-media-ra
 

 <<O>>  Difference Topic MobicentsMediaRA (7 - 16 May 2007 - Main.ivelin)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
NOTE: The media resource adapter is being actively developed at the moment (July 2006). A prototype is expected withing the next few weeks.
Line: 85 to 85
 
Changed:
<
<
>
>
 

 <<O>>  Difference Topic MobicentsMediaRA (6 - 18 Sep 2006 - Main.torosvi)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
NOTE: The media resource adapter is being actively developed at the moment (July 2006). A prototype is expected withing the next few weeks.
Line: 61 to 61
 At the end of the Transmitter-Receiver creation it will be fired a SessionResultEvent? with the result (if everything goes well: result = ok).
Changed:
<
<
public void updateLocalAddress(InetAddress? localHost, String srcPort)
>
>
public void updateLocalAddress(InetAddress? localHost)
 This method is used to change the values used by default:

  • localHost: By default is 127.0.0.1
Deleted:
<
<
  • srcPort: By default is 22224
 public String generateSdpDescription(int version, String userName, String sessionName)

 <<O>>  Difference Topic MobicentsMediaRA (5 - 18 Sep 2006 - Main.torosvi)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
NOTE: The media resource adapter is being actively developed at the moment (July 2006). A prototype is expected withing the next few weeks.
Line: 63 to 63
 public void updateLocalAddress(InetAddress? localHost, String srcPort)
Changed:
<
<
This method is used to change the values used by defect:
>
>
This method is used to change the values used by default:
 
Changed:
<
<
  • localHost: By defect is 127.0.0.1
  • srcPort: By defect is 22224
>
>
  • localHost: By default is 127.0.0.1
  • srcPort: By default is 22224
 public String generateSdpDescription(int version, String userName, String sessionName)

 <<O>>  Difference Topic MobicentsMediaRA (4 - 12 Sep 2006 - Main.torosvi)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
Changed:
<
<
The media resource adapter is being actively developed at the moment (May 2006). A prototype is expected withing the next few weeks.
>
>
NOTE: The media resource adapter is being actively developed at the moment (July 2006). A prototype is expected withing the next few weeks.
 

Media RA Type

Changed:
<
<
Resource adaptor type identifier name: "MGCP"
>
>
The Media RA Type is intended to support several basic media features, including:
 
Changed:
<
<
Activity Object of the MGCP resource: jain.protocol.ip.mgcp.message.parms.CallIdentifier
>
>
  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

Changed:
<
<
  • CREATE_CONNECTION_RESPONSE
  • DELETE_CONNECTION_RESPONSE
  • MODIFY_CONNECTION_RESPONSE
  • NOTIFICATION_REQUEST_RESPONSE
  • NOTIFY
  • RESTART_INPROGRESS_RESPONSE

  • Event type name jain.protocol.ip.mgcp.JainMgcpEvent.CREATE_CONNECTION_RESPONSE and so on
  • Event type vendor and version "jain.protocol.ip.mgcp", "1.0"
  • Events class: jain.protocol.ip.mgcp.JainMgcpEvent

Example

The following code may be used on the SBB to play a Voice XML script

EndpointIdentifier ivr = 
    new EndpointIdentifier("identifier", "ivr.mobicents.org");
CallIdentifier callID = new CallIdentifier("callID.here");

CreateConnection cc = 
    new CreateConnection(this, callID, ivr, ConnectionMode.SendRecv);

NotificationRequestParms parms = 
    new NotificationRequestParms(new RequestIdentifier("1"));
EventName en = 
    new EventName(PackageName.Script,MgcpEvent.tcl.
       withParm("http://host.domain.com/wxml-script.wxml"));

RequestedEvent[] re = 
    new RequestedEvent[] {new RequestedEvent(en)};

parms.setRequestedEvents(re);
cc.setNotificationRequestParms(parms);

provider.sendMgcpEvents(new JainMgcpEvent[]{cc});

Media RA then fires a CREATE_CONNECTION_RESPONSE event

public void onCreateConnectionResponse(JainMgcpEvent event, ActivityContext ac) {
  CreateConnectionResponse res = (CreateConnectionResponse) event;
  ConnectionDescriptor cd = res.getLocalConnectionDescriptor();
}

or when DTMF detected

public void onNotify(JainMgcpEvent event, ActivityContext ac) {
  Notify notify = (Notify) event;
  JainMgcpEvents[] events = notify.getObservedEvents();
}
>
>
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, String srcPort)

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

  • localHost: By defect is 127.0.0.1
  • srcPort: By defect is 22224

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.

 
Deleted:
<
<
 

Related Resources

Added:
>
>
 
Line: 83 to 98
 -- Main.ivelin - 22 Apr 2006
Added:
>
>
-- Main.VictorHugoRos - 12 Sep 2006

 <<O>>  Difference Topic MobicentsMediaRA (3 - 08 Jun 2006 - Main.ivelin)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
The media resource adapter is being actively developed at the moment (May 2006). A prototype is expected withing the next few weeks.
Line: 76 to 76
 
  • JVoiceXML project - Open Source project implementing the VoiceXML? standard written in Java(TM)
  • Sphinx-4 - An Open Source speech recognizer written entirely in the Java(TM) programming language
  • FreeTTS - An Open Source speech synthesizer written entirely in the Java(TM) programming language
Added:
>
>
 


 <<O>>  Difference Topic MobicentsMediaRA (2 - 05 May 2006 - Main.ivelin)
Line: 1 to 1
 
META TOPICPARENT name="MobicentsFAQ"
Added:
>
>
The media resource adapter is being actively developed at the moment (May 2006). A prototype is expected withing the next few weeks.

Media RA Type

Resource adaptor type identifier name: "MGCP"

Activity Object of the MGCP resource: jain.protocol.ip.mgcp.message.parms.CallIdentifier

Events

  • CREATE_CONNECTION_RESPONSE
  • DELETE_CONNECTION_RESPONSE
  • MODIFY_CONNECTION_RESPONSE
  • NOTIFICATION_REQUEST_RESPONSE
  • NOTIFY
  • RESTART_INPROGRESS_RESPONSE

  • Event type name jain.protocol.ip.mgcp.JainMgcpEvent.CREATE_CONNECTION_RESPONSE and so on
  • Event type vendor and version "jain.protocol.ip.mgcp", "1.0"
  • Events class: jain.protocol.ip.mgcp.JainMgcpEvent

Example

The following code may be used on the SBB to play a Voice XML script

EndpointIdentifier ivr = 
    new EndpointIdentifier("identifier", "ivr.mobicents.org");
CallIdentifier callID = new CallIdentifier("callID.here");

CreateConnection cc = 
    new CreateConnection(this, callID, ivr, ConnectionMode.SendRecv);

NotificationRequestParms parms = 
    new NotificationRequestParms(new RequestIdentifier("1"));
EventName en = 
    new EventName(PackageName.Script,MgcpEvent.tcl.
       withParm("http://host.domain.com/wxml-script.wxml"));

RequestedEvent[] re = 
    new RequestedEvent[] {new RequestedEvent(en)};

parms.setRequestedEvents(re);
cc.setNotificationRequestParms(parms);

provider.sendMgcpEvents(new JainMgcpEvent[]{cc});

Media RA then fires a CREATE_CONNECTION_RESPONSE event

public void onCreateConnectionResponse(JainMgcpEvent event, ActivityContext ac) {
  CreateConnectionResponse res = (CreateConnectionResponse) event;
  ConnectionDescriptor cd = res.getLocalConnectionDescriptor();
}

or when DTMF detected

public void onNotify(JainMgcpEvent event, ActivityContext ac) {
  Notify notify = (Notify) event;
  JainMgcpEvents[] events = notify.getObservedEvents();
}

Related Resources

 
Deleted:
<
<
Work in progress...
 -- Main.ivelin - 22 Apr 2006

 <<O>>  Difference Topic MobicentsMediaRA (1 - 22 Apr 2006 - Main.ivelin)
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="MobicentsFAQ"

Work in progress...

-- Main.ivelin - 22 Apr 2006


Topic MobicentsMediaRA . { View | Diffs r9 < r8 < r7 < r6 | More }
 XML java.net RSS