Setcontact(phbkcontact, callbackfuntion) – Grandstream GXV3275 GMI Web Service Guide User Manual
Page 15
GXV3240/3275 GMI Web Service v1.9 User Guide
Page 14 of 44
Parameters
• PhbkGroup: Phonebook group information
• callbackFunction: Call back function
Http Request
• URL: "http://"+ ip + "/manager?"
• action: "setgroup"
• groupInfo: gpID::gpName
Note: each field is connected with “::”
• 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=setgroup&groupInfo=1::gran
dstream&format=json&jsoncallback=?
Return
1. HTTP request return:
• Return successful
"{"res": "success", "msg": "1"}" //gpID is "1"
• Return failed
"{"res": "error", "msg" : "can't set group"}"
• groupInfo is empty
"{"res" : "error", "msg": "group information is empty" }"
• Group setup failed
"{"res" : "error", "msg": "set group failed" }"
• groupInfo wrong format
"{"res" : "error", "msg": "wrong format" }"
• Database operation error (GMI version 9 or newer)
"{"res" : "error", "msg": "0" }"
2. callbackFunction(data) will process the data returned from HTTP
request
setContact(phbkContact, callbackFuntion)
Description
• Configure phonebook contact information (edit contact and add
contact)
• Phonebook contact structure
PhbkContact
{
ctID; //Contact ID
ctName; //Contact name
gpID; //Group ID
work; //Work number