beautypg.com

Getcontact(ctid, gpid, ctname, callbackfuntion) – Grandstream GXV3275 GMI Web Service Guide User Manual

Page 12

background image

GXV3240/3275 GMI Web Service v1.9 User Guide

Page 11 of 44

• groupID: ""
• 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=getgroup&groupID=&format=js
on&jsoncallback=?

Return

1. HTTP request return:
• Return successful

"{"res": "success", "msg": [{"groupID":"0","groupName":"default"},

{"groupID":"100","groupName":"blacklist"}]}"

• No groups

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

• Return failed

"{"res": "error", "msg" : "can't get groups information"}"

• Parameters in wrong format (GMI version 9 or newer)

"{"res": "error", "msg" : "wrong format"}"

2. callbackFunction(data) will process the data returned from HTTP

request

Note:

When using this interface, if the interface amount is greater than 12, it

will be exported into text format stored in the phone.

getContact(ctID, gpID, ctName, callbackFuntion)

Description

1. Retrieve contact information
• If ctID is specified but ctName is empty, return the contact ctID
• If ctName is specified, return the contacts which has string ctName

in its name field

• If ctID and ctName are empty but gpID is specified, return all the

contacts in group gpID

• If ctID, ctName and gpID are empty, return all contacts

2. Before using getContact interface, users could get the number of
contacts by getContactCount interface first. If the number of contacts is
more than 20, it is recommended to use setPhonebook interface
instead of getContact interface.

Parameters

callbackFunction: Call back function

Http Request

• URL: "http://"+ ip + "/manager?"
• action: "getcontact"

This manual is related to the following products: