beautypg.com

Getaccountinfo(callbackfunction), Getgroup(gpid, callbackfunction) – Grandstream GXP2200 GMI Web Service Guide User Manual

Page 11

background image

GXP2200 GMI WEB SERVICE GUIDE V1.0

Page 10 of 38

10. getAccountInfo(callbackFunction)

Description

Retrieve GXP2200 account information

Parameters

callbackFunction: Call back function

HTTP Request

• url: "http://"+ ip + "/manager?"
• action: "accountStatus"
• 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=status&format=json&jsoncallback=?

Return

1. HTTP request return:

{"Response":"Success","Data":[{"Index":"1","Server":"192.168.120.254","Number":"3882

","Status":"1","Activate":"1"},

{"Index":"0","Server":"sip.ipvideotalk.com:48879","Number":"8118263","Status":"1","Activ

ate":"1"},

{"Index":"2","Server":"192.168.121.22","Number":"1001","Status":"1","Activate":"1"}]}

2. String definition:
• Index: The account index. From 0 to 5 for account 1 to account 6. This is the

account index used in originateCall function.

• Server: The SIP server address for the account.
• Number: The account number.
• Status: account status. 0 - unregistered; 1 and 2 - registered; 3 and 5 - dialing; 4 -

ringing; 6 - talking

• Activate: account activated/deactivated. 1 - activated; 0 - deactivated

11. getGroup(gpID, callbackFunction)

Description

Retrieve phonebook group information for group gpID. If gpID is empty, return

information for all groups

Parameters

• gpID: phonebook group ID
• callbackFunction: Call back function