Showing posts with label media server. Show all posts
Showing posts with label media server. Show all posts

Thursday, July 23, 2009

Mobicents JSR-309 Impl 2.0.0.BETA2 Released!

We are happy to release 2.0.0.CR2 version of Mobicents JSR309 Implementation. There are quite a few changes in JSR309 API and hence the implementation too has changed.

Specifically the Events structure have changed. Now the MediaEvent has method isSuccessful() which returns true if the event is for success, false otherwise. Hence every listener will have to have this preliminary check done and act accordingly.


Every NetworkConnection now has a SdpPortManager. The SdpPortManager is compatible with the offer/answer model. Please look at API to understand SdpPortManager. Its an important change


New features that have been added is there is an implementation for MediaConfig now. MediaConfig defines the internal structure of ResourceContainer (NetworkConnection, MediaGroup, MediaMixer etc). For predefined configurations like NetworkConnection.BASIC, MediaGroup.PLAYER, MediaGroup.PLAYER_RECORDER_SIGNALDETECTOR the implementation already has corresponding predefined MediaConfigs. The access to this predefined MediaConfigs can be achieved by calling MsControlFactory.getMediaConfig(Configuration configuration) passing one of the predefined Configuration as parameter.

The MediaConfig implementation shows the mapping between the JSR309 events/signals and corresponding MGCP events. Also it shows the endpoint name on Mobicents Media Server (MMS) that this ResourceContainer is firing signals/events on. Hence if you change the endpoint name on MMS, get the handle to existing MediaConfig impl and create a custom clone by passing new set of Parameters for example


MediaConfig playerConfig = msControlFactory.getMediaConfig(MediaGroup.PLAYER_RECORDER_SIGNALDETECTOR);
Parameters pNew = msControlFactory.createParameters();
pNew.put(ExtendedParameter.ENDPOINT_LOCAL_NAME, "/thisis/new/endpointname/1");

MediaConfigImpl clone = (MediaConfigImpl) playerConfig.createCustomizedClone(pNew);

mediaSession.createMediaGroup(clone, someParams);

In this case someParams could be null as mobicents JSR309 impl still doesn't take them into consideration.

Other way of doing this get the handle to existing MediaConfig impl and get the XML string by calling marshall()

String xml = playerConfig.marshall();

The xml will look like

<?xml version="1.0" encoding="UTF-8"?>
< resource-container>
  < parameter>
    < key> ENDPOINT_LOCAL_NAME < &frasl key >
    < value > &frasl mobicents &frasl media &frasl IVR &frasl$ < &frasl value >
  < &frasl parameter >
  < player >
    < signal >
      < mgcp-event > ann < &frasl mgcp-event >
      < mgcp-package > A < &frasl mgcp-package >
      < on-endpoint > true < &frasl on-endpoint >
    < &frasl signal >
    < event >
      < mgcp-event > oc < &frasl mgcp-event >
      < mgcp-package > A < &frasl mgcp-package >
      < on-endpoint > true < &frasl on-endpoint >
      < media-event > PLAY_COMPLETED< &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > of < &frasl mgcp-event >
      < mgcp-package > A<&frasl mgcp-package >
      < on-endpoint > true < &frasl on-endpoint >
      < media-event > PLAY_COMPLETED< &frasl media-event >
    < &frasl event >
  < &frasl player >
  < recorder >
    < signal >
      < mgcp-event > aupr < &frasl mgcp-event >
      < mgcp-package > AU<&frasl mgcp-package >
      < on-endpoint > true < &frasl on-endpoint >
    < &frasl signal >
  < &frasl recorder >
  < signal-detector >
    < event >
      < mgcp-event > dtmf0< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf1< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf2< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf3< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf4< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf5< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf6< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf7< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf8< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmf9< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmfA< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmfB< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmfC< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmfD< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmfStar< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
    < event >
      < mgcp-event > dtmfHash< &frasl mgcp-event >
      < mgcp-package > D<&frasl mgcp-package >
      < on-endpoint > false < &frasl on-endpoint >
      < media-event > SIGNAL_DETECTED < &frasl media-event >
    < &frasl event >
  < &frasl signal-detector>
< &frasl resource-container>

use you favorite XML parser and replace the /mobicents/media/IVR/$ with your value for enpoint for example /thisis/new/endpointname/1. Again get the String of this new XML and create a new MediaConfig object by calling

Reader xmlDoc = new StringReader(xml);
MediaConfig config = msControlFactory.getMediaConfig(xmlDoc);

And then get the corresponding ResourceContainer by passing this MediaConfig to mediaSession. Though this is lengthy process process, it will be useful in future to create a custom MediaConfig when JSR309Impl is mature enough to take custom MediaConfigs.

For now we have flexibility to change the MGCP vs JSR309 events and Endpoint names.

