Gmiengine. hangup(), Gmiengine. getstate(), 6 gmiengine. hangup() – Grandstream GXV3140 GMI Guide User Manual
Page 7: 7 gmiengine. getstate()

Grandstream Networks, Inc.
GMI HTML SDK and API Guide
Page 7 of 43
www.grandstream.com
Last Updated: 09/2010
Additional Description:
None
4.6 GMIEngine. hangup()
Function:
GMIEngine.
hangup(cb_hangup)
Purpose:
Used to hang up the current call
Parameter and Return
Value:
Parameter:
cb_hangup— Callback function after the hangup request is sent.
The function prototype is function cb_ hangup (result), ”result” is
the response to the hangup function call.
Return Value:
None
Additional Description:
None
4.7 GMIEngine. getstate()
Function:
GMIEngine.
getstate (acct, cb_get)
Purpose:
Used to obtain the state of the specified account
Parameter and Return
Value:
Parameter:
acct—Specifies the account (starting from 0)
cb_get—Callback function after the gestate request is sent. The
function prototype is function cb_ get (result),”result” is the
response to the getstate function call.
result is a text string in json format. For example, if the
function call is:
GMIEngine.getstate(0, cb_get)
If account 1 is currently in a call on line 1 with 8100100, it
will return the following:
{"Response":"Success","registered":"1","line":"1","line-0“ : ”8100100"};
This specifies that account 1 is registered and using 1
line, it is currently in a call with 8100100 on line 1.
If account 1 is idle, the response will be as follows:
{"Response":"Success","registered": "1", "line": "0"};