beautypg.com

Removecontact(ctid, callbackfunction) – Grandstream GXV3275 GMI Web Service Guide User Manual

Page 16

background image

GXV3240/3275 GMI Web Service v1.9 User Guide

Page 15 of 44

home; //Home number

mobile; //Mobile number

fax; //Fax number

mail; //Email address

}
• If ctID is empty, contact will be added with a ctID in the returned info.

If ctID is existed, contact ctID will be edited

• If contacts need to be added in batch, it is recommended to use

setPhonebook interface to import the contacts

Parameters

• PhbkContact: Contact information
• callbackFunction: Call back function

Http Request

• URL: "http://"+ ip + "/manager?"
• action: "setcontact"
• contactInfo: ctID::ctName::gpID::work::home::mobile::fax::mail

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=setcontact&contactInfo=1::gran
dstream::0::5211::2512::1234::0120::::&format=json&jsoncallback=?

Return

1. HTTP request return:
• Return successful

"{"res": "success", "msg": "1"}" //ctID is "1"

• Return failed

"{"res": "error", "msg" : "can't set contact"}"

• "contactInfo" is empty

"{"res" : "error", "msg": "contact information is empty" }"

• Contact setup failed

"{"res" : "error", "msg": "set contact failed" }"

• "contactInfo" 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

removeContact(ctID, callbackFunction)

Description

Remove contact ctID from phonebook. If ctID is empty, remove all

This manual is related to the following products: