setNewMessage(num, account, text, flag, callbackFunction). Grandstream Networks GXV3275, GXV3240

Add to My manuals
41 Pages

advertisement

setNewMessage(num, account, text, flag, callbackFunction). Grandstream Networks GXV3275, GXV3240 | Manualzz

Return mat=json&jsoncallback=?

1. HTTP request return:

Successful

"{"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"}"

24. setNewMessage(num, account, text, flag, callbackFunction)

Description Send message; save message

Parameters

Http Request

 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

 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)

"{"res" : "error", "msg" : "0"}"

GXV3240/GXV3275 GMI WEB SERVICE GUIDE V1.9 Page 23 of 40

advertisement

Related manuals

advertisement

Table of contents