HTTP API - Get Port Information of Gateway
GET https://gateway_ip/api/get_port_info
Request Parameters:
Parameter | Type | Description |
Required Parameter | ||
info_type | Array of Strings | Strings; each string cloud be any of the following strings:
type,imei,imsi,iccid,number,reg,slot,callstate, signal,gprs,remain_credit,remain_monthly_credit,remain _daily_credit,remain_daily_calltime,remain_hourly_call time,remain_daily_connect |
Optional Parameter | ||
port | Array | Port(s) whose information is to be queried
Each port should be an integer ranging from 0 to 31. |
Response Parameters:
Parameter | Type | Description |
error_code | Integer | Codes that may be returned:
200: Request has been processed. 400: Request format is not valid. 500: Other errors |
sn | String | SN of the gateway |
info | Array | Each piece of port information is returned according to the query request;
port: the port which is queried type: could be GSM, CDMA, WCDMA, LTE or UNKNOWN (when type is not recognized) imei: IMEI of this port imsi: IMSI of the SIM card inserted into this port iccid: ICCID of the SIM card inserted into this port number: the mobile number of this SIM card reg: Register status of this port, which could be POWER_OFF, NO_SIM, PIN_REQUIRE, PUK_REQUIRE, UNREGISTER, SEARCHING_NETWORK, REGISTER_OK or UNKNOWN. slot: slot of this port (when the gateway is a multi-sim gateway); slot number ranges from 0 to 3; 255 will be returned when the gateway is not a multi-sim gateway. callstate: the current state of this port, which could be Idle, Processing, Ringing, Active, Alerting, Call Waiting, Call holding or Unknown. signal: signal strenth of this port, ranging from 0 to 31 gprs: gprs which is attached or detached to this port remain_credit: total remain credit of this port remain_monthly_credit: monthly remain credit of this port remain_daily_credit: daily remain credit of this port remain_daily_calltime: daily remain call time of this port remain_hourly_calltime: hourly remain call time of this port remain_daily_connect: daily remain connect times of this port |
Example of Getting Port Information:
Request:
https://gateway_ip/api/get_port_info?port=1,2,3&info_type=imei, imsi,iccid,smsc,type,number,reg,slot,callstate,signal,gprs,rem ain_credit,remain_monthly_credit,remain_daily_credit:,remain_d aily_calltime,remain_hourly_calltime,remain_daily_connect
Response:
{"error_code":200,"sn":"xxxx-xxxx-xxxx-xxxx","info":[
{"port":1,"type":"WCDMA","imei":"863070017005173","imsi":"","iccid":""," smsc":"","number":"","reg":"NO_SIM","callstate":"Idle","signal ":0,"gprs":"detached","remain_credit":"1000.00","remain_monthly_credit":"500.00","remain_daily_credit":"300.00","remain_daily_call_time":"100","remain_hourly_call_time":"10","remain_dail y_connected":"100"},
{"port":2, "type":"GSM","imei":"358967042917201","imsi":"460016529802215", "iccid":"89860114840400428150","smsc":"+8613010868500","number
":"","reg":"REGISTER_OK","callstate":"Idle","signal":0,"gprs": "detached","remain_credit":"1000.00","remain_monthly_credit":" 500.00","remain_daily_credit":"300.00","remain_daily_call_time ":"100","remain_hourly_call_time":"10","remain_daily_connected ":"100"},
{"port":3,"type":"GSM","imei":"358967042917201","imsi":"","iccid":"","smsc":"","number":"","reg":"NO_SIM","callstate":"Idle","signal": 0,"gprs":"detached","remain_credit":"1000.00","remain_monthly_ credit":"500.00","remain_daily_credit":"300.00","remain_daily_ call_time":"100","remain_hourly_call_time":"10","remain_daily_ connected":"100"}]}