beautypg.com

Getparameter(confitem[ ], callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 33

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 32 of 38

Return

1. HTTP request return:
• Configure successful

"{"res": "success", "flag":"1"}"

• Configure failed

"{"res": "error", "msg":"phone rebooting"}"

2. callbackFunction(data) will process the data returned from HTTP request

33. getParameter(confItem[ ], callbackFunction)

Description

• Get 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: "get"
• var-0000: val1 //Key

var-0001: val2 //Key

....

var-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=get&var-0000=7044&var-

0001=904&format=json&jsoncallback=?

Return

1. HTTP request 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