Grandstream GXV3175 User Manual

Grandstream Networks, Inc.
GXV3175 IP Multimedia Phone GMI HTML SDK and API Guide
1 GMI V2.0 Overview
GMI (Grandstream Manager Interface) is a management API developed by Grandstream Networks. Designed for our IP Multimedia phones, it allows partners to develop customized applications on the phone.
GMI supports standard HTML/CSS/Javascript, users can use these dynamic web page development languages to develop their customized application. GMI will display the applicati on on the phone based on the web pages generated.
Additionally, GMI provides several basic API functions (packaged in Javascript) to facilitate users calling the existing applications on the multimedia phone or to obtain the phone status etc. This allows users with basic web application programming skills to develop their customized application on the multimedia phone, without the effort of learning a new programming language. All that is required for the user is to understand how the GMI works and how to use these simple APIs to interact with the phone.
GXV3175 supports GMI Verion 2.0. GMI V2.0 has two types of JavaScript interface:
simpleGMI: Provides a few simple and fast interfaces. It is highly efficient but has no return value . Users could not obtain exec ution result nor interface for specific data.
GMIEngine: Provides return value(s) and enables users to obtain interface for specific data and environment variables.
2 Remote GMI application
To add a GMI application to the multimedia phone, users need to add the following highlighted lines of code in menu.xml (in GXV3175 XML GUI Customization Tool package):
<submenu func-name="tools"> <item func-name="ip2location"/> <item func-name="filemanager"/> <item func-name="calendar"/> <item func-name="calculator"/> <item func-name="alarmclock"/> <link icon="icon/Grandstream.png" display-name="GMI" type="gmiapp"> <link-url>http://www.ipvideotalk.com/V2/</link-url> </link> </submenu>
The highlighted lines of code will add a menu selection “GMI” under your phone’s “Tools”
Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 2 of 17
submenu. The parameter “icon ” specif ies the icon di splaye d and “d isplay -name” speci fies the text displayed in the phone menu. The parameter type="gmiapp" specifies that this is a GMI application, and the parameter “link-url” specifies the URL address at which this application is stored. In this example, the phone will point to the link below to get the corresponding application to display on the phone: parameters “icon”, “link-url” and “display-name” to suit their needs.
The above example files are available for download from:
www.grandstream.com/products/gxv_series/gxv3175/resources/gxv3175_gmi_examples/Dem o_V2.zip.
Users will then need to use the GXV3175 XML GUI Customization Tool to generate a custom file “gxv3170cust” and upload it to the phone via the firmware upgrade process. For more information regarding GXV3175 XML GUI Customization, please refer to the following document: GXV31XX XML GUI Customization Guide.
http://www.ipvideotalk.com/V2/ . Users can modify
3 Local GMI application
Users may prefer local GMI application when the network speed is a concern for remote access. Please follow the procedures below to add a local GMI application to GXV3175.
Download the following GMI example package from Grandstream web site:
www.grandstream.com/products/gxv_series/gxv3175/resources/gxv3175_gmi_examp les/Hotel.zip
Unzip and copy it to GXV3175 with a storage device. The main file index.html will be located under /sda1/Hotel directory. (Depending on the storage device type, the folder name in the File Manager could be sda1, udisk, sda2 etc).
Add the following highlighted content in menu.xml:
<submenu func-name="tools"> <item func-name="ip2location"/> <item func-name="filemanager"/> <item func-name="calendar"/> <item func-name="calculator"/> <item func-name="alarmclock"/> <link icon="icon/Grandstream.png" display-name="GMI" type="gmiapp"> <link-url>file://sda1/Hotel/index.html</link-url> </link> </submenu>
Use the GXV3175 XML GUI Customization Tool to generate the “gxv3170cust” file with the updated menu.xml file.
Load the file “gxv3170cust “onto GXV3175 via firmware upgrade process .
Reboot the GXV3175, a local GMI application will be added to GXV3175.
Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 3 of 17
4 simpleGMI Interface
4.1 simpleGMI.refresh()
Function
simpleGMI.refresh()
Description
Parameters and Return value Parameter:
Note
Refresh the current page. The phone will obtain the current page from the web server and reload the page on the phone.
N/A
Return value:
N/A This interface is mainly for debugging. It is recommended
to remove this function in your program before official release so that the program will run as smoothly as the built-in applications on the phone, providing users with better user experience.
4.2 simpleGMI.historypage()
Function Description
simpleGMI.historypage(num) Go to the page visited in history, as specified in
parameter num.
Parameters and Return value
Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 4 of 17
Parameter:
num - Any natural number.
Negative number represents the number of page records to go backward;
0 represents the current page;
Positiv e number represents the number of page
records to go forward.
For example, the user visited these web pages in the following order:
www.google.com www.yahoo.com
www.baidu.com When the user is browsing the webpage www.baidu.com,
the function call to: simpleGMI.historypage(-1) will allow the user to return to the last page visited
(www.yahoo.com). At this point, the last page visited will be www.google.com. If the function:
simpleGMI.historypage(-1) is called again, the user will return to www.google.com
and the next page visited is www.baidu.com. If the function:
simpleGMI.historypage(1) is called, the user will return to www.yahoo.com. If num is a non-existent record, nothing will take effect.
Return Value:
N/A
Note
4.3 simpleGMI.gotoURL()
Function Description Parameters and Return value Parameter:
Note
simpleGMI.gotoURL(url) Go to the URL address specified in the url parameter.
url - any url
Return Value:
N/A This function is used to im plement a hyper link.
4.4 simpleGMI.dial()
Function
Description
Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 5 of 17
simpleGMI.dial(acct, isVideo, isDialPlan, number, headers)
Call a specified number from a specified account.
Parameters and Return value Parameter:
acct - the account to be used starting from 0 isVideo - video call or not. 1- Yes, 0-No isDialPlan - check dial pl an or not. 1-Yes, 0-No number - number to be dialed headers - add in SIP header. For instance, when
“headers” is: myheader1=myvalue1&myheader2=myvalue2 When Call is initiated, the following two headers will be
added in INVITE: myheader1: myvalue1 myheader2: myvalue2
Return Value:
N/A
Note
N/A
4.5 simpleGMI.transfer()
Function Description Parameter and Return Value Parameter:
Note Valid only when the current line is connected in a call.
simpleGMI.transfer() Go to Transfer status.
N/A
Return Value:
N/A
4.6 simpleGMI.transferTo()
Function Description
Parameter and Return Value Parameter:
Grandstream Networks, Inc. GMI HTML SDK and API Guide Page 6 of 17
simpleGMI.transferTo(destnum) In transfer status, transfer the current call to destination
number.
Loading...
+ 11 hidden pages