Grandstream GXV3275 GMI Web Service Guide User Manual
Page 26
GXV3240/3275 GMI Web Service v1.9 User Guide
Page 25 of 44
"{"res": "success", "msg" : [{"id" : "15", "number" : "8107314",
"account" : "0", "state", "1", "message" : "hello"}]}"
• Failed
"{"res" : "error", "msg" : "get message failed"}"
• Parameters in wrong format (GMI version 9 or newer)
"{"res" : "error", "msg" : "wrong format"}"
setNewMessage(num, account, text, flag, callbackFunction)
Description
Send message; save message
Parameters
• num: The number to send the message to
• account: Account index
• text: Message content
• flag: Save or send message. 0 - save message to Draft box; 1 -
send message
• callbackFunction: Call back function
Http Request
• URL: "http://"+ ip + "/manager?"
• action: "setnewmessage"
• number: "8107314"
• account: "0"
• content: "hello"
• flag: "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=setnewmessage&number=
8107314&account=0&content=hello&flag=1&format=json&jsoncallba
ck=?
Return
1. HTTP request return:
• Successful
"{"res": "success"}"
• Failed
"{"res" : "error", "msg" : "set new message failed"}"
• Parameters in wrong format (GMI version 9 or newer)
"{"res" : "error", "msg" : "wrong format"}"
• Database operation error (GMI version 9 or newer)