Please note that JSR309 is still under public review and not final. However unless and untill there are major change in API, mobicents JSR309 impl will not change.

Mobicents JSR309 impl version 2.0.0.BETA2 can be downloaded from https://sourceforge.net/projects/mobicents/files/

The Mobicents JSR309 home page is at http://www.mobicents.org/mms-jsr309-main.html

Follow the announcement here http://groups.google.com/group/mobicents-public/browse_thread/thread/5791bdce0143d5f9#

Please post your comments to http://groups.google.com/group/mobicents-public


Enjoy the JSr309 :)

Mobicents Media Server Team

Tuesday, February 24, 2009

Mobicents Media Server 1.0.0.CR6 Released!

The focus of this release has been the performance. CR6 is by far one of the best performing MMS! MMS now can easily have 200 concurrent Announcement or IVR. Details here

One of the major issue was Buffer was created too frequently and not reused which caused frequent GC. Other issue was with Inband Dtmf detection which is based on Goertzel Algorithm was consuming too much of CPU. The algorithm is modified in CR6 to have all the costly operation done at MMS start time and just use comparison's and other simple calculations at runtime.

The announcement for CR6 release is here

Download here

Cheers!

Friday, February 6, 2009

Mobicents MGCP implementation pases the MGCP TCK

The Mobicents MGCP stack has cleared the TCK listed on JSR 23 http://jcp.org/aboutJava/communityprocess/final/jsr023/index.html, though it wasn't one of the most challenging task we kept delaying the TCK compliance as least priority as MGCP TCK is not one of the best one can rely on. Rather we created our own test-suite for MGCP which is more reliable in terms of encoding/decoding command,testing retransmission, regression test and proper flow of command.

To understand more about TCK look at README.txt at http://code.google.com/p/mobicents/source/browse/trunk/servers/media/jain-mgcp/tck/README.txt

The test output (this may vary in your environment)


