Implementing of browser-based softphone (flash web phone) for SIP-calls from site

I faced with the dilemma of implementing softphone in client’s site to perform online-calls. After long selection process, a lot of software and evaluation of all “ayes and nays”, I stopped my choice on the Web Call Server by Flashphoner.

The particular goal was to: Installed a web phone, intended for posting on site with a small number of calls, but with good enough quality signal transfer, and with a possibility of communication with the corporate Asterisk. Additional goal: when you’re using the embedded web phone, you can easily configuring the communication web-browser-type: Flash :left_right_arrow: Flash, Flash :left_right_arrow: SIP, Flash :left_right_arrow: GSM / PSTN, ability to use technology WebRTC – is appreciable plus.

So, after testing the demo softphone I has been downloaded and installed the software. But I got some problems with the implemening of the necessary software on the site. Despite the fact that the program’s website is a fairly large amount of instructions and descriptions to find the answers was not immediately apparent, and had to contact with Flashphoner technical support.
Responses were received very quickly, but I think that it is advisable to post the algorithm of software implementation instructions. In general, the essence and implementation of the algorithm is as follows:

  1. When you have downloaded and installed software on your own server (installation details of this phase can be found here) go to the implementing of the softphone in site.
    To integrate the web-phone into your web-site you have to configure it on the Flashphoner WCS server side.
  2. The following files are stored on Flashphoner WCS at the following location: /usr/local/FlashphonerWebCallServer/conf/
    2.1. account.xml - enter login, password, and SIP-proxy address (obtained from VoIP provider).
<root registered="true" login="1000" authenticationName="1000" password="1000" outboundProxy="10.10.10.10" domain="10.10.10.10" port="5060" visibleName="1000"/>

As a rule, connection is installed via the 5060 port.

2. callee.xml - enter your PBX account internal number.

[FONT=Courier New]<callee account="5002"/>[/FONT]

*In our case, PBX Asterisk platform is used. *It has several pre-configured internal numbers. Internal number 5002 – voice menu, 5001 – music, 5003 – echo, etc. You can also configure and implement your own internal numbers system.

On the deployed Flashphoner WCS, web-telephone interface is stored in the location where it was copied during software installation, for example: /var/www/html/WCS-2.1/ 286/.
In this directory, you also need to enter several configurations:

PhoneJS.html - web-telephone basic interface. It’s appearance can be changed by changing the page code.

Flashphoner WCS supports autologin. If you want to activate the feature, make sure the phone uses standard logging in scheme.

  1.    Then enter the following line into PhoneJS.html:
    
[FONT=Courier New]<input id="auto_login_token" type="hidden" value="123456789abcdef" />[/FONT]

id=token and value=123456789absdef elements are used for determination of the SIP-account to be automatically logged into when the phone is launched.

Create a file, for example, my_auto_login_url.xml and save it on the server in directory /usr/local/FlashphonerWebCallServer/conf/ – the server shall obtain account connection configuration data.

auto_login_url=/usr/local/FlashphonerWebCallServer/conf/my_auto_login_url.xml

[FONT=Courier New]<root registered="..." login="..." authenticationName="..." password="..." outboundProxy="..." domain="..." port="..." visibleName="..."/>[/FONT]

Afterwards, save the changes with the help of ./shutdown.sh and ./startup.sh commands and re-launch Flashphoner WCS.

2. flashLoader.js (directory /var/www/html/WCS-2.1/286/js) uncomment the following lines in the script:

[FONT=Courier New]$(function() {
  flashvars.token = $("#auto_login_token").val();
});[/FONT]

3. flashphoner.properties (directory /usr/local/FlashphonerWebCallServer/conf/)

Specify the path to the file with your autologin configuration data:

[FONT=Courier New]auto_login_url =/usr/local/FlashphonerWebCallServer/conf/my_auto_login_url.xml
get_callee_url =/usr/local/FlashphonerWebCallServer/conf/callee.xml[/FONT]

Clean the browser cash and reload the page with the web-phone. If the configuration is correct, autologin shall be activated. Now you can try to call from your web-site.

Flashphoner Web Call Server Brief Information

Web Call Server is a software platform with a Flash and Javascript/CSS client-side GUI and a server-side core handling media streams and SIP-signaling. Client-side is open-source, which means you can implement your own softphone graphic interfaces for any website.

Web Call Server technical capacities:
• Flashphoner :left_right_arrow: VoIP-servers operation through the SIP
• Support of Speex Wideband, G.711, G.729 audio codecs
• Support of H.263, H.264, Sorenson Spark video codecs
• DTMF rfc2833 and SIP INFO support
• Text messaging via SIP MESSAGE
• Support of HTML5 Websockets and WebRTC

You can find more information on product specification, integration into in-company systems (ATC, ERP, CRM) aspects, as well as on other Flashphoner WCS capacities on the developers web site (flashphoner.com).