<table width="1000" cellspacing="0" cellpadding="0" border="0" align="center" id="conf_list" class="jsDataTable">
</table>
</div>
+ <br clear=all>
+
+ <button data-inline="true" id="hold">HOLD</button>
+ <button data-inline="true" id="hupbtn">End Call</button>
+<!-- <button data-inline="true" class="startxferbtn">Transfer</button>-->
+ <span class="sharediv">
+ <button data-inline="true" id="sharebtn">Share</button>
+ <button data-inline="true" id="nosharebtn">End Share</button>
+ </span>
+
+ <span class="sharediv">
+ <button data-inline="true" id="smallerbtn">Smaller - </button>
+ <button data-inline="true" id="biggerbtn">Bigger +</button>
+ <button data-inline="true" id="fullbtn">Full Screen</button>
+ </span>
+
+ <div id="media">
+ <video id="webcam" autoplay="autoplay"></video>
+
+ </div>
+
+<br><br>
- <br>
<div id="message" hidden="true">
<hr class="l1" width="500"/>
<div id="chatwin"></div>
<div id="conf_mod"></div>
<div style="color:blue" id="conf_display"></div>
- <button data-inline="true" id="hold">HOLD</button>
- <button data-inline="true" id="hupbtn">End Call</button>
-<!-- <button data-inline="true" class="startxferbtn">Transfer</button>-->
- <span class="sharediv">
- <button data-inline="true" id="sharebtn">Share</button>
- <button data-inline="true" id="nosharebtn">End Share</button>
- </span>
- <br><br><br>
<img src="img/verto_black_web.gif" width="300"><br><br>
- <div id="media">
-
- <div class="sharediv">
- <button data-inline="true" id="smallerbtn">Smaller - </button>
- <button data-inline="true" id="biggerbtn">Bigger +</button>
- <button data-inline="true" id="fullbtn">Full Screen</button>
- </div>
- <table border=0 cellspacing=0 cellpadding=0 width=95%><tr>
- <td valign=top align=center><video id="webcam" autoplay="autoplay"></video></td>
- </tr><tr>
-
-<!-- <td valign=top align=left>
- <br><br><video id="local_webcam" autoplay="autoplay" style="transform: scale(-1, 1);webkit-transform: scale(-1, 1);"></video></td>-->
-
- </tr></table>
- </div>
-
<div id=keypad>
<button class="dtmf" data-inline="true">1</button>
<input type="radio" name="vqual" id="vqual_vga" value="vga">
<label for="vqual_vga">VGA 640x480</label>
-
<input type="radio" name="vqual" id="vqual_qvga_wide" value="qvga_wide">
<label for="vqual_qvga_wide">QVGA WIDE 320x180</label>
<input type="radio" name="vqual" id="vqual_vga_wide" value="vga_wide">
<label for="vqual_vga_wide">VGA WIDE 640x360</label>
-
+
<input type="radio" name="vqual" id="vqual_hd" value="hd">
<label for="vqual_hd">HD 1280x720</label>
<label for="vqual_hhd">HHD 1920x1080</label>
</fieldset>
-</div><Br>
+</div><br clear="all"><br>
+
+
+<div >
+ <fieldset data-role="controlgroup" data-type="horizontal">
+ <legend><b>Max Outgoing Bandwidth</b>:</legend>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_250kb" value="250">
+ <label for="outgoingBandwidth_250kb">250kb</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_500kb" value="500">
+ <label for="outgoingBandwidth_500kb">500kb</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_1024kb" value="1024">
+ <label for="outgoingBandwidth_1024kb">1mb</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_1536kb" value="1536">
+ <label for="outgoingBandwidth_1536kb">1.5mb</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_2048kb" value="2048">
+ <label for="outgoingBandwidth_2048kb">2mb</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_5120kb" value="5120">
+ <label for="outgoingBandwidth_5120kb">5mb</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_0kb" value="0">
+ <label for="outgoingBandwidth_0kb">No Limit</label>
+
+ <input type="radio" name="outgoingBandwidth" id="outgoingBandwidth_default" value="default">
+ <label for="outgoingBandwidth_default">Server Default</label>
+
+
+ </fieldset>
+</div><br clear="all"><br>
+
+
+<div >
+ <fieldset data-role="controlgroup" data-type="horizontal">
+ <legend><b>Max Incoming Bandwidth</b>:</legend>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_250kb" value="250">
+ <label for="incomingBandwidth_250kb">250kb</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_500kb" value="500">
+ <label for="incomingBandwidth_500kb">500kb</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_1024kb" value="1024">
+ <label for="incomingBandwidth_1024kb">1mb</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_1536kb" value="1536">
+ <label for="incomingBandwidth_1536kb">1.5mb</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_2048kb" value="2048">
+ <label for="incomingBandwidth_2048kb">2mb</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_5120kb" value="5120">
+ <label for="incomingBandwidth_5120kb">5mb</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_0kb" value="0">
+ <label for="incomingBandwidth_0kb">No Limit</label>
+
+ <input type="radio" name="incomingBandwidth" id="incomingBandwidth_default" value="default">
+ <label for="incomingBandwidth_default">Server Default</label>
+
+ </fieldset>
+</div><br clear="all"><br>
+
+
-<br clear="all">
</div>
<button data-inline="true" id="showdemo" onclick="$('#demos').show();$('#showdemo').hide()">View Demo Extensions</button>
<button data-inline="true" id="showdevices" onclick="$('#devices').show();$('#showdevices').hide()">View Device Settings</button>
var local_vid_width = 320;
var local_vid_height = 180;
+var outgoingBandwidth;
+var incomingBandwidth;
$( ".selector" ).pagecontainer({ "theme": "a" });
destination_number: $("#ext").val(),
caller_id_name: $("#name").val(),
caller_id_number: $("#cid").val(),
+ outgoingBandwidth: outgoingBandwidth,
+ incomingBandwidth: incomingBandwidth,
useVideo: check_vid(),
useStereo: $("#use_stereo").is(':checked'),
useCamera: $("#usecamera").find(":selected").val(),
destination_number: $("#ext").val() + "-screen",
caller_id_name: $("#name").val() + " (Screen)",
caller_id_number: $("#cid").val() + " (screen)",
+ outgoingBandwidth: outgoingBandwidth,
+ incomingBandwidth: incomingBandwidth,
videoParams: screen_constraints.video.mandatory,
useVideo: true,
screenShare: true
});
});
+//
+ outgoingBandwidth = $.cookie("verto_demo_outgoingBandwidth") || "default";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+
+ $("#outgoingBandwidth_250kb").prop("checked", outgoingBandwidth === "250").change(function(e) {
+ if ($("#outgoingBandwidth_250kb").is(':checked')) {
+ outgoingBandwidth = "250";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_500kb").prop("checked", outgoingBandwidth === "500").change(function(e) {
+ if ($("#outgoingBandwidth_500kb").is(':checked')) {
+ outgoingBandwidth = "500";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_1024kb").prop("checked", outgoingBandwidth === "1024").change(function(e) {
+ if ($("#outgoingBandwidth_1024kb").is(':checked')) {
+ outgoingBandwidth = "1024";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_1536kb").prop("checked", outgoingBandwidth === "1536").change(function(e) {
+ if ($("#outgoingBandwidth_1536kb").is(':checked')) {
+ outgoingBandwidth = "1536";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_2048kb").prop("checked", outgoingBandwidth === "2048").change(function(e) {
+ if ($("#outgoingBandwidth_2048kb").is(':checked')) {
+ outgoingBandwidth = "2048";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_5120kb").prop("checked", outgoingBandwidth === "5120").change(function(e) {
+ if ($("#outgoingBandwidth_5120kb").is(':checked')) {
+ outgoingBandwidth = "5120";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_0kb").prop("checked", outgoingBandwidth === "0").change(function(e) {
+ if ($("#outgoingBandwidth_0kb").is(':checked')) {
+ outgoingBandwidth = "0";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#outgoingBandwidth_default").prop("checked", outgoingBandwidth === "default").change(function(e) {
+ if ($("#outgoingBandwidth_default").is(':checked')) {
+ outgoingBandwidth = "default";
+ $.cookie("verto_demo_outgoingBandwidth", outgoingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+//
+
+ incomingBandwidth = $.cookie("verto_demo_incomingBandwidth") || "default";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+
+ $("#incomingBandwidth_250kb").prop("checked", incomingBandwidth === "250").change(function(e) {
+ if ($("#incomingBandwidth_250kb").is(':checked')) {
+ incomingBandwidth = "250";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_500kb").prop("checked", incomingBandwidth === "500").change(function(e) {
+ if ($("#incomingBandwidth_500kb").is(':checked')) {
+ incomingBandwidth = "500";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_1024kb").prop("checked", incomingBandwidth === "1024").change(function(e) {
+ if ($("#incomingBandwidth_1024kb").is(':checked')) {
+ incomingBandwidth = "1024";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_1536kb").prop("checked", incomingBandwidth === "1536").change(function(e) {
+ if ($("#incomingBandwidth_1536kb").is(':checked')) {
+ incomingBandwidth = "1536";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_2048kb").prop("checked", incomingBandwidth === "2048").change(function(e) {
+ if ($("#incomingBandwidth_2048kb").is(':checked')) {
+ incomingBandwidth = "2048";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_5120kb").prop("checked", incomingBandwidth === "5120").change(function(e) {
+ if ($("#incomingBandwidth_5120kb").is(':checked')) {
+ incomingBandwidth = "5120";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_0kb").prop("checked", incomingBandwidth === "0").change(function(e) {
+ if ($("#incomingBandwidth_0kb").is(':checked')) {
+ incomingBandwidth = "0";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+
+ $("#incomingBandwidth_default").prop("checked", incomingBandwidth === "default").change(function(e) {
+ if ($("#incomingBandwidth_default").is(':checked')) {
+ incomingBandwidth = "default";
+ $.cookie("verto_demo_incomingBandwidth", incomingBandwidth, {
+ expires: 365
+ });
+ }
+ });
+//
var vqual = $.cookie("verto_demo_vqual") || "qvga";
$.cookie("verto_demo_vqual", vqual, {
cJSON *dialog;
verto_pvt_t *tech_pvt;
char name[512];
- const char *var, *destination_number, *call_id = NULL, *sdp = NULL,
+ const char *var, *destination_number, *call_id = NULL, *sdp = NULL, *bandwidth = NULL,
*caller_id_name = NULL, *caller_id_number = NULL, *remote_caller_id_name = NULL, *remote_caller_id_number = NULL,*context = NULL;
*response = obj;
switch_channel_set_flag(channel, CF_VIDEO_ONLY);
}
+ if ((bandwidth = cJSON_GetObjectCstr(dialog, "outgoingBandwidth"))) {
+ if (strcasecmp(bandwidth, "default")) {
+ switch_channel_set_variable(channel, "rtp_video_max_bandwidth_in", bandwidth);
+ }
+ }
+
+ if ((bandwidth = cJSON_GetObjectCstr(dialog, "incomingBandwidth"))) {
+ if (strcasecmp(bandwidth, "default")) {
+ switch_channel_set_variable(channel, "rtp_video_max_bandwidth_out", bandwidth);
+ }
+ }
switch_snprintf(name, sizeof(name), "verto.rtc/%s", destination_number);
switch_channel_set_name(channel, name);