Support Overview

Tutorials

Client API Usage Examples

Upgrade Information

FAQ

New Release History

You are here:   Visualware >   MyConnection Server >   Support >   Client API Usage Examples >   Display the number of simultaneous VoIP calls supported

Display the number of simultaneous VoIP calls supported

The example below passes the results of the capacity test to a JavaScript method, which calculates the likely number of supported VoIP lines for the connection.

Code Required

The code below just needs to be copied into a web page at the position the applet is to appear. The only change that will be needed is the codebase, highligted in red below. This should be changed to the address of your MyConnection Server installation.

<applet mayscript name="mcs" code="myspeedserver/applet/myspeed.class" archive="/myspeed/myspeed_s_8.jar,/myspeed/plugins_s_8.jar" codebase="http://mcsiad.visualware.com/myspeed" width=600 height=400>
<param name="testspecid" value="-7">
<param name="permissions" value="all-permissions">
</applet>

The next step is to copy the CSS and Script code below into the <head></head> section of the page.

<style type="text/css">
#results {
display:none;
background:#334DB0;
border-radius:5px 5px 5px 5px;
padding:10px;
color:#FFFFFF;
border:#000000 solid thin;
margin-bottom:20px;
width:600px;
}
</style>

<script type="text/javascript">
function passResults(dcap,dcappps,ucap,ucappps) {

var table;
var downCapacity = (dcap/1000000);
var upCapacity = (ucap/1000000);

// Calculates the number of support lines
var findMin = Math.min(downCapacity,upCapacity);
var voipLinesSupportedMinStress = Math.round(findMin*10);
var voipLinesSupportedMaxStress = Math.round(findMin*2);

table = "Your Internet connection should support " + voipLinesSupportedMinStress + " concurrent calls, when used for voice only.<br><br>Your Internet connection should support " + voipLinesSupportedMaxStress + " concurrent calls, when used for voice & data.</td>";

document.getElementById('results').innerHTML = table;
document.getElementById('results').style.display = 'block';

}
</script>

Finally place the code below where you want the simultaneous VoIP lines message to appear.

<div id="results"></div>


 

MyConnection Server

Home
Online Testing Portal
Download
Purchase
Resources
Support

Visualware Products

VisualRoute
eMailTrackerPro
Visual IP Trace

   

© Visualware Inc. 2017 - All Rights Reserved