[abhayani@localhost tck]$ mvn exec:exec
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Mobicents MGCP TCK
[INFO] task-segment: [exec:exec]
[INFO] ------------------------------------------------------------------------
[INFO] [exec:exec]
[INFO] JAIN MGCP TCK
[INFO] This instance is a Gateway.
[INFO] Using org.mobicents.mgcp.stack as the path name for JainMgcpStackImpl.
[INFO] Remote entity is 127.0.0.1:2727.
[INFO] Verbose trace selected.
[INFO]
[INFO] Testing Bandwidth parameter class.
[INFO] Testing single parameter constructor. Succeeded!
[INFO] Testing two parameter constructor. Succeeded!
[INFO]
[INFO] Testing BearerInformation parameter class. Succeeded!
[INFO]
[INFO] Testing CallIdentifier parameter class.
[INFO] Invoking constructor with valid hexadecimal string. Succeeded!
[INFO] Calling constructor with empty string (should throw exception). Succeeded!
[INFO] Calling constructor with string of more than 32 characters (should throw exception). Succeeded!
[INFO] Calling constructor with string that contains non-hexadecimal characters (should throw exception). Succeeded!
[INFO] Invoking setCallIdentifier() with valid hexadecimal string. Succeeded!
[INFO] Invoking setCallIdentifier() with empty string (should throw exception). Succeeded!
[INFO] Invoking setCallIdentifier() with string of more than 32 characters (should throw exception). Succeeded!
[INFO] Invoking setCallIdentifier() with string that contains non-hexadecimal characters (should throw exception). Succeeded!
[INFO]
[INFO] Testing ConnectionIdentifier parameter class.
[INFO] Invoking constructor with valid hexadecimal string. Succeeded!
[INFO] Calling constructor with empty string (should throw exception). Succeeded!
[INFO] Calling constructor with string of more than 32 characters (should throw exception). Succeeded!
[INFO] Calling constructor with string that contains non-hexadecimal characters (should throw exception). Succeeded!
[INFO] Invoking setConnectionIdentifier() with valid hexadecimal string. Succeeded!
[INFO] Invoking setConnectionIdentifier() with empty string (should throw exception). Succeeded!
[INFO] Invoking setConnectionIdentifier() with string of more than 32 characters (should throw exception). Succeeded!
[INFO] Invoking setConnectionIdentifier() with string that contains non-hexadecimal characters (should throw exception). Succeeded!
[INFO]
[INFO] Testing ConnectionMode parameter class. Succeeded!
[INFO]
[INFO] Testing EchoCancellation parameter class. Succeeded!
[INFO]
[INFO] Testing EventName parameter class. Succeeded!
[INFO]
[INFO] Testing ExtendedConnectionParm parameter class. Succeeded!
[INFO]
[INFO] Testing GainControl parameter class. Succeeded!
[INFO]
[INFO] Testing InfoCode parameter class. Succeeded!
[INFO]
[INFO] Testing EncryptionMethod parameter class. Succeeded!
[INFO]
[INFO] Testing PacketizationPeriod parameter class.
[INFO] Testing single parameter constructor. Succeeded!
[INFO] Testing two parameter constructor. Succeeded!
[INFO]
[INFO] Testing ResourceReservation parameter class. Succeeded!
[INFO]
[INFO] Testing SilenceSuppression parameter class. Succeeded!
[INFO]
[INFO] Testing TypeOfNetwork parameter class. Succeeded!
[INFO]
[INFO] Testing TypeOfService parameter class. Succeeded!
[INFO]
[INFO] Testing LocalOptionExtension parameter class. Succeeded!
[INFO]
[INFO] Testing NotifiedEntity parameter class. Succeeded!
[INFO]
[INFO] Testing QuarantineHandling parameter class. Succeeded!
[INFO]
[INFO] Testing ReasonCode parameter class. Succeeded!
[INFO]
[INFO] Testing RegularConnectionParm parameter class. Succeeded!
[INFO]
[INFO] Testing RequestedAction parameter class. Succeeded!
[INFO]
[INFO] Testing PackageName parameter class. Succeeded!
[INFO]
[INFO] Testing PackageName parameter class. Succeeded!
[INFO]
[INFO] Testing SupportedModes parameter class. Succeeded!
[INFO]
[INFO] Testing SupportedPackages parameter class. Succeeded!
[INFO]
[INFO] Testing LocalOptVal parameter class. Succeeded!
[INFO]
[INFO] Test of Gateway API succeeded!
[INFO]
[INFO] Continuing with messaging tests.
[INFO] Getting an instance of JainIPFactory.
[INFO] Setting path name for stack implementation to org.mobicents.mgcp.stack.
[INFO] Creating a JainMgcpStack object.
[INFO] Setting port to Gateway default port 2427
[INFO] Creating a JainMgcpProvider object
[INFO] 0 [main] INFO org.mobicents.mgcp.stack.JainMgcpStackImpl - mgcp-stack.properties read successfully!
[INFO] executorTableSize = 80
[INFO] executorQueueSize = -1
[INFO] messageReaderThreadPriority = 10
[INFO] messageDispatcherThreadPriority = 7
[INFO] messageExecutorThreadPriority = 5
[INFO] 46 [main] INFO org.mobicents.mgcp.stack.JainMgcpStackImpl - Jain Mgcp stack bound to IP 0.0.0.0/0.0.0.0 and UDP port 2427
[INFO] Jain Mgcp stack bound to IP 0.0.0.0/0.0.0.0 and UDP port 2427
[INFO] Creating a JainMgcpListener object
[INFO] Adding JainMgcpListener object to JainMgcpProvider's list
[INFO] Received AuditConnectionResponse with transaction ID 1
[INFO] Received AuditEndpointResponse with transaction ID 2
[INFO] Received CreateConnectionResponse with transaction ID 3
[INFO] Received AuditConnection with transaction ID 5
[INFO] Sent AuditConnectionResponse with transaction ID 5
[INFO] message =
[INFO] DLCX 4 local@127.0.0.1:2727 MGCP 1.0
[INFO] C:FFFF
[INFO]
[INFO] local Tx ID = 4 Remote Tx ID = 4 Sending the Command 2
[INFO] Received DeleteConnectionResponse with transaction ID 4
[INFO] Received AuditEndpoint with transaction ID 7
[INFO] Sent AuditEndpointResponse with transaction ID 7
[INFO] Received DeleteConnectionResponse with transaction ID 4
[INFO] Received EndpointConfigurationResponse with transaction ID 5
[INFO] Received CreateConnection with transaction ID 9
[INFO] Sent CreateConnectionResponse with transaction ID 9
[INFO] message =
[INFO] EPCF 8 local@127.0.0.1:2727 MGCP 1.0
[INFO] B:e:mu
[INFO]
[INFO] local Tx ID = 8 Remote Tx ID = 6 Sending the Command 2
[INFO] Received EndpointConfigurationResponse with transaction ID 6
[INFO] message =
[INFO] MDCX 10 local@127.0.0.1:2727 MGCP 1.0
[INFO] C:FFFF
[INFO] I:FFFF
[INFO]
[INFO] local Tx ID = 10 Remote Tx ID = 7 Sending the Command 2
[INFO] Received ModifyConnectionResponse with transaction ID 7
[INFO] Received EndpointConfigurationResponse with transaction ID 6
[INFO] Received ModifyConnectionResponse with transaction ID 7
[INFO] Received ModifyConnectionResponse with transaction ID 8
[INFO] Received NotificationRequestResponse with transaction ID 9
[INFO] Received DeleteConnection with transaction ID 16
[INFO] Sent DeleteConnectionResponse with transaction ID 16
[INFO] message =
[INFO] MDCX 13 local@127.0.0.1:2727 MGCP 1.0
[INFO] C:FFFF
[INFO] I:FFFF
[INFO]
[INFO] local Tx ID = 13 Remote Tx ID = 10 Sending the Command 2
[INFO] Received ModifyConnectionResponse with transaction ID 10
[INFO] message =
[INFO] RQNT 14 local@127.0.0.1:2727 MGCP 1.0
[INFO] X:FFFF
[INFO]
[INFO] local Tx ID = 14 Remote Tx ID = 11 Sending the Command 2
[INFO] Received NotificationRequestResponse with transaction ID 11
[INFO] message =
[INFO] RQNT 15 local@127.0.0.1:2727 MGCP 1.0
[INFO] X:FFFF
[INFO]
[INFO] local Tx ID = 15 Remote Tx ID = 12 Sending the Command 2
[INFO] Received NotificationRequestResponse with transaction ID 12
[INFO] message =
[INFO] NTFY 17 local@127.0.0.1:2727 MGCP 1.0
[INFO] X: FFFF
[INFO] O: */AllEvents
[INFO]
[INFO] local Tx ID = 17 Remote Tx ID = 13 Sending the Command 2
[INFO] Received NotifyResponse with transaction ID 13
[INFO] Received ModifyConnectionResponse with transaction ID 10
[INFO] Received NotificationRequestResponse with transaction ID 11
[INFO] Received EndpointConfiguration with transaction ID 24
[INFO] message =
[INFO] RQNT 18 local@127.0.0.1:2727 MGCP 1.0
[INFO] X:FFFF
[INFO]
[INFO] local Tx ID = 18 Remote Tx ID = 14 Sending the Command 2
[INFO] message =
[INFO] NTFY 19 local@127.0.0.1:2727 MGCP 1.0
[INFO] X: FFFF
[INFO] O: */AllEvents
[INFO]
[INFO] local Tx ID = 19 Remote Tx ID = 15 Sending the Command 2
[INFO] message =
[INFO] NTFY 20 local@127.0.0.1:2727 MGCP 1.0
[INFO] X: FFFF
[INFO] O: */AllEvents
[INFO]
[INFO] local Tx ID = 20 Remote Tx ID = 16 Sending the Command 2
[INFO] message =
[INFO] RSIP 21 local@127.0.0.1:2727 MGCP 1.0
[INFO] RM:disconnected
[INFO]
[INFO] local Tx ID = 21 Remote Tx ID = 17 Sending the Command 2
[INFO] Sent EndpointConfigurationResponse with transaction ID 24
[INFO] Received NotificationRequestResponse with transaction ID 14
[INFO] Received NotifyResponse with transaction ID 15
[INFO] Received NotifyResponse with transaction ID 16
[INFO] Received RestartInProgressResponse with transaction ID 17
[INFO] Test of messaging capability succeeded!

