Setparameter(confitem[ ], callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual
Page 32
GXP2200 GMI WEB SERVICE GUIDE V1.0
Page 31 of 38
Return
1. HTTP request return:
• Upgrade setup successful
"{"res": "success", "flag":"1"}"
• Upgrade setup failed
"{"res": "error", "msg":"phone rebooting"}"
2. callbackFunction(data) will process the data returned from HTTP request
32. setParameter(confItem[ ], callbackFunction)
Description
• Phone's configuration (set up video, call and other parameters)
• Configuration item structure. Each configuration item contains two fields with the
following format:
ConfItem
{
value; //P value
key; //nvram address (P parameter)
}
Parameters
• ConfItem: Phone's configuration (array)
• callbackFunction: Call back function
HTTP Request
• url: http://" + ip +"/manager?"
• action: "put"
• var-0000: val1 //Key
val-0000: var1 //Value
var-0001: val2 //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)
• For example:
http://192.168.121.230/manager?action=put&var-0000=7044&val-0000=0&var-
0001=904&val-0001=15&format=json&jsoncallback=?