Using Adobe Flash Media Server and Flash-SIP Gateway with DiaStar

From ProjectDiaStar

Jump to: navigation, search

Contents

Introduction

While there are many possible SIP video clients today - desktop phones, soft phones on PCs or mobile smart phones - they all require installation and setup before they can be used. But almost any device with IP connectivity has the capability to play audio and video via a Flash client plug-in in its web browser. And doing so requires no effort on the part of the user beyond an easy installation of the plug-in.

It would be a great if 2-way, interactive SIP video could take advantage of the omnipresent Flash client. Using the Adobe combination with DiaStar, it can.

This tech brief outlines setting up the Adobe Flash Media Server 4 (FMS) and the Adobe Labs preview release of its Flash Media Gateway (FMG) for use with Project DiaStar. Once in place, it will allow a web browser-based "Flash Phone" to call and interact with a DiaStar Interactive Video and Voice Response (IVVR) session and to act as a listen/view-only participant in a DiaStar video conference.

System Architecture

The following diagram shows the systems and software involved in a typical DiaStar installation using a Flash-SIP gateway:

The DiaStar side is a typical DiaStar system configuration. For simplicity, the Asterisk or FreeSWITCH client is on the DiaStar system. Video SIP clients - either desktop SIP phones, soft phones running on a PC or soft phones running on a mobile smart phone - have open sessions in a video conference.

The two Adobe components are on a separate Windows 2003 Enterprise Server. They also have a SIP session open to the same video conference. In this case, the conference session is view/listen only, as the FMG does not support receiving video from a Flash client.

A web browser has initiated a session by requesting the Flash phone client application, which in turn uses a Flash client plug-in for its media capabilities. Input, such as selecting a conference ID, is done as DTMF entry in the phone client.

Once all calls are in progress, live audio/video interaction takes place between the users of the SIP phones, and the Flash phone user sees and hears the mixed conference output.

Obtaining the Adobe Packages

Both the Adobe FMS and FMG are available in free developer editions.

The FMG is a pre-release version, sponsored by Adobe Labs. You will need to register with Adobe before you are allowed to download the gateway. The home page for the FMG can be found here.

You will also need an Adobe registration for the trial version of the FMS. The number of connections are limited so that it cannot be used in production.

Either Windows or Linux version of the FMS is available, But, since there is only a Windows version of the FMG, it is simpler to use a singe Windows system as the Adobe server.

Installing the Adobe FMS

Begin by installing Windows 2003 Enterprise Server and Service Pack 2 for Windows 2003 Enterprise Server.

The FMS should be installed and verified before installing the FMG.

Begin the installation by unzipping the FMS package. It contains versions for all of its supported operating systems and architectures. Find the desired Windows installation executable and run the installer. Entering no serial number will cause the developer's version to be installed. Select the full installation, with FMS4 and Apache. Enter an admin name and password, and use the default port numbers. Choose to have the gateway started on bootup and after the installation is done.

The Adobe installation guide for FMS may be found here.

When the installation is finished, choose to launch a local Flash media start screen. (i.e. have a local browser started and sent to the Flash start page) The main page for the just-installed FMS should be seen, and an introductory video should play. The web browser on another networked system could also be used the access the Apache web server. The URL is http://<FMS System IP Address>/index.html

Installing the Adobe FMG

Once the FMS is installed, running and verified, the FMG can be installed. Start the process by running its InstallShield Wizard. As with the FMS, entering no serial number results in a Developer's Edition. Enter a admin user and password and choose to have the gateway started on bootup but not started after the installation is done.

FMS/FMG Configuration

Copy the C:\Program Files\Flash Media Gateway\FMSApplications\telephony folder to C:\Program Files\Flash Media Server 4\applications

In Server.xml file in C:\Program Files\Adobe\Flash Media Server 4\conf, under the <Server> tag, add <Registry enabled="true" /> to enable registry core.

Copy the Flash Phone client (all files and the src directory in C:\Program Files\Flash Media Gateway\FMSApplications\telephony\FlashPhone into C:\Program Files\Flash Media Server 4\webroot This will allow the Apache web server to serve the Flash Phone application to its web clients.

Several FMG configuration files need changes or additions so that they can interact with Diastar. The files' default location is in C:\Program Files\Flash Media Gateway\conf.

sip.xml

  • Delete the speex line from <CodecList>. G711u and H264 should remain.
  • Modify the sample profile with <profileID> sipVideoPhone. This example matches most of the Diastar server characteristics.
    • <userName> is unimportant since a registrar with authentication is not being used
    • <displayName> unimportant
    • <password> unimportant since a registrar with authentication is not being used
    • <remoteSipHost> - IP address of Diastar server

workflow.xml

Modify the <Context> tag with "name=rtmp" to add the new extensions that are valid on the Diastar system. Make sure that the new conditions are added to the top of the list before the wildcarded conditions.

Below are two examples for extensions 400 and 506:

<Context name="rtmp">
<Condition variable="destNum" value="^400$">
 <AppNode sequence="1" app="bridge" args="sip|${destNum}@sipVideoPhone" /> 
 <AppNode sequence="2" app="hangup" args="null" /> 
 </Condition>
<Condition variable="destNum" value="^506$">
 <AppNode sequence="1" app="bridge" args="sip|${destNum}@sipVideoPhone" /> 
 <AppNode sequence="2" app="hangup" args="null" /> 
 </Condition>


Note that sipVideoPhone is the profile defined in sip.xml that is associated with the Diastar server's IP address.

After making these changes, stop and restart both the FMS and FMS. Start and stop options are found under Start -> All Programs -> Adobe -> FMS/FMG.

DiaStar Configuration

No special Diastar configuration is needed to interact with Adobe's Flash-SIP gateway. From the point of view of Diastar, the gateway is just another SIP video phone.

Making Flash-SIP Calls

From a web browser, bring up the sample Flash phone application supplied with the FMG using the following URL:

http://<FMS/FMG IP Address>/flashPhone.html

Once the phone appears, set Server URI to:

rtmp://<FMS/FMG IP Address>/telephony

and press connect. The Sample Flash Phone with a telephone dialpad should appear in a connected state with a numerical user ID assigned.

Dialing "8888" should produce Music on Hold for several minutes. This indicates that the Flash-SIP gateway is working, but does not verify Diastar connectivity.

With Diastar running, dial one of the Diastar extensions configured in workflow.xml. (400 or 506 in the example above) The call from the browser-based Flash phone will be converted to SIP at the gateway, and its arrival should be seen in the Diastar and Asterisk logs. Menus, video clips and conferences should be seen as on a SIP phone making a direct call to Diastar. Remember that the FMG currently operates in a "receive-only" mode, so a record operation on Diastar will not work. Diastar video conferences can be viewed/heard on the Flash phone, but the viewer will not be able to participate in a conference.

If the Diastar system is running properly with a SIP video phone, diagnosing FMG problems should start with the FMG log files in C:\Program Files\Adobe\Flash Media Gateway\log.