Grandstream Networks GXV3140 User Manual
Grandstream Networks GXV3140 User Manual

Grandstream Networks GXV3140 User Manual

Ip multimedia phone gmi html sdk and api guide
Hide thumbs Also See for GXV3140:

Advertisement

Grandstream Networks, Inc.
GXV3140 IP Multimedia Phone
GMI HTML SDK and API Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the GXV3140 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Grandstream Networks GXV3140

  • Page 1 Grandstream Networks, Inc. GXV3140 IP Multimedia Phone GMI HTML SDK and API Guide...
  • Page 2: What Is Gmi

    1 What is GMI? GMI (Grandstream Manager Interface) is a management API developed by Grandstream Networks. It is designed for our IP Multimedia phones, and allows partners to develop customized applications on the phone. GMI supports standard HTML/CSS/Javascript code, so that users can use these dynamic web page development languages to develop their customized application.
  • Page 3: How Do I Add A Gmi Application

    “display-name” specifies the text displayed in the phone menu and the parameter “ver” specifies the menutree version. Users can modify these four parameters - icon/dynamic-icon/url/display-name to suit their needs. Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 3 of 43 www.grandstream.com...
  • Page 4: Gmi Api Description

    - Any natural number. Negative numbers represents the number of page records to go backward. 0 represents the current page. Positive numbers represents the number of page records to Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 4 of 43 www.grandstream.com...
  • Page 5 This API function is used to implement a hyperlink. 4.4 GMIEngine.call() Function: GMIEngine.call(acct, number, cb_call) Purpose: Used to call a specified number from a specified account. Parameter Return Parameter: Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 5 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 6 “Success” or “ERROR”, “Message” returns the URI. When the specified account is configured, the URI returned will contatin “@”. Return Value: None Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 6 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 7: Gmiengine. Hangup

    8100100 on line 1. If account 1 is idle, the response will be as follows: {"Response":"Success","registered": "1", "line": "0"}; Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 7 of 43 www.grandstream.com...
  • Page 8 See the program (program name as displayed on the phone) and the corresponding program code below: Phone Book--"phonebook" Call History--"callhistory" Messages--"messages" Social Networks --"socialnetwork" IM--"IM" Twitter--"twitter" Facebook--"facebook" Google Voice--"googlevoice" Skype--"skype" Web Browser--"webbrowser" Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 8 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 9 Calendar--"calendar" Alarm Clock--"alarmclock" Calculator--"calculator" Weather-"weatherupdate" Direct IP Call--"ipcall" File Manager--"filemanager" Stock--"stock" Currencies--"currencies" IP2Location--"ip2location" Today--"today" Settings--"settings" Display--"display" Time--"time" Accounts--"account" Network--"connection" Maintenance--"maintenance" Call Features--"callfeature" Camera--"camera" Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 9 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 10 “Response” returns the result. There are two possibilities- “Success” or “ERROR”, “Message” returns the specific error message. Return Value: None Additional Description: None 4.9 GMIEngine.message() GMIEngine.message(acct, user, msg, cb_message) Function: Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 10 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 11 None Return Value: None Additional Description: This API function can be used to implement the “Exit” softkey for the application implemented using GMI. Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 11 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 12 This API function is used to change the functions of the left/right button, so that the different control components can be selected using the left/right button. 4.13 GMIEngine.mapupdown2tab() Function: GMIEngine.mapupdown2tab() Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 12 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 13 “;” to separate them. mode – Play Mode. Currently there are two modes,0:Play once; 1:Repeat. Callback function for the GMIEngine.play function. The function Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 13 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 14 There are two possibilities- “Success” or “ERROR”, “Message” returns the response message returned by the destination server. Return Value: None None Additional Description: 4.17 GMIEngine.transfer() Function: GMIEngine.transfer () Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 14 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 15: Gmiengine. Transfer2Num

    GMIEngine. transfer2num (destnum) consecutively when the user presses the button to submit. Parameter Return Parameter: Value: destnum –The number to transfer to Return Value: None Additional Description: None Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 15 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 16: Gmi Applet Application

    Application source code, the Backspace key event should be mapped to the F4 key event and the Shift key event should be mapped to the F3 event. Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 16 of 43 www.grandstream.com...
  • Page 17 //F1 process here; break; case //Enter process here break; case 113: //F2 process here; break; case 114: //F3 process here; break; case 115: Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 17 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 18: Gmi Demo Program

    //Down process here break; case //Right process here break; default: break; 6 GMI Demo Program 6.1 Menu Example Figure 2: Menu Example illustration Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 18 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 19 <tr class="item_tr"> <td align="center"><img id="i_call_1" src="img/call.png"/></td> </tr> <tr><td align="center"><font class="item_label">Call</font></td></tr> </table> </button> </td> <td width="20%"> <button class="menu" id="b_call_1" onmouseover="chang_to_gif(document. getElementById('i_ticket_1'));" onfocus="chang_to_gif(document.getElementById(' i_ticket_1'));" onmouseout="chang_to_png(document.getElementById('i_ticket_1')) Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 19 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 20 * Draw/Simulate the softkey using HTML. Softkey should also support mouse click events, therefore the API functions GMIEngine.refresh();GMIEngine.exit() are also mapped in onclick. ******************************************************************************/ <table id="softkey"> <tr width="100%"> <td width="40px"> </td> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 20 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 21: Call Example

    6.2 Call Example Figure 3: Call Example illustration Refer to the code and the comments below for the implementation of Call Example: File: call.html …… Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 21 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 22 <iframe src="call-iframe.html" id="iframe-call"> </iframe> /****************************************************************************** * Draw softkey in html ******************************************************************************/ <table id="softkey"> <tr width="100%"> <td width="40px"> </td> <td width="100px" align="center"> <a><font class="softkey">Backspace</font></a> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 22 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 23 GMIEngine.call(0, user, cb_call); //Initiate Call function cb_launch(result) //Callback function for launching application //Process launch result here //alert(result['Response']); function launch(program) GMIEngine.launch(program, cb_launch); //launch application Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 23 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 24 //Define a contact. When selected, call the contact by calling the API fcuntion GMIEngine.call(0, user, cb_call) <td align="center"> <table> <tr><td> <input id="c_2" class="contract" type="button" style="background:url(img/02 .jpg);" onfocus="set_user('*26');" onclick="call('*26')"> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 24 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 25: Play Example

    <center> </body> 6.3 Play Example This example is part of the “Call” example source code, please scroll down the page to view this. Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 25 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 26 <div> 电 视 <input id="playsound" type="button" value=" " onclick="mplay('http://202.102.77.143/17684BCFFA4481C2F4E4C68FD/03000807004B0E E9539C58017C281EE7687552-A439-7988-0D92-697130786155.mp4');"/> //For files on a different host, please use a full file path. </div> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 26 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 27: Udp Example

    //Send some string to the specified port of the destination host via UDP. The timeout time for the response from the server is 5 seconds. GMIEngine.udp("www.ipvideotalk.com", 1500, data, 5, cb_udp) Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 27 of 43 www.grandstream.com...
  • Page 28: Vote Example

    ******************************************************************************/ <body onload="myvote_focus();" onkeydown="softkey_process(event.keyCode);" id="myvote-body"> <table id="myvote-table"> <tr> <td> <p style="margin:10px 0 0 20px;font-size:20px;">Welcome to GMI Vote Demo.</p> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 28 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 29 </td> </tr> <tr> <td> <input type="radio" name="myvote" value="4"><font class="voteitem">We Browser</font> </td> <td> <input type="radio" name="myvote" value="5"><font class="voteitem">Inte rnet Radio</font> </td> </tr> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 29 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 30 <a><font class="softkey">Refresh</font></a> </td> <td width="100px" align="center" onclick="document.getElementById('votesub') .click();"> <a><font class="softkey">Submit</font></a> </td> <td onclick=" GMIEngine.historypage(-1);" width="100px" align="center" > <a><font class="softkey">Back</font></a> </td> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 30 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 31 // table containing data //Categories $option[0]='IM'; $option[1]='Twitter'; $option[2]='Facebook'; $option[3]='Skype'; $option[4]='Web Browser'; $option[5]='Internet Radio'; $option[6]='Online Music'; $option[7]='Online Video'; //Background color for the category statistics bar $bgcolor[0]='#04F9FA'; $bgcolor[1]='#E76F48'; Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 31 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 32 //Enter process here break; case 113: //F2 process here; break; case 114: //F3 process here; break; case 115: //F4 process here GMIEngine.historypage(-1); break; Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 32 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 33 $i++){ if(mysql_tablename($result, $mysqltable){ $tableexist true; break; if(!$tableexist){ printf ("Table is not exist,creating...\n"); $sql 'CREATE TABLE `myvote` ( `name` VARCHAR( 30 ) NOT NULL, Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 33 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 34 "<table width='100%' border='0' cellspacing='0' cellpadding='0' style='margin-top:10px;'>"; print "<tr><td width='450'>"; print "<table width='420' border='0' cellspacing='0' cellpadding='0'>"; for($i=0;$i<8;$i++){ $per=mysql_db_query($mysqldb,"select votes from $mysqltable where votes=$i"); $tempnum (int) mysql_num_rows($per); Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 34 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 35 </td> <td width="100px" align="center"> <a>&nbsp;&nbsp;</a> </td> <td width="100px" align="center"> <a>&nbsp;&nbsp;</a> </td> <td onclick=" GMIEngine.historypage(-1);" width="120px" align="center" > <a><font class="softkey">Back</font></a> </td> <td width="40px"> </td> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 35 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 36: Message Example

    * * At the same time, all the key events are handled by the softkey_process function. ******************************************************************************/ Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 36 of 43 www.grandstream.com...
  • Page 37 <textarea cols="45" rows="10" id="msg" onkeydown="message_body();"></te xtarea><font id="msgstatus" color="yellow">0/256</font> </td> </tr> </table> <table id="softkey"> <tr width="100%"> <td width="40px"> </td> <td width="100px" align="center"> <a><font class="softkey">Backspace</font></a> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 37 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 38 <td width="100px" align="center" onclick="message(document.getElementById( 'number').value, document.getElementById('msg').value);"> <a><font class="softkey">Send</font></a> </td> <td onclick="GMIEngine.historypage(-1);" width="100px" align="center" > <a><font class="softkey">Back</font></a> </td> <td width="40px"> </td> </tr> </table> </body> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 38 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 39: News Example

    <iframe src="iframe-news.html" id="iframe-news"> </iframe> <table id="softkey"> <tr width="100%"> <td width="40px"> </td> <td width="100px" align="center"> <a>&nbsp;&nbsp;</a> </td> <td onclick="GMIEngine.refresh();" width="100px" align="center"> <a><font class="softkey">Refresh</font></a> </td> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 39 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 40 <iframe src="news1.html" id="iframe-news"> </iframe> <table id="softkey"> <tr width="100%"> <td width="40px"> </td> <td width="100px" align="center"> <a>&nbsp;&nbsp;</a> </td> <td onclick="GMIEngine.refresh();" width="100px" align="center"> <a><font class="softkey">Refresh</font></a> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 40 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 41: Timer Example

    *After the page loads, it is executed immediately and the tiemr is activated. The timer will display the current time in innerHTML every second. ******************************************************************************/ function clockon() thistime = Date(); hours = thistime.getHours(); Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 41 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 42 20px;'> <div id="layer2" style="z-index:2;width:57px;height:12px;position:absolute;to p:95px;left:230px;"> <script>writeclock()</script> </div> <table width="4%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><img src="../img/clockbg.gif" width="180" height="126" border="0"></a ></td> </tr> </table> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 42 of 43 www.grandstream.com Last Updated: 09/2010...
  • Page 43 <a><font class="softkey">&nbsp;&nbsp;&nbsp;</font></a> </td> <td width="100px" align="center"> <a><font class="softkey">&nbsp;</font></a> </td> <td onclick="history.back();" width="100px" align="center" > <a><font class="softkey">Back</font></a> </td> <td width="40px"> </td> </tr> </table> </body> Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 43 of 43 www.grandstream.com Last Updated: 09/2010...

Table of Contents