Wednesday, February 4, 2009

Mobicents JAIN MGCP 2.0.0.CR1 Released!

We are happy to announce the first independent binary release of Mobicents JAIN MGCP Stack implementation 2.0.0.CR1 !

Before this MGCP implementation was always part of Mobicents Media Server. However MGCP is a industry standard and can be used by applications to control Media Server's other than Mobicents Media Server. To learn more about MGCP please refere to RFC 3435 and JSR 23.

Where to download from?
The distribution can be found on SourceForge.net. The binary package is mobicents-mgcp-impl-2.0.0.RC1.

Mobicents Media Server 2.x.y SVN Structure

The SVN structure for Mobicents Media Server 2.x.y Source is changed a lot as compared to version 1.x.y. The new SVN structure will now look like

  • media
    • jain-mgcp
    • jain-megaco
    • mscml
    • jsr-309
    • core
      • server-spi
      • server-impl
      • server-sar
      • server-standalone
      • mgcp-controller
      • megaco-controller
    • examples - All standalone examples here (not depending on SLEE or Sip Servlets)
    • slee
      • ra
        • mgcp
        • megaco
        • jsr-309
      • examples - All SLEE examples here
        • converged-demo
        • call-controller
        • mgcp-demo

The protocol stacks jain-mgcp, jain-meagco, mscml and jsr-309 are independent of MMS components and depends on mobicents parent.

The core/server-spi is core api design of MMS and core/server-impl is implementation of server-spi. MMS 2.x.y can be build as standalone server (server-standalone) or service in JBoss AS 5.x (server-sar). The controllers mgcp-controller and megaco-controller will be an integration of respective stack and server-spi.

The slee is special node for JAIN SLEE. slee/ra will have all the JSLEE RA's for respective stacks and slee/examples demonstrating the usage of these RA's