beautypg.com

Grandstream GXP2200 GMI Web Service Guide User Manual

Page 20

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 19 of 38

"{"res" : "error", "msg": "ID is empty" }"

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

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

Note

If the ctID is the default group ID, it won't be processed.

21. downloadPhonebook(phbkConfigure, flag, callbackFunction)

Description

• Set up phonebook download configurations and download phonebook.xml
• Phonebook download configuration structure

phbkConfigure

{

mode; //Download mode. 0 - OFF; 1 - TFTP; 2 - HTTP

url; //Phonebook download URL

interval; //Automatic download interval

redup; //replace duplicate items. 0 - No; 1 - Yes

clearold; //Clear old list. 0 - No; 1 - Yes

filetype; //Phonebook file format. 0 - XML; 2 - CSV

encode; //Phonebook file encoding format. UTF-8 or GBK

}

Parameters

• phbkConfigure: Phonebook download configuration
• confItem: nvram configuration
• flag(int): 0 - save phonebook configuration; 1 - save phonebook configuration and

download phonebook

• callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "putdownphbk"
• flag: "1" (Save the configuration and download phonebook)
• downMode: "2" (Download mode. 0: OFF, 1: TFTP, 2: HTTP)
• downUrl: Download phonebook URL
• downInterval: "0" (0: no automatic download)
• downReplace: "0" (replace duplicate items, 0: No, 1: Yes)
• downClear: "1" (clear old list, 0: No, 1: Yes)
• downEncode: "UTF-8" (phonebook file encoding format)
• format: "json"