beautypg.com

Savemessage(callbackfunction), Getlastcall(type, callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 27

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 26 of 38

• Remove failed

"{"res" : "error", "msg" : "remove message failed"}"

• Parameters in wrong format (GMI version 9 or newer)

"{"res" : "error", "msg" : "wrong format"}"

27. saveMessage(callbackFunction)

Description

Save message.xml

Parameters

callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "savemessage"
• 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=savemessage&format=json&jsoncallback=

?

Return

HTTP request return:
• Save successful

"{"res": "success"}"

Note

After HTTP request returns saving successful, users could download message.xml to

the phone using the following link:

http://192.168.121.230/message/message.xml

28. getLastCall(type, callbackFunction)

Description

Get the last call log (answered calls, dialed calls or missed calls) entry information

Parameters

• type: Call log type. 0 - answered calls; 1 - dialed calls; 2 - missed calls
• callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "getlastcall"
• type: "1"
• format: "json"
• jsoncallback: "?" (This is the HTTP request for the call back function, usually used in

AJAX and JQuery)