Deployment scheme

Here is example of deployment Flashphoner with Javascript phone as a front-end.
- Web-user loads regular HTML page with Javascript/css wrapper
- Javascript wrapper uses flashphoner_js_api.swf using Adobe Flash Player external interfaces.
- flashphoner_js_api.swf is hidden. It used for playing video and working with security panel.
- flashphoner_js_api.swf communicates with phone_app server-side application over RTMP.
- phone_app communicates with internal Flashphoner core libs, which responsible for SIP, RTP and codecs support.
- Flashphoner core libs communicates with VoIP server over SIP and RTP.
VoIP server may not proxy RTP traffic.
In this case, Flashphoner core libs communicates with VoIP client directly over RTP.
Development layers

There are three layers for development and customization.
- HTML / Javascript / css layer. You can customize design here, or implement you own presentation logic using Javascript API
- Flex / AS3 layer. Here you can change internal flashphoner_js_api.swf and customize flash interface, which used for video playback and security panel.
- Java / WowzaMediaServer layer. Here you can do deep server-side changes like billing or server-side integration with other software.
Development package
We have combined all development layers described above into the flashphoner_client project.
flashphoner_client project contains Javascript phone, flashphoner_js_api.swf, phone.swf, phone_app sources.
You can download flashphoner_client installation package here it contains builded sources.
You can also download flashphoner_client sources and build it yourself
How to build
- Download latest flashphoner_client sources
- Download latest Adobe Flex SDK and unpack it into /opt/flex directory.
You can also use custom path for Flex SDK. Edit client/client/build.properties and client/api/build.properties to change Flex SDK path. - Download latest released playerglobal.swc and copy it into %FLEX_SDK_HOME%/frameworks/libs/player/10.3 directory for 10.3 player features support.
- Give permissions for Flex SDK scripts using chmod:
$chmod \+x *%FLEX_SDK_HOME%/bin*
- Download and install JDK 1.6 from oracle.com. See more info about JDK installation. JDK/JRE required for building phone_app and executing ANT scripts.
- Download and unpack Apache ANT
- Create symlink for ant: $ln -sf /usr/local/apache-ant-1.8.1/bin/ant /usr/bin
- Start builder
It will create release directory, which contains installation package.$cd builder $chmod \+x builder.sh $./builder.sh
- Start installer
It will copy libs into WowzaMediaServer directory and copy *.html, *.js, *.css, *.xml files into the web-directory specified during installation.$cd release/flashphoner_client-1.x.y $chmod \+x install.sh $./install.sh
- Follow installation dialog
- Open PhoneJS.html page in browser to test installation result.
You should see Javascript phone like this:

You can build development package modules using Flashbuilder4, IntelijIdea9 or you favorite IDEs.
Please read How to build Flex or Java project using Flashbuilder4 or Intelij9 (earlier documentation 791).
Flashphoner client
How to use Flashphoner-client sources
Flashphoner-client sources located on github.
To compile Flashphoner-client from sources, you need import it to Flash Builder 4.5 (you need sdk 4.5 as minimum).
Please follow this guide to compile flashphoner-client sources
- Get sources fom github
- Import flashphoner_api project to Flash Builder
- Make sure in project properties "compile settings" specified Flash Player 11
- Make sure library cairngorn.swc attached to project in project settings
- Compile flashphoner_api that
- After successfully compilation you will have flashphoner_api.swc library. You will need it further
- Import flashphoner_client project
- Make sure in project properties "compile settings" specified Flash Player 11
- Reattach flashphoner_api.swc as library

Do that for sure. you need exactly library what you compiled just now. Old library will not work - Compile flashphoner_client project
- After compilation you will have flashphoner_js_api.swf file. That file used JS Phone for making calls.