About
The Mizu WebPhone is a SIP softphone application implemented as a platform independent java applet, so it can be run from any java enabled browser. Since Mizu it is based on the open standard Session Initiation Protocol, it can inter-operate with any other SIP-based networks allowing people to make true VOIP calls directly from webpages.
Deploy
The whole application is built into one file making its deployment fairly easy. The file size is like a small image on your webpage, so it can be downloaded quickly by browsers. To add it to your webpage, you just have to put this file on your web server and copy-paste a short code in your html.
· GUI
You can set any color for the GUI. The java applet can even be running in the background, so this will not disturb your existing web design.
· Online/Offline/Busy and other status buttons
The status of the users can be loaded from a database. Based on the user presence you can display the different buttons with your design. This can be easily done with a little server side work (in PHP, .NET or any other language)
· When Java is not installed
Based on online statistics (http://www.thecounter.com/stats/) 94% of the browsers have support for java (Flash is available on 96%).
You can always present alternative methods for users who don't have Java installed or enabled in their browsers. Most of the softphones will recognize sip uri links placed on your webpage (for example sip://callednumber@sipserver.com) and will start the call automatically. Alternatively you can redirect your users to download the java runtime or offer them a softphone download link in case if they don’t have java enabled.
· Bypass security restriction
To disable the java warning when the applet first loads on user’s device, you can add a valid digital certificate for the applet. This can be purchased by different vendors (trusted certificate authorities). You can check VeriSign for example. The price varies from 20 to 800 USD. Contact us if you have any technical problems (We can sign up your applet if you have purchased such certificate)
By default the applet file is named “MizuWebPhone.jar”. Copy this file in your webpage directory (Usually near the html file in which you would like to be displayed. Otherwise you must enter the correct path)
Then copy paste the applet tag into your html (or compose it dynamically from any server side script like PHP or .NET)
The applet tag is defined as follow:
<applet
archive = "FILENAME.jar"
codebase = "."
code = "mizuphoneproject.MizuPhone.class"
name = "Mizu WebPhone"
width = "APPLET_SIZE_WIDTH"
height = "APPLET_SIZE_HEIGHT"
hspace = "0"
vspace = "0"
align = "middle"
>
<param name = " bgcolor" value = "APPLET_COLOR">
<param name = "compact" value = "COMPACT_BOOL">
<param name = " register" value = "REGISTER_BOOL">
<param name = "call" value = "CALL_BOOL">
<param name = " serveraddress" value = "SERVER_ADDRESS">
<param name = "username" value = "CALLER_USERNAME">
<param name = "password" value = "CALLER_PASWORD">
<param name = "callto" value = " CALLED_NUMBER">
<b>Display error here or offer java runtime download or alternative dial method (download link to your desktop softphone) b>
</applet>
Parameters
The parameters can be used to control the applet behavior like display size and color, server domain, SIP authentication parameters, called party number and wether a call have to be started immediately as the applet starts or you let the user to enter these parameters manually.
APPLET_SIZE_WIDTH, APPLET_SIZE_HEIGHT: the size of the space occupied by the applet can vary depending on the other parameters.
-If the compact parameter is set to true, than you should set the APPLET_SIZE_WIDTH to 240 and the APPLET_SIZE_HEIGHT to 50.
-If the compact parameter is set to true, than you should set the APPLET_SIZE_WIDTH to 300 and the APPLET_SIZE_HEIGHT to 330.
You can run this applet in hidden mode, when all parameters are passed from server side scripts. In this way you can set the APPLET_SIZE_WIDTH and APPLET_SIZE_HEIGHT to 1.
COMPACT_BOOL:
False: the applet will be shown in its full size with username, password input box and dial pad
True: the applet will have only a Hangup/Call button and a call status indicator. In this mode the username, password and callto parameters are already set from parameters, so when the applet is launched it immediately starts dialing the requested number.
Default value is false.
Usually when this parameter is true, than the CALL_BOOL is also set true.
Usually when this parameter is false, than the CALL_BOOL is also set false.
REGISTER_BOOL:
Set to true if you would like the softphone to register automatically when started (server domain, username and password must be passed by parameters). Default value is false.
CALL_BOOL:
If set to true then the applet immediately starts the call with the given parameters. The SERVER_ADDRESS, CALLER_USERNAME, CALLER_PASWORD, CALLED_NUMBER must be set by parameter.
Default value is false.
Usually when this parameter is true, then the COMPACT_BOOL is also set true.
Usually when this parameter is false, then the COMPACT_BOOL is also set false.
SERVER_ADDRESS: the domain name or IP address of your SIP server. By default it uses the standard SIP port (5060). If you need to connect to other port, you can append the port after the address separated by colon. Example: mydomain.com:5062
Default value is empty.
CALLER_USERNAME: this is the A number (username). The instance will authenticate with this username on your server.
When compact is true, then this parameter must be filled properly. Otherwise it can be empty or omitted (the user will have to enter it)
CALLER_PASWORD: SIP authentication password. When compact is true, then this parameter must be filled properly. Otherwise it can be empty or omitted (the user will have to enter it)
Default value is empty.
CALLED_NUMBER: can be any phone number or username that can be accepted by your server. When compact is true, then this parameter must be filled properly. Otherwise it can be empty or omitted (the user will have to enter it)
Default value is empty.
APPLET_COLOR: you can set any background color with this parameter. This number represents an opaque sRGB color with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7.
If you omit this parameter, then the default color is white.
Default value is empty.
Examples
VoIP server providers webpage
Applet tag placed on VoIP server providers’ webpage, allowing their customers to make VOIP calls directly from the browser:
<applet
archive = "MizuWebPhone.jar"
codebase = "."
code = "mizuphoneproject.MizuPhone.class"
name = "MizuWebPhone"
width = "300"
height = "330"
hspace = "0"
vspace = "0"
align = "middle"
>
<param name = "serveraddress" value = "sipserverdomain.com">
<b>Java is currently not installed or not enabled.</b>
</applet>
If the user is already logged in on your webpage, then you can make the applet more user-friendly by not asking for their username and password again.
In this case you should generate the html page with the “username” and “password” parameters prefilled (This can be done from your server side scripting, for example from PHP or .NET)
VOIP enabled forums
On your pages where you display the forum posts, near the nicknames you can display a small picture representing the online/offline/busy status of the actual user (presence status). The status of the user can be queried from your SIP server. If you use Mizu Softswitch, you have to initiate the v_userstatus ‘username’ SQL query to the database to know the status of the actual user.
If the agent is online, the button must be clickable and load a different page, frame or whatever which will launch the java applet.
<applet
archive = "MizuWebPhone.jar"
codebase = "."
code = "mizuphoneproject.MizuPhone.class"
name = "MizuWebPhone"
width = "240"
height = "50"
hspace = "0"
vspace = "0"
align = "middle"
>
<param name = "compact" value = "true">
<param name = "call" value = "true">
<param name = " serveraddress" value = "yourdomain.com">
<param name = "username" value = "loggedin_user_username">
<param name = "password" value = "loggedin_user_password">
<param name = "callto" value = "called_user_name">
<b>Display error here or offer java runtime download b>
</applet>
The serveraddress, username, password and callto must be generated properly from your server side scripting language (PHP, .NET or any other)
Workaround, when the browser doesn’t have java enabled
In this case you should direct the user to download the java runtime or present alternative methods to call. Example:
<applet
archive = "MizuWebPhone.jar"
codebase = "."
code = "mizuphoneproject.MizuPhone.class"
name = "MizuWebPhone"
width = "240"
height = "50"
hspace = "0"
vspace = "0"
align = "middle"
>
<param name = "compact" value = "true">
<param name = "call" value = "true">
<param name = " serveraddress" value = "yourdomain.com">
<param name = "username" value = "loggedin_user_username">
<param name = "password" value = "loggedin_user_password">
<param name = "callto" value = "called_user_name">
<p>
If you don't have Java installed you can install from <b>
<a href="http://www.java.com/en/download/index.jsp">here</a></b>.<br>
You must allow this applet to access your computer (Accept the certificate,
Click on allow blocked content on IE).<br>
Otherwise it cannot access you microphone and cannot initiate phone calls.<br>
If Java doesn't work for you, then click <b>
<a href="sip:// called_user_name@yourdomain.com">here</a></b> to start a call from
your desktop soft phone application.<br>
If you don't have a softphone you can download a free one from <b>
<a href="http://www.mizu-softphone.com/Download.aspx">here</a></b></p>
</applet>
Demo version
The demo version will expire after several months of usage and has maximum 60 sec call duration restriction.
Resources
You can find more details about java applet deployment here: http://java.sun.com/docs/books/tutorial/deployment/applet/deployindex.html
Mizu WebPhone homepage : http://www.mizu-softphone.com/Home/WebPhone.aspx
Demo: http://www.mizu-softphone.com/Home/PublicPhone.aspx
Example html: TestDemo.htm (if you have received it with this document)
For help, contact support@mizutech.hu