setNewMessage(num, account, text, flag, callbackFunction). Grandstream Networks GXV3275, GXV3240
Add to My manuals41 Pages
advertisement
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
- 4 OVERVIEW
- 5 GMI WEB SERVICE INTERFACE
- 5 webServiceLogin(ip, username, password, callbckFunction)
- 6 getUptime(callbackFunction)
- 6 getPN(callbackFuntion)
- 7 getHardware(callbackFunction)
- 7 getVendor(callbackFuntion)
- 8 getProduct(callbackFuntion)
- 8 getProductInfo(callbackFunction)
- 9 originateCall(account, isvideo isdialplan, destnum, headerstring, callbackFuntion)
- 10 getNetworkInfo(callbackFunction)
- 10 getAccountInfo(callbackFunction)
- 11 getGroup(gpID, callbackFuntion)
- 12 getContact(ctID, gpID, ctName, callbackFuntion)
- 12 getGroupCount(callbackFuntion)
- 13 getContactCount(callbackFuntion)
- 13 phbkresponse(phbkGroup, callbackFuntion)
- 14 setContact(phbkContact, callbackFuntion)
- 15 removeContact(ctID, callbackFunction)
- 16 clearGroup(gpID, callbackFunction)
- 17 removeGroup(gpID, callbackFunction)
- 17 moveToDefault(ctID, callbackFuntion)
- 18 downloadPhonebook(phbkConfigure, flag, callbackFunction)
- 20 setPhonebook(phbkConfigure, flag, callbackFunction)
- 23 getMessage(id, callFunction)
- 24 setNewMessage(num, account, text, flag, callbackFunction)
- 25 sendDraftMessage(id, callbackFunction)putportphbk
- 25 removeMessage(id, flag, callbackFunction)
- 26 saveMessage(callbackFunction)
- 26 getLastCall(type, callbackFunction)
- 27 removeCall(id, flag, callbackFuntion)
- 28 saveCallHistory(callbackFunction)
- 28 setUpgrade(upgradeConf, reboot, callbackFunction)
- 31 setParameter(confItem[ ], callbackFuntion)
- 32 getParameter(confItem[ ], callbackFuntion)
- 33 launchService(name, arg, callbackFunction)
- 34 closeService(name, callbackFunction)
- 35 grabWindow(path, callbackFuntion)
- 36 touchScreen(x, y, msec, callbackFunction)
- 36 getGMIVersion
- 37 getPhoneStatus
- 37 getPhoneMem
- 38 getcStatus
- 39 EndCall
- 39 getMinPlugins
- 40 swipScreen(start_x, start_y, end_x,end_y, callbackFunction)
- 41 GMIService EXAMPLE
- 41 USING JAVASCRIPT