GMI version, please use getGMIVersion to match the returned version number. For interfaces that do not have GMI version requirement, they exist in all GMI versions and there is no need to identify GMI version. GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 3 of 40...
GMI WEB SERVICE INTERFACE GMI Service provides basic API to facilitate users calling the existing application on the GXV3240/GXV3275 to retrieve the phone's status. Different development environments provide different interface types. Usually, JavaScript and Windows MFC can be used for development.
"?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) For example: http://192.168.121.230/manager?action=pn&format=json&jsoncallback 1. HTTP request return: Return Return successful GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 5 of 40...
"?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) For example: http://192.168.121.230/manager?action=vendor&format=json&jsonca llback=? 1. HTTP request return: Return Return successful "{"res": "success", "vendor": "Grandstream Networks, Inc."}" GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 6 of 40...
"{"res": "error", "msg" : "can't get product model"}" 2. callbackFunction(data) will process the data returned from HTTP request 7. getProductInfo(callbackFunction) Description Retrieve GXV3240/GXV3275 vendor and product information (login is not require). The interface is combined by getVendor and getProduct. Parameters callbackFunction: Call back function ...
Destination number is empty "{"res": "error", "msg" : "destnum can't be null"}" Timeout "{"res": "error", "msg" : "timeout"}" callbackFunction(data) will process the data returned from HTTP request GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 8 of 40...
"?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) For example: http://192.168.121.230/manager?action=status&format=json&jsoncall back=? 1. HTTP request return: Return {"Response":"Success","Data":[{"Index":"1","Server":"192.168.120.25 4","Number":"3882","Status":"1","Activate":"1"}, {"Index":"0","Server":"sip.ipvideotalk.com:48879","Number":"8118263 ","Status":"1","Activate":"1"}, {"Index":"2","Server":"192.168.121.22","Number":"1001","Status":"1"," Activate":"1"}]} 2. String definition: GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 9 of 40...
2. callbackFunction(data) will process the data returned from HTTP request Note: When using this interface, if the interface amount is greater than 12, it will be exported into text format stored in the phone. GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 10 of 40...
"{"res": "error", "msg" : "wrong format"}" 2. callbackFunction(data) will process the data returned from HTTP request 13. getGroupCount(callbackFuntion) Description Retrieve the number of groups in phonebook Parameters callbackFunction: Call back function GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 11 of 40...
"{"res": "error", "msg" : "can't get contact count"}" 2. callbackFunction(data) will process the data returned from HTTP request 15. phbkresponse(phbkGroup, callbackFuntion) Description Configure phonebook group information (edit group and add group) Phonebook group structure PhbkGroup GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 12 of 40...
2. callbackFunction(data) will process the data returned from HTTP request 16. setContact(phbkContact, callbackFuntion) Description Configure phonebook contact information (edit contact and add contact) Phonebook contact structure PhbkContact ctID; //Contact ID ctName; //Contact name GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 13 of 40...
2. callbackFunction(data) will process the data returned from HTTP request 17. removeContact(ctID, callbackFunction) Description Remove contact ctID from phonebook. If ctID is empty, remove all contacts Parameters ctID: Contact ID GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 14 of 40...
The default group and blacklist cannot be removed. The gpID of the default group is 0; the gpID of the blacklist is 100. 20. moveToDefault(ctID, callbackFuntion) Description Move the contact to default phonebook group Parameters ctID: Contact ID GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 16 of 40...
21. downloadPhonebook(phbkConfigure, flag, callbackFunction) Description Set up phonebook download configurations and download phonebook.xml Phonebook download configuration structure phbkConfigure mode; url; interval; redup; clearold; filetype; encode; Parameters phbkConfigure: Phonebook download configuration GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 17 of 40...
Page 19
"1" (clear old list, 0: No, 1: Yes) downEncode: "UTF-8" (phonebook file encoding format) format: "json" jsoncallback: "?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 18 of 40...
8: File encoding format wrong 9: Importing (For importing) 10: File format invalid (for importing) 22. setPhonebook(phbkConfigure, flag, callbackFunction) Description Phonebook import/export Phonebook configuration structure phbkConfigure mode; url; interval; redup; GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 19 of 40...
Page 21
"1" portEncode: "UTF-8" portType: "0" format: "json" jsoncallback: "?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 20 of 40...
Page 22
"{"res": "success", "flag":"1"}" "putportphbk": Import failed "{"res" : "error", "msg" : "configuration file not found"}" "savephbk": Save successful "{"res": "success"}" 2. callbackFunction(data) will process the data returned from HTTP GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 21 of 40...
"getmessage" id: "-1" format: "json" jsoncallback: "?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) For example: http://192.168.121.230/manager?action=getmessage&id=-1&for GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 22 of 40...
Parameters in wrong format (GMI version 9 or newer) "{"res" : "error", "msg" : "wrong format"}" Database operation error (GMI version 9 or newer) "{"res" : "error", "msg" : "0"}" GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 23 of 40...
"removemessage" ID: "1" flag: "1" format: "json" jsoncallback: "?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 24 of 40...
//P value key; //nvram address (P parameter) The ConfItem list is as follows: UpgradeConf ConfItem updaterule ConfItem updatevia ConfItem firpath ConfItem confpath ConfItem firpre ConfItem firpost ConfItem confpre ConfItem confpost GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 27 of 40...
Page 29
Confpath: Config Server Path Firpre: Firmware File Prefix Firpost: Firmware File Postfix Confpre: Config File Prefix Confpost: Config File Postfix dhcp66: DHCP Option 66 0------No Override Server 1------Yes Autoup: Automatic Upgrade 0------No 1------Check GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 28 of 40...
Page 30
AJAX and JQuery) For example: http://192.168.121.230/manager?action=put&var-0000=238&val- 0000=0&var-0001=212&val-0001=1&format=json&jsoncallback= 2. Upgrade url: http://" + ip +"/manager?" action: "upgrade" var-0000: 238 //Key. P238 is for automatic upgrade GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 29 of 40...
//Key val-0001: var2 //Value ..var-xxxx val-xxxx format: "json" jsoncallback: "?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 30 of 40...
1. HTTP request return: Return Successful "{"res": "success", "7044":"1", "904":"15"}" Failed "{"res": "error", "msg":"new memory failed or no value"}" 2. callbackFunction(data) will process the data returned from HTTP request GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 31 of 40...
Check IP Address Location LastMF Last.FM MediaPlay Media Player MovieTrailer Movie Trailer NewsVideos News Video Phanfare Phanfare Photobucket Photobucket Camera Qchecker Game SlideShowApp Slides show Game Solitaire System Information SystemInfo System Settings SystemSetting GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 32 of 40...
35. closeService(name, callbackFunction) Description Close an application (GMI 8) name —— application name (2.34-Application List) Parameters callbackFunction: Call back function url —— "http://" + ip +"/manager?" Http Request GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 33 of 40...
+ ip +"/manager?" action: "gmiVersion" For example: http://192.168.121.230/manager?action=gmiVersion Return GMI Version number. For example, 6. The version number increases by 1 on each new GMI version. GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 35 of 40...
"phoneMem" funcname: process name format: "json" jsoncallback: "?" (This is the HTTP request for the call back function, usually used in AJAX and JQuery) For example: GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 36 of 40...
7: CALL_ENDING. Call is being ended 8: CALL_FAILED. Call cannot be established 9: CALL_TRANSFER. Call is being transferred 10: CALL_CONFERENCE. In conference 11: CALL_PAGING 12: CALL_RINGBACK. Ringback GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 37 of 40...
Get via json with jsoncallback, the results should be: Return jsoncallback(S), jsoncallback are callback Function names. Return values are json type strings,list below: {"res" : "success", "msg": "SetupGuide,SystemSetting"} Minimized applications have setup wizard and system settings. GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 38 of 40...
Return HTTP request return: "{"res" : "success"}" "{"res" : "error", "msg": "the point out of screen" }" callbackFunction(data) will process the data returned from HTTP request GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 39 of 40...
Need help?
Do you have a question about the GXV3240 and is the answer not in the manual?
Questions and answers