OpenVox Document Center OpenVox Document Center
  • Home 
  • Products 
  • Solutions 
  • Resources 
    • Document Center 
    • Datasheets 
    • Firmwares 
    • Videos 
  • Partners 
  • Blog 
  • Company 
OpenVox Document Center OpenVox Document Center
OpenVox Document Center
  • Home 
  • Products 
  • Solutions 
  • Resources 
    • Document Center 
    • Datasheets 
    • Firmwares 
    • Videos 
  • Partners 
  • Blog 
  • Company 

Analog Gateway (OIAD)

  • folder icon closed folder iconUser Manual
    • MAG1000 Analog Gateway User Manual
    • iAG801 Analog Gateway User Manual
    • iAG800 Analog Gateway User Manual
    • iAG200/400 Analog Gateway User Manual
    • iAG802 Analog Gateway User Manual
    • MAG1100 Analog Gateway User Manual
    • MAG2000 Analog Gateway User Manual
  • folder icon closed folder iconApplication Notes
    • New version of analog gateway OIAD connected to UC200
    • IAG200/IAG400 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to UC500
    • iAG800 V2 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to 3CX
    • MAG1000 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to Yeastar
    • MAG1100 Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to FreePBX
    • How to connect OIAD Gateway to IMS network(Network mode is bridge)
    • How to connect OIAD Gateway to IMS network(Network mode is route)
  • folder icon closed folder iconFAQ
    • Analog Gateway FAQ
  • folder icon closed folder iconFunctions Guide
    • How to Configure Self-Exchange
    • How to configure OpenVPN
  • folder icon closed folder iconAPI Document
    • 1 Public
    • 2. Authentication management category
    • 3 Network Function Class
    • 4 System Function Classes
    • 5 IAD analogue class
    • 6 IAD digital class
    • 7 IAD General Classes
    • How to use API
    • The API logic between CPU board and Gateway Board on UCP
  • folder icon closed folder iconAuto Provision Guide
    • Auto Provision VOIP Parameters
    • Auto Provision Network Parameters
    • Auto Provision System Parameters
    • Auto Provision for OIAD
loading
Popular Searches
  • Array
  • Array
  • Array
  1. Home
  2. Docs
  3. Analog Gateway (OIAD)
  4. API Document
  5. 4 System Function Classes
Updated on November 7, 2024

Analog Gateway (OIAD)

  • folder icon closed folder iconUser Manual
    • MAG1000 Analog Gateway User Manual
    • iAG801 Analog Gateway User Manual
    • iAG800 Analog Gateway User Manual
    • iAG200/400 Analog Gateway User Manual
    • iAG802 Analog Gateway User Manual
    • MAG1100 Analog Gateway User Manual
    • MAG2000 Analog Gateway User Manual
  • folder icon closed folder iconApplication Notes
    • New version of analog gateway OIAD connected to UC200
    • IAG200/IAG400 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to UC500
    • iAG800 V2 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connected to 3CX
    • MAG1000 OIAD Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to Yeastar
    • MAG1100 Analog Gateway Quick Installation Guide
    • New version of analog gateway OIAD connect to FreePBX
    • How to connect OIAD Gateway to IMS network(Network mode is bridge)
    • How to connect OIAD Gateway to IMS network(Network mode is route)
  • folder icon closed folder iconFAQ
    • Analog Gateway FAQ
  • folder icon closed folder iconFunctions Guide
    • How to Configure Self-Exchange
    • How to configure OpenVPN
  • folder icon closed folder iconAPI Document
    • 1 Public
    • 2. Authentication management category
    • 3 Network Function Class
    • 4 System Function Classes
    • 5 IAD analogue class
    • 6 IAD digital class
    • 7 IAD General Classes
    • How to use API
    • The API logic between CPU board and Gateway Board on UCP
  • folder icon closed folder iconAuto Provision Guide
    • Auto Provision VOIP Parameters
    • Auto Provision Network Parameters
    • Auto Provision System Parameters
    • Auto Provision for OIAD

4 System Function Classes

Estimated reading: 37 minutes 175 views

4 System Function Classes

4.1 Information output

4.1.1 Product information /sys_info/oem

This interface is used for the front-end to know the current system constraints and WEB display vendor information, it is recommended to read it once after login and save it continuously.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
platform string netbus (multi-CPU architecture), combined (single-CPU architecture) 230209
firmware_model string Firmware Model
firmware_version string Firmware version
vendor string Publisher’s name (for display only)
website string Publisher’s website (display only)
product string Product name (for display only)
region string Country or area 2-digit code (unknown function)
language string Default language 2-digit code (display only)
model2 string Model number (for display only)
sn string Serial number information 230608
maxslots int Maximum number of slots (numbered from 0), combined thinks there is only slot 0, so maxslots is 1 230209
interface string Physical interface type: analogue, digital 230209
maxspans int Maximum number of SPANs per slot (numbering starts at 1, analogue is always 1) 230209
maxchannels int Maximum number of channels per SPAN (numbered from 1) 230209
maxprofiles int Maximum number of allowed policies (numbered from 0)
fxs_enable string Whether the device has fxs, value is yes or no 230613
fxo_enable string Whether the device has fxo, value is yes or no 230613
maxacls int Maximum number of ACL whitelist lists
maxlocalswitchlist int Maximum number of rules for self-swap
maxdigitmaprule int Maximum number of rules per digraph strategy
maxcallrouterule int Maximum number of call routing rules 230309
maxroutelist int Maximum number of static routing rules 220902
maxfirewallrules int Maximum number of firewall rules 220906
fxo_groupstart int FXO grouping start numbering 221208
fxo_groupmax int Total number of FXO groups 221208
mac_str string Primary mac address 230228
extraface string Extended interface parameters. Digital trunking for bri or t1e1 230303
maxsiptrunk int Maximum number of trunks (valid only if interface is digital) (numbering starts from 0) 230309
product_id string Motherboard Hardware Version 230815
vendor_cn string Publisher Chinese 231121
style string Menu Style Style 231121

Request Example

Post:/controller/sys_info/oem 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_info/oem", "msg": "", "code": 200, "data": { "vendor": "OpenVox", "website": "www.openvox.cn", "product": "OpenVox IAD Series", "region": "zh", "language": "cn", "model2": "iAG800 V2-4S4O", "sn": "AG10S1234596", "address": "", "tel": "", "fax": "", "email": "", "maxslots": 1, "interface": "analog", "maxspans": 1, "maxchannels": 8, "firmware_model": "iac-v14", "firmware_version": "r0-4bdc68d4", "platform": "combined", "maxprofiles": 4, "fxs_enable": "yes", "fxo_enable": "yes", "maxacls": 16, "maxlocalswitchlist": 64, "maxdigitmaprule": 64, "maxcallrouterule": 64, "maxroutelist": 64, "maxfirewallrules": 64, "maxdomainparselist": 0, "fxo_groupstart": 4, "fxo_groupmax": 60, "mac_str": "FFFFFFFFFFFF", "extraface": "", "maxsiptrunk": 6, "product_id": "2", "vendor_cn": "深圳市开源通信有限公司", "style": "blue" } }

4.1.2 System status /sys_info/performance

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
uptime int System run time (in seconds) 20220811
processor_total int Processor full value
processor_idle int Processor Idle Value
memory_total int Total memory capacity (KB)
memory_idle int Memory free(KB)

Request Example

Post:/controller/sys_info/performance 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_info/performance", "msg": "", "code": 200, "data": { "uptime": 380, "processor_total": 391, "processor_idle": 389, "memory_total": 120608, "memory_idle": 37172 } }

4.1.3 Interface board /sys_info/interface

  • This interface should not be skimped on reading when needed, as it is the only interface that knows if the interface (interface board) hardware is present and if the parameters are correct.

Client→Server Request

KEY VAL REQ DEF Remark Renew
slotnum int Y – Slot number Format: not null, note limitations, invalid error report 240520

Server→Client Response

DATA_SUBKEY VAL Default Remark
uptime int The current system uptime, used as a reference, when the interface board uptime more than 30 seconds did not update, then the interface board is considered to not exist
interface array Interface board basic information Format [{IFACEKV}…], refer to “IFACEKV”. Reference “IFACEKV”.
voip_port array Default assigned port situation Format: {VOIPPORTKV}
IFACEKV VAL Default Remark Renew
slotnum int slot number
uptime int Interface board data update time
model string Interface Board Firmware Model
version string Interface Board Firmware Version
interface string Physical interface types supported by the interface board
product_id string Interface Board Hardware Version 230815
macaddr string Interface board mac address 231221
dahdi_scan json-string Interface board interface information Format: [{SPAN:DETAILS}…] Analogue and digital boards are not the same, please test them practically. Note that SPAN
dahdi_port json-string Port status information Format: [{SPAN:DETAILS}…] Analogue and digital boards are not the same, please test them actually. Note that SPAN
sip_register json-string SIP registration information Format: [{XXX:DETAILS}…] Analogue and digital boards are used differently, please test them actually.
dahdi_analog json-string Analogue board port offhook status {channel:status} Example data {“1”: “Onhook”, “2”: “Offhook”, “3”: “Onhook”} 230224
voltage json-string Port voltage Format: {channel:voltage} Example data {“1”: “47”, “2”: “45”, “3”: “47”} 240313
VOIPPORTKV VAL Default Remark Renew
sip_start int SIP assignable port start number
sip_end int SIP assignable port end number
rtp_start int RTP usable port start number
rtp_end int RTP can use the end-of-port number
udptl_start int UDPTL can use the port start number
udptl_end int UDPTL can use the end-of-port number
sip_anonymous int SIP anonymous port number
sip_channel_start int SIP channel mode port number 221208
sip_group_start int SIP packet mode port number 221208
sip_other_start int SIP other port number 221208

Request Example

Post:/controller/sys_info/interface 
Host:172.16.6.79 
Raw:{"token":"5afd7fb2fe22373f11325f49436969ff","slotnum":0}

Response Example

{ "uri": "sys_info/interface", "msg": "", "code": 200, "data": { "uptime": 180861, "interface": [ { "slotnum": 0, "uptime": 180860, "model": "iac-v14", "version": "r0-4bdc68d4", "product_id": "2", "interface": "analog", "dahdi_scan": "{\"1\":{\"basechan\":\"1\",\"totchans\":\"8\",\"type\":\"analog\",\"port\":{\"1\":\"FXO\",\"2\":\"FXO\",\"3\":\"FXO\",\"4\":\"FXO\",\"5\":\"FXS\",\"6\":\"FXS\",\"7\":\"FXS\",\"8\":\"FXS\"},\"slic\":{\"1\":\"O0\",\"2\":\"O0\",\"3\":\"O0\",\"4\":\"O0\",\"5\":\"S1\",\"6\":\"S1\",\"7\":\"S3\",\"8\":\"S3\"}}}", "dahdi_port": "{\"1\":{\"1\":\"FXSLS (In use) RED (EC: G168V2 - INACTIVE)\",\"2\":\"FXSLS (In use) RED (EC: G168V2 - INACTIVE)\",\"3\":\"FXSLS RED (EC: G168V2 - INACTIVE)\",\"4\":\"FXSLS RED (EC: G168V2 - INACTIVE)\",\"5\":\"FXOLS (In use) (EC: G168V2 - INACTIVE)\",\"6\":\"FXOLS (In use) (EC: G168V2 - INACTIVE)\",\"7\":\"FXOLS (In use) (EC: G168V2 - INACTIVE)\",\"8\":\"FXOLS (In use) (EC: G168V2 - INACTIVE)\"}}", "sip_register": "{\"6reg\":\"Rejected (exp. 11597s ago)\"}", "dahdi_analog": "{\"5\":\"Onhook\",\"6\":\"Onhook\",\"7\":\"Onhook\",\"8\":\"Onhook\"}", "macaddr": "", "voltage": "{\"1\":\"1\",\"2\":\"1\",\"3\":\"1\",\"4\":\"1\",\"5\":\"48\",\"6\":\"48\",\"7\":\"48\",\"8\":\"48\"}", "dahdi_digital": [] } ], "voip_port": { "sip_start": 30000, "sip_end": 30071, "sip_channel_start": 30000, "sip_group_start": 30008, "sip_other_start": 30068, "sip_anonymous": 30068, "rtp_start": 10000, "rtp_end": 10023, "udptl_start": 10024, "udptl_end": 10031 } } }

 

4.1.3 CDR status /sys_info/cdr

  • The data is only available if the cdr function is turned on

Client→Server Request

KEY VAL REQ DEF Remark Renew
slotnum int Y – Slot number Format: not null, note limitations, invalid error report 240520
limit string N unoccupied Quantity Format: null (unlimited) or numeric length limit 0-8 240520
source_tpl string N unoccupied Associated source_tpl (refer to worker.md) Format: empty (none) Length 0-32 240520
source string N unoccupied Associated source (refer to worker.md) Format: empty (none) Length 0-32 240520

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
slotnum int slot number 230317
source_tpl string TPL value 230317
source string SOURCE value 230317
callerid string caller ID 230317
from string caller ID 230317
from_channel string primary call channel 230317
to string called number 230317
to_channel string called channel 230317
disposition string Call status Format: “NO ANSWER” FAILED BUSY ANSWERED CONGESTION UNKNOWN 230317
start string Call start time 230317
answer string response time 230317
end string Overall end time 230317
billsec string Length of response time 230317

Request Example

Post:/controller/sys_info/cdr 
Host:172.16.6.79 
Raw:{"slotnum":0,"limit":"","source_tpl":"","source":"","token":"abc18525e6fe2d4ecba0438c96494007"}

Response Example

{"uri":"sys_info/cdr","msg":"","code":200,"data":[]}

4.1.4 Package detection /sys_info/package

Client→Server Request

KEY VAL REQ DEF Remark Renew
name string N – Package name Format: Length 1-64 240520

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
name string – Package name Format: empty means not found 230415
version string – Package version e.g. 1.0-1 230415

Request Example

Post:/controller/sys_info/package
Host:172.16.6.79
Raw:{"name":"icvp-snmp","token":"abc18525e6fe2d4ecba0438c96494007"}

Response Example

{ "uri": "sys_info/package", "msg": "", "code": 200, "data": { "name": "icvp-snmp", "version": "1.0-1\n" } }

4.1.5 API queries /sys_info/api

Client→Server Request

KEY VAL REQ DEF Remark Renew
class_name string N unoccupied API class name Format: length 0-64 0 means all classes 240520

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
api array – API return information Format {CLASS=>[0,1…]} 230415

Request Example

Post:/controller/sys_info/api 
Host:172.16.6.79 
Raw:{"token":"abc18525e6fe2d4ecba0438c96494007","class_name":"net_wan"}

Response Example

{ "uri": "sys_info/api", "msg": "", "code": 200, "data": { "api": { "net_wan": [ { "method": "set", "type": "general", "backup": "no", "backup_api": "/" }, { "method": "get", "type": "general", "backup": "yes", "backup_api": "get/set" } ] } } }

4.1.6 Cloud Management Getting System Status /sys_info/device_info

Note: Cloud Management gets the system status as a whitelist function, allowing access without forensic information.

Note: No token is required to access this interface

Note: To prevent hacker DDOS attack, processing request random delay 0-2s

Client→Server Request

Server→Client Response

KEY VAL Default Remark Renew
device_sn string product key (software) 230601
product string Diethylammonium chloride 230601
product_id string Motherboard Hardware Version 240227
vendor string Publisher Name 231108
website string Publisher’s website 231108
region string Country or region 2-digit code 231108
language string Default language 2-digit code 231108
platform string Architecture Type 230601
device_model string Product Model 230601
firmware_model string Firmware Model 230601
firmware_version string Firmware version 230601
mac_str string MAC address 230601
device_ip string Device IP 230601
interface string physical interface 230601
os_time string system time 230601
uptime string runtime 230601
use_cpu string cpu usage 230601
use_memory string memory footprint 230601
use_storage string storage occupancy 230601

Request Example

Post:/controller/sys_info/device_info 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_info/device_info", "msg": "", "code": 200, "data": { "device_sn": "AG10S1234596", "product": "OpenVox IAD Series", "product_id": "2", "vendor": "OpenVox", "website": "www.openvox.cn", "region": "zh", "language": "cn", "platform": "combined", "device_model": "iAG800 V2-4S4O", "firmware_model": "iac-v14", "firmware_version": "r0-4bdc68d4", "mac_str": "ffffffffffff", "device_ip": "172.16.6.79", "interface": "analog", "os_time": "1729224724", "uptime": "2385", "use_cpu": "5%", "use_memory": "70%", "use_storage": "4%" } }

4.1.7 web page differential information /sys_info/oem_web

Note: The web page differential information interface is a whitelisted function, allowing access without forensic information.

Note: No token is required to access this interface

Note: To prevent hacker DDOS attack, processing request random delay 0-2s

Client→Server Request

Server→Client Response

KEY VAL Default Remark Renew
device_model string Product Model 231123
vendor string Publisher Name 231123
vender_cn string Publisher Chinese 231123
style string Menu Style Style 231123
i18n_user string i18n Supported Configuration Items 240109

Request Example

Post:/controller/sys_info/oem_web 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_info/oem_web", "msg": "", "code": 200, "data": { "device_model": "iAG800 V2-4S4O", "vendor": "OpenVox", "vendor_cn": "深圳市开源通信有限公司", "style": "blue", "i18n_user": "zh en fr pt th ru", "web_name": "" } }

4.2 Systems management

4.2.1 Upload Permission /sys_maintain/upload_permission

  • Note: This interface is a firmware uploading interface, you can’t call the /upload interface without calling this interface.
  • Note: Uploadable firmware size, 64M RAM <18M, 128M RAM <26M
  • Note: If the current available memory of the device is less than the maximum upload value, the low memory mode will be enabled (at this time, the core service is shut down, and will be turned on again after the /upload upload is completed; if the upload process fails, the device can be restored by manually restarting the device).

Client→Server Request

Server→Client Response

Request Example

Post:/controller/sys_maintain/upload_permission 
Host:172.16.6.79
 Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_maintain/upload_permission", "msg": "", "code": 200, "data": [] }

4.2.2 Upgrading execution /upload

  • Note: You need to call the upload_permission interface to get permission before calling this interface.
    • Device stuck: no permission for upload_permission, device out of memory
    • HTTP 413: Uploading a file that exceeds the maximum limit
    • HTTP 500: device out of memory, forced to terminate the upload
  • Note: This interface is a POST form interface, encrypt is multipart/form-data, not a rest api interface.
  • Note: Please refer to “Firmware Upload Test Results” in the appendix.

Client→Server Request

POST_NAME POST_TYPE Default Remark Renew
type text – Upload file type Format: controller interface Note: interface can only be called if the device is in netbus mode 221117
binary file – POST files of type file 221117
keep_sys text no Retain system configuration Format: yes/no 221117

Server→Client Response

KEY VAL Default Remark Renew
msg string unoccupied Return to text content 221117
code int – Returns the code, which conforms to API-defined standards 221117

Request Example

Post:/upload 
Host:172.16.6.79 
content-type:multipart/form-data 
type:controller 
Keep_sys: yes 
Binary: (binary)

Response Example

{"msg":"Upgrading Firmware","code":200}

4.2.3 System Reboot /sys_maintain/sys_reboot

The interface reboots the system at 0.1 second intervals after the return. For netbus mode, the interface board will reboot after the master reboot.

Client→Server Request

Server→Client Response

Request Example

Post:/controller/sys_maintain/sys_reboot 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_maintain/sys_reboot", "msg": "", "code": 200, "data": [] }

4.2.4 Restore factory /sys_maintain/sys_reset

Reset overlay, flush disc buffers, and reboot.

Client→Server Request

Server→Client Response

Request Example

Post:/controller/sys_maintain/sys_reset
 Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_maintain/sys_reset", "msg": "", "code": 200, "data": [] }

4.2.5 Backup Restore /sys_maintain/backup_restore

Note: The recovery is executed in the background, when executed immediately return success, such as encountered file does not exist, the recovery will not be real execution. Note: The backup data may contain MAC address, if cross-device recovery to other devices, you need to modify the data to delete the MAC to avoid MAC address pollution.

Client→Server Request

KEY VAL REQ DEF Remark Renew
action int Y – Action Type Format: 0 (no action) 1 (local backup generation) 2 (local backup recovery) 240521

Server→Client Response

Request Example

Post:/controller/sys_maintain/backup_restore 
Host:172.16.6.79 
Raw:{"token":"f3c91957fae2cece636ba9418448ba82","action":0}

Response Example

{ "uri": "sys_maintain/backup_restore", "msg": "", "code": 200, "data": [] }

4.2.6 Backup upload /sys_maintain/backup_upload

Note: Uploading a backup file will overwrite the local backup

Client→Server Request

KEY VAL REQ DEF Remark Renew
backup_data string Y – Backup data (base64 data) Format: length 16-524288 (approx. 512K max.) 240521

Server→Client Response

Request Example

Post:/controller/sys_maintain/backup_upload 
Host:172.16.6.79 
Raw:{"backup_data":"IyB1bml4dGltZTogMTcyOTIzMjY2NwojIHBsYXRmb3JtOiBjb21iaW5lZAojIGludGVyZmFjZTogYW5hbG9vWUpXV1N3WklKd290NndsU1Jac00xOEJmQ1B3UWJWY0ZZK3pkSFVcL0IxaEJqTXhIcVh2NUZ6bk9mN0xpXG5Ncm5NTG4xSHRNZTJHSzE4NFI1eEJ0c1hBZ01CQUFHamdZShow more

Response Example

{"uri":"sys_maintain/backup_upload","msg":"","code":200,"data":[]}

4.2.7 Backup download /sys_maintain/backup_download

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
backup_data string – Backup data (base64 data) Format: length 16-524288 (approx. 512K max.) 230412

Request Example

Post:/controller/sys_maintain/backup_download 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_maintain/backup_download", "msg": "", "code": 200, "data": { "backup_data": "IyB1bml4dGltZTogMTcyOTIzMjY2NwojIHBsYXRmb3JtOiBjb21iaW5lZAojIGludGVyZmFjZTogYW5hbG9nCiMgbW9kZWw6IGQphcGkgc3lzX3NubXAgc2V0IHsiZW5hYmxlZCI6MCwiaXAiOiIiLCJwb3J0IjoxNjEsInZlcnNpb25zIjoidjEsdjJjIn0KYXBpIGdlbmVyYWwgYXBwbHlfZG8K" } }

4.3 Account management

4.3.1 WEB account password /sys_user/set

  • Note: Accounts with level = admin can be modified in any way without restriction (the original password can be filled in arbitrarily).
  • Note: For accounts with level ! = admin account “original username” can only be filled in by yourself, and verify that the “original password” is correct.
  • Note: CLI account is equivalent to WEB level=admin
  • Note: After the modification, the login of the “original user” will be invalidated and you have to log in again.

Client→Server Request

KEY VAL Default Remark Renew
username string – Original username Format: 4-32 characters
password string – Original password (MD5) Format: 4-32 characters
new_username string – New user name Format: 4-32 characters
new_password string – New password (MD5) Format: 4-32 characters
new_password_confirm string – New password confirmation (MD5) Format: 4-32 characters

Server→Client Response

Request Example

Post:/controller/sys_user/set 
Host:172.16.6.79
 Raw:{"username":"viewer","password":"d41d8cd98f00b204e9800998ecf8427e","new_username":"viewer","new_password":"15e5f374f6c2d8f156ae82f3afcffb9d","new_password_confirm":"15e5f374f6c2d8f156ae82f3afcffb9d","token":"546d4f89975fb768459c012dc60b1c31"}

Response Example

{"uri":"sys_user/set","msg":"","code":200,"data":[]}

4.3.2 WEB account export /sys_user/export

Note: This will only work if you are currently an admin account.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
list array User list Format: [{ULKV}…]. , with reference to “ULKV”. 231102
ULKV VAL Default Remark Renew
username string – User name Format: 4-32 characters 231102
password string – Password (MD5) Format: 4-32 characters 231102
level string – Level data Format: admin, user, viewer 231102

Request Example

Post:/controller/sys_user/export 
Host:172.16.6.79 
Raw:{"token":"eabe9f00c62cec4b4f3e8eef310683c2","list":[{"username":"admin"}]}

Response Example

{ "uri": "sys_user/export", "msg": "", "code": 200, "data": { "list": [ { "username": "admin", "password": "21232f297a57a5a743894a0e4a801fc3", "level": "admin" }, { "username": "user", "password": "202cb962ac59075b964b07152d234b70", "level": "user" }, { "username": "viewer", "password": "15e5f374f6c2d8f156ae82f3afcffb9d", "level": "viewer" } ] } }

4.3.3 WEB account import /sys_user/import

Note: It will only work if you support the execution of the account that is currently the admin identity. Note: Importing an account will completely empty the previous account.

Client→Server Request

DATA_SUBKEY VAL Default Remark Renew
Reference /sys_user/export 231102

Server→Client Response

Request Example

Post:/controller/sys_user/import 
Host:172.16.6.79 
Raw:{"token":"eabe9f00c62cec4b4f3e8eef310683c2","list":[{"username":"admin","password":"admin"}]}

 

Response Example

{ "uri": "sys_user/import", "msg": "", "code": 200, "data": [] }

4.3.4 CLI account passwords /sys_user/cli_passwd_set

Note: CLI passwords cannot be exported because changing passwords is managed by the Linux kernel (for security reasons) and can only be changed, not exported.

Client→Server Request

KEY VAL Default Remark Renew
new_password string – New password (plaintext) Format: 8-32 characters 220914
new_password_confirm string – New password confirmation (plaintext) Format: 8-32 characters 220914

Server→Client Response

Request Example

Post:/controller/sys_user/cli_passwd_set 
Host:172.16.6.79 
Raw:{"new_password":"admin123","new_password_confirm":"admin123","token":"a9ccabc4d2a937147f77dd882b5de113"}

 

Response Example

{"uri":"sys_user/cli_passwd_set","msg":"","code":200,"data":[]}

4.4 System options

4.4.1 Time settings /sys_option/datetime_set

We use the more precise UTC time expression, please refer to internationalisation.md for details.

Client→Server Request

KEY VAL REQ DEF Remark Renew
timezone string N UTC Time zone string, length 64 240522
ntp_enable int N 1 Enable NTP time synchronisation, 1 on, 0 off 240522
ntp_server_list string N unoccupied NTP server address, separated by multiple spaces, length 128 ntp_enable on, can not be empty; other cases can be empty 240522

Server→Client Response

Request Example

Post:/controller/sys_option/datetime_set 
Host:172.16.6.79 
Raw:{"timezone":"UTC-8:00","ntp_enable":1,"ntp_server_list":"pool.ntp.org time.nist.gov","token":"a9ccabc4d2a937147f77dd882b5de113"}

Response Example

{"uri":"sys_option/datetime_set","msg":"","code":200,"data":[]}

4.4.2 Time reading /sys_option/datetime_get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
References /sys_option/datetime_set
timestamp string Current system time
datetime_str string The time string of the set time zone offset, the front-end according to the current language, formatted to display, for example: date=new Date(“2023-07-05T20:24:52”);date.toLocaleString(“zn-CN”); 20230707

Request Example

Post:/controller/sys_option/datetime_get Host:172.16.6.79 Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_option/datetime_get", "msg": "", "code": 200, "data": { "timezone": "UTC-8:00", "ntp_enable": 1, "ntp_server_list": "pool.ntp.org time.nist.gov", "timestamp": 1721120250, "datetime_str": "2024-07-16T16:57:30" } }

4.4.3 Log settings /sys_option/syslog_set

Client→Server Request

KEY VAL REQ DEF Remark Renew
log_ip string N unoccupied Log server address Format: null means not enabled, length 0-63 240522
log_port int N 0 Log Server Port Format: 0 (off) 1-65535 Remarks: Recommended 514 240522
conloglevel int N 0 Kernel log level Format: 8(DEBUG) 7(INFO) 6(NOTICE) 5(WARNING) 4(ERROR) 3(CRIT) 2(ALERT) 1(EMERG) 0(CLOSE) Remarks: 7 is recommended. 240522

Server→Client Response

Request Example

Post:/controller/sys_option/syslog_set 
Host:172.16.6.79 
Raw:{"log_ip":"172.16.6.25","log_port":0,"conloglevel":7,"token":"a9ccabc4d2a937147f77dd882b5de113"}

Response Example

{"uri":"sys_option/syslog_set","msg":"","code":200,"data":[]}

4.4.4 Log reading /sys_option/syslog_get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
References sys_option/syslog_set 220819

Request Example

Post:/controller/sys_option/syslog_get 
Host:172.16.6.79 
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_option/syslog_get", "msg": "", "code": 200, "data": { "log_ip": "172.16.6.25", "log_port": 0, "conloglevel": 7 } }

4.4.5 SSH Settings /sys_option/ssh_set

Note: Returns immediately after execution and is completely effective within a few seconds

Client→Server Request

KEY VAL REQ DEF Remark Renew
enable int N 1 Enable SSH service Format: 0 (cancelled) 1 (enabled) 240522
port int N 3505 SSH service port Format: 100-65535 240522

Server→Client Response

Request Example

Post:/controller/sys_option/ssh_set
Host:172.16.6.79
Raw:{"enable":1,"port":3505,"token":"a9ccabc4d2a937147f77dd882b5de113"}

Response Example

{"uri":"sys_option/ssh_set","msg":"","code":200,"data":[]}

4.4.6 SSH Get /sys_option/ssh_get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
References sys_option/ssh_set 220914

Request Example

Post:/controller/sys_option/ssh_get
Host:172.16.6.79
Raw:{token":"a9ccabc4d2a937147f77dd882b5de113"}

Response Example

{
"uri": "sys_option/ssh_get",
"msg": "",
"code": 200,
"data": {
"enable": 1,
"port": 3505
}
}

4.4.7 HTTP settings /sys_option/http_set

Note: Returns immediately after execution and takes effect completely within a few seconds Note: If it is a REST API you need to make sure that you get a successful return and jump to the new address, otherwise browser caching will cause problems accessing the old ports Note: If the certificate (sys_security/certs_set) has been updated, you need to execute this interface in order for the new certificate to take effect. Note: If the selected certificate is blank or invalid it will result in http startup failure and loss of all http based services, which will need to be fixed by resetting the ssh/serial port.

Client→Server Request

KEY VAL REQ DEF Remark Renew
mode int N 0 HTTP service mode Format: 0 (HTTP) 1 (HTTPS) 2 (Off) 240522
http_port int N 80 HTTP service port Format: 80-65535 240522
https_port int N 443 HTTPS service port Format: 80-65535 240522
https_pem int N 0 PEM certificate selection for HTTPS service Format: 0 (default certificate) 1 2 3 4 240522

Server→Client Response

Request Example

Post:/controller/sys_option/http_set
Host:172.16.6.79
Raw:{"mode":0,"http_port":80,"https_port":443,"https_pem":0,"token":"eebe3fd2aa04905d3c419b3f2e128d27"}

Response Example

{"uri":"sys_option/http_set","msg":"","code":200,"data":[]}

4.4.8 HTTP Get /sys_option/http_get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
References sys_option/http_set 230413

Request Example

Post:/controller/sys_option/http_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_option/http_get",
"msg": "",
"code": 200,
"data": {
"mode": 0,
"http_port": 80,
"https_port": 443,
"https_pem": 0
}
}

4.4.9 Schedule settings /sys_option/schedule_set

Note: If the reboot time is close to the provisioning time, provisioning may fail. It is recommended to set the provision to be executed after startup.

Client→Server Request

KEY VAL REQ DEF Remark Renew
reboot int N 0 Restart schedule Format: 0 (close schedule), 1 (daily), 2 (weekly) 240522
reboot_hour int N 0 (reboot=1/2) Reboot schedule Daily Format: 0-23 (hours) 240522
reboot_dayofweek int N 0 (reboot=2) reboot schedule Weekly format: 0-6 (0 is Sunday) 240522

Server→Client Response

Request Example

Post:/controller/sys_option/schedule_set
Host:172.16.6.79
Raw:{"reboot":1,"reboot_hour":0,"reboot_dayofweek":0,"token":"eebe3fd2aa04905d3c419b3f2e128d27"}

Response Example

{"uri":"sys_option/schedule_set","msg":"","code":200,"data":[]}

4.4.10 Schedule read /sys_option/schedule_get

Client→Server Request

KEY VAL Default Remark Renew
References sys_option/schedule_set 230418

Server→Client Response

Request Example

Post:/controller/sys_option/schedule_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
    "uri": "sys_option/schedule_get",
    "msg": "",
    "code": 200,
    "data": {
        "reboot": 0,
        "reboot_hour": 0,
        "reboot_dayofweek": 0
    }
}

4.4.11 WEB configuration item settings /sys_option/web_set

Note: The i18n_user parameter does not need to be provided in the web page to fill in the configuration items, and is currently only used in CLI mode.

Client→Server Request

KEY VAL REQ DEF Remark Renew
session_user int N 600 WEB Login Timeout Configuration Item Format: 120-3600 Unit (sec) 240522
i18n_user string N – The i18n supports configuration entries Format: 1-64 characters Multiple values separated by spaces, example: “zh en fr pt th ru” 240522

Server→Client Response

Request Example

Post:/controller/sys_option/web_set
Host:172.16.6.79
Raw:{"session_user":"2600","token":"eebe3fd2aa04905d3c419b3f2e128d27"}

Response Example

{"uri":"sys_option/web_set","msg":"","code":200,"data":[]}

4.4.12 WEB CONFIGURATION OPTION GET /sys_option/web_get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
References sys_option/web_set 240109

Request Example

Post:/controller/sys_option/web_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_option/web_get",
"msg": "",
"code": 200,
"data": {
"session_user": 2600,
"i18n_user": "zh en fr pt th ru"
}
}

4.5 Statistical testing

4.5.1 ping test /sys_analysis/ping_do

The results need to be obtained using the /sys_analysis/ping_result interface after the test has been issued.

Client→Server Request

KEY VAL REQ DEF Remark Renew
host string N – Test address Format: 1-63 characters 240514
count int N 5 Number of tests Format: 1-100 240514
size int N 56 Packet length Format: 56-1024 Units (bytes) 240514

Server→Client Response

Request Example

Post:/controller/sys_analysis/ping_do
Host:172.16.6.79
Raw:{"host":"www.baidu.com","count":4,"size":56,"token":"8088a27d325e3a2b73c3447a301ce084"}

Response Example

{"uri":"sys_analysis/ping_do","msg":"","code":200,"data":[]}

4.5.2 ping results /sys_analysis/ping_result

Note: If a ping task has been issued, confirm that the data is ready by calling this interface several times to get the status.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
status int 0 Status Format: 0 None 1 Pending 2 Processing 3 Completed Note: Multiple reads are required after completion (flow data). 230424
result string unoccupied URL to download relative address 230423

Request Example

Post:/controller/sys_analysis/ping_result
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_analysis/ping_result",
"msg": "",
"code": 200,
"data": {
"status": 3,
"result": "/download/ping_result"
}
}

4.5.3 tracert test /sys_analysis/tracert_do

The results need to be obtained using the /sys_analysis/tracert_result interface after the test has been issued.

Client→Server Request

KEY VAL REQ DEF Remark Renew
host string N – Test address Format: 1-63 characters 240514
waittime int N 3 Sets the time to wait for a response message Format: Range 1-10 240514
maxhops int N 30 Setting the maximum number of hops Format: Range 1-255 240514

Server→Client Response

Request Example

Post:/controller/sys_analysis/tracert_do
Host:172.16.6.79
Raw:{"host":"www.baidu.com","waittime":3,"maxhops":30,"token":"8088a27d325e3a2b73c3447a301ce084"}

Response Example

{"uri":"sys_analysis/tracert_do","msg":"","code":200,"data":[]}

4.5.4 tracert results /sys_analysis/tracert_result

If a tracert task has been issued, confirm that the data is ready by calling this interface several times to get the status.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
status int 0 Status Format: 0 None 1 Pending 2 Processing 3 Completed Note: Multiple reads are required after completion (flow data). 230424
result string unoccupied URL to download relative address 230423

Request Example

Post:/controller/sys_analysis/tracert_result
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_analysis/tracert_result",
"msg": "",
"code": 200,
"data": {
"status": 3,
"result": "/download/tracert_result"
}
}

4.5.5 dns test /sys_analysis/dns_do

The results need to be obtained using the /sys_analysis/dns_result interface after the test has been issued.

Note: dns_server does not allow IPv4 addresses starting with 127, if you use OIAD’s own DNS resolution (127.0.0.1), just set dns_server to empty.

Client→Server Request

KEY VAL REQ DEF Remark Renew
host string N – Test address Format: 1-63 characters 240514
dns_server string N unoccupied Domain name servers Format: IPv4 240514

Server→Client Response

Request Example

Post:/controller/sys_analysis/dns_do
Host:172.16.6.79
Raw:{"host":"www.baidu.com","dns_server":"8.8.8.8","token":"8088a27d325e3a2b73c3447a301ce084"}

Response Example

{"uri":"sys_analysis/dns_do","msg":"","code":200,"data":[]}

4.5.6 dns results /sys_analysis/dns_result

If a dns task has been issued, confirm that the data is ready by calling this interface multiple times to get status.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
status int 0 Status Format: 0 None 1 Pending 2 Processing 3 Completed Note: Multiple reads are required after completion (flow data). 230424
result string unoccupied URL to download relative address 230423

Request Example

Post:/controller/sys_analysis/dns_result
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_analysis/dns_result",
"msg": "",
"code": 200,
"data": {
"status": 3,
"result": "/download/dns_result"
}
}

4.5.7 Network capture /sys_analysis/capture_do

  • The results need to be obtained using the /sys_analysis/capture_result interface after the test has been issued.
  • Note: For netbus mode, it is recommended that the interface be selected only wan

Client→Server Request

KEY VAL REQ DEF Remark Renew
interface string N wan Interface name (basic, logical) Format: wan lan vpn1 mgt 240514
proto string N unoccupied Filter protocol type Format: ip, arp, udp, tcp Null means ignore. 240514
host string N unoccupied Filter Address Format: 0-63 null means ignore 240514
port int N 0 Filter port Format: 0-65535 Ignore when 0 240514
action string N 0 Packet capture action Format: 0 stop 1 start 240514

Server→Client Response

Request Example

Post:/controller/sys_analysis/capture_do
Host:172.16.6.79
Raw:{"interface":"wan","proto":"","host":"","port":0,"action":"0","token":"9fd4c99b853db4fc12cf629cca9ca7e4"}

Response Example

{"uri":"sys_analysis/capture_do","msg":"","code":200,"data":[]}

4.5.8 Network capture /sys_analysis/capture_result

If a capture task has been issued, confirm that the data is ready by calling this interface multiple times to get status.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
status int 0 Status Format: 0 None 1 Pending 2 Processing 3 Completed Note: One-time reading is completed after completion. 230424
result string unoccupied URL to download relative address 230423

Request Example

Post:/controller/sys_analysis/capture_result
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_analysis/capture_result",
"msg": "",
"code": 200,
"data": {
"status": 3,
"result": "/download/capture_result.tar.gz"
}
}

4.5.9 Port recording /sys_analysis/record_do

  • The results need to be obtained using the /sys_analysis/record_result interface after the test has been issued.
  • Note: The recording file format is 8000HZ sample rate, 16-bit, dual-channel (0 for RX, 1 for TX), format PCM16

Client→Server Request

KEY VAL REQ DEF Remark Renew
slotnum int Y – Slot number Format: not null, note limitations, invalid error report 240510
record int N 2 Recording Motion Format: 1 Start 2 Stop 240510
record_channel int N 1 Port number Format: not null, note the restriction, invalid error report 240510
record_limit int N 60 Duration of recording (seconds) Format: 1-300 Note: 300 seconds reaches a capacity of 5MB, and it is recommended that the duration does not exceed 60 seconds. 240510

Server→Client Response

Request Example

Post:/controller/sys_analysis/record_do
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{"uri":"sys_analysis/record_do","msg":"","code":200,"data":[]}

4.5.10 Recording results /sys_analysis/record_result

If a record task has been issued, confirm that the data is ready by calling this interface several times to get the status.

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark Renew
status int 0 Recording status Format: 0 None 1 Recording in progress 2 Recording finished Note: One-time reading is completed when finished. 240510
result string unoccupied URL to download relative address 230424

Request Example

Post:/controller/sys_analysis/record_result
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_analysis/record_result",
"msg": "",
"code": 200,
"data": {
"status": 2,
"result": "/download/record_result.pcm",
"slotnum": 0,
"record_channel": 1,
"record_limit": 60
}
}

4.5.11 Message log /sys_analysis/msglog_do

  • Message logs are a means of displaying communication logs on the page
  • Note: The device is currently written to allow only 2MB of maximum log space. Even if it is changed in the future, it will not allow third-party settings
  • Note: Switching message levels automatically empties the old log data.

Client→Server Request

KEY VAL REQ DEF Remark Renew
slotnum int Y – Slot number Format: not null, note limitations, invalid error report 240531
msglog_level string N disable Message level Single choice: disable, callflow, debug 240531

Server→Client Response

Request Example

Post:/controller/sys_analysis/msglog_do
Host:172.16.6.79
Raw:{"slotnum":0,"msglog_level":"callflow","token":"9fd4c99b853db4fc12cf629cca9ca7e4"}

Response Example

{"uri":"sys_analysis/msglog_do","msg":"","code":200,"data":[]}

4.5.12 Message results /sys_analysis/msglog_result

Client→Server Request

KEY VAL REQ DEF Remark Renew
slotnum int Y – Slot number Format: not null, note limitations, invalid error report 240531
clean string N no Clear old data before getting data Format: yes/no 240531

Server→Client Response

KEY VAL REQ DEF Remark Renew
References /sys_analysis/msglog_do 240531
msglog_result string – unoccupied msg text data content 240531

Request Example

Post:/controller/sys_analysis/msglog_result
Host:172.16.6.79
Raw:{"slotnum":0,"clean":"no","token":"9fd4c99b853db4fc12cf629cca9ca7e4"}

Response Example

{
"uri": "sys_analysis/msglog_result",
"msg": "",
"code": 200,
"data": {
"slotnum": 0,
"msglog_level": "disable",
"msglog_result": "[2024-07-19 12:34:51.969 +0800] Asterisk 16.30.1 built by builder pbx_config successfully loaded 12 contexts (enable debug for details).\n"
}
}

4.6 Security settings

4.6.1 WEB Whitelist Settings /sys_security/acl_web_set

Note: This procedure checks the existence of the environment variable client IP address, if there is, addresses list for the empty array does not do anything, otherwise addresses list has the contents of the test whether it contains the client’s IP, if not, report an error.

Client→Server Request

KEY VAL Default Remark
addresses array [] Format: [{LISTKV}…] Reference to “LISTKV”, empty array means empty Maximum number of sys_info/oem macls.
LISTKV VAL Default Remark
start string – Starting address Format: IPv4
end string unoccupied End address Format: empty means only start, valid IP and start address is in the same range, when the start address is greater than the end address, the start address is automatically used as the end address.

Server→Client Response

Request Example

Post:/controller/sys_security/acl_web_set
Host:172.16.6.79
Raw:{"addresses":[{"start":"172.16.6.1","end":"172.16.6.254"}],"token":"9fd4c99b853db4fc12cf629cca9ca7e4"}

Response Example

{"uri":"sys_security/acl_web_set","msg":"","code":200,"data":[]}

4.6.2 WEB Whitelist Reading /sys_security/acl_web_get

Client→Server Request

Server→Client Response

KEY VAL Default Remark
addresses array – References sys_security/acl_web_set

Request Example

Post:/controller/sys_security/acl_web_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_security/acl_web_get",
"msg": "",
"code": 200,
"data": {
"addresses": [
{
"start": "172.16.6.1",
"end": "172.16.6.254"
}
]
}
}

4.6.3 Certificate Setting /sys_security/certs_set

Note: If the certificate is renewed and happens to be selected by the http service, the http service needs to be restarted Note: If the certificate is renewed then the VOIP service is automatically restarted

Client→Server Request

KEY VAL Default Remark Renew
certs_iad1 string unoccupied Device certificate pem format: length 0-4096 230505
certs_iad2 string unoccupied Device certificate pem format: length 0-4096 230505
certs_iad3 string unoccupied Device certificate pem format: length 0-4096 230505
certs_iad4 string unoccupied Device certificate pem format: length 0-4096 230505
certs_calist string unoccupied CA certificate chain Format: length 0-16384 Remarks: CA certificate chain allows multiple CA certificates to exist. 230505

Server→Client Response

Request Example

Post:/controller/sys_security/certs_set
Host:172.16.6.79
Raw:{"token":"9d1daf1a206e510d051e2dad10b1e70e","certs_iad1":"AjAAMIIBfgYKKwYBBAHWeQIEAgSCAW4EggFqAWgAdgDuzdBk1dsazsVct520zROi"}

Response Example

{
    "uri": "sys_security/certs_set",
    "msg": "",
    "code": 200,
    "data": []
}

 

4.6.4 Certificate Reading /sys_security/certs_get

Client→Server Request

Server→Client Response

KEY VAL Default Remark
References sys_security/certs_set

Request Example

Post:/controller/sys_security/certs_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_security\/certs_get",
"msg": "",
"code": 200,
"data": {
"certs_iad1": "",
"certs_iad2": "",
"certs_iad3": "",
"certs_iad4": "",
"certs_calist": ""
}
}

4.7 Automated deployment

Note: There are two more functions: download local configuration/upload local configuration, which need to be realised by the client (WEB). Please consult Ou Gong and refer to the background code icvp-provision for the principle of realisation.

4.7.1 Automatic Deployment Settings /sys_provision/set

  • Note: After setting the execution conditions the backend will call icvp-provision to work with icvp-cli to achieve automatic deployment.
  • Note: The background provision does not limit the size of the uploaded file, as long as there is still 5M space left in the memory after the upload can be completed (such as insufficient space left in the memory, it will fail).
  • Note: Low memory mode will be enabled if the current available memory on the device is less than the upload maximum (at this point the core service is shut down).
  • The default master firmware file name is: (pre)(current firmware name).img(post)
  • The default interface board firmware file name is: (pre)ixu(mac).img(post)
  • The default configuration file is named: (pre)cfg(mac)(post)
  • Filename format:

a. Length limitation, note that the maximum length of the full name of the file does not exceed 255 b. Limit the use of special characters in the file name [e.g. space (” “), slash (“/”), backslash (“\”), colon (“:”), asterisk (“*”), question mark (“?”), etc.]. double quotes (‘”‘), pointed brackets (“<“, “>”), etc.]

Main firmware INFO file description (20240226 new), INFO file for the firmware description file can be achieved on the firmware upgrade buildversion control

// INFO design description:
// 1. If the main firmware is called iac-v1102.img, then the INFO file is iac-v1102.info
// 2. When the INFO file cannot be obtained, the firmware upgrade will continue to be processed according to the standard procedure
// 3. If the INFO file is in the wrong format, then the firmware upgrade process will be terminated
// 4. Steps of server-side upgrade opening: first copy info, then copy info // 5. Steps of server-side upgrade closing: first delete img, then delete info To turn off the upgrade on the server, delete the img and then delete the info // 6. Examples of INFO contents: copy the info, then copy the img
// 6.
// 6. INFO内容举例,将xx和yy版升级为zz版:
{“firmware_version_filter”:[“xx”,”yy”],”firmware_version_new”:”zz”}
// INFO内容举例,全部升级为zz版:
{“firmware_ version_filter”:[], “firmware_version_new”: “zz”}

Client→Server Request

KEY VAL REQ DEF Remark Renew
auto_switch string N no Auto Deployment Format: no,boot,day,week 240313
auto_hour int N 0 Automatic deployment hours Format: 0-23 240313
auto_dayofweek int N 0 Automatic deployment of days of the week Format: 0-6 (0 is Sunday) 240313
auto_target string N all Auto Deployment Scope Format: all, firmware, config 240313
upgrade_type string N tftp Upgrade method Format: tftp,http,https 240313
upgrade_dhcp string N yes Enable DHCP 66 to automatically override the server address Format: yes/no 240313
upgrade_user string N unoccupied HTTP/HTTPS authentication username Format: 0-32 characters 240313
upgrade_pass string N unoccupied HTTP/HTTPS authentication password Format: 0-32 characters 240313
firmware_url string N unoccupied Firmware upgrade address (without protocol header) Format: 0-64 characters 240313
firmware_pre string N null Firmware file prefix Format: 0-32 characters, file name format 240313
firmware_post string N null Firmware file suffix Format: 0-32 characters, file name format 240313
config_url string N unoccupied Configuration upgrade address (without protocol header) Format: 0-64 characters 240313
config_pre string N null Configuration file prefix Format: 0-32 characters, file name format 240313
config_post string N null Configuration file suffix Format: 0-32 characters, file name format 240313
config_filename string N null Configuration file name Format: 0-32 characters, file name format 240313
Server→Client Response

Request Example

Post:/controller/sys_provision/set
Host:172.16.6.79
Raw:{"auto_switch":"boot","auto_hour":1,"auto_dayofweek":0,"auto_target":"all","upgrade_type":"tftp","upgrade_dhcp":"yes","upgrade_user":"","upgrade_pass":"","firmware_url":"","firmware_pre":"","firmware_post":"","config_url":"","config_pre":"","config_post":"","config_filename":"","token":"9fd4c99b853db4fc12cf629cca9ca7e4"}

Response Example

{"uri":"sys_provision/set","msg":"","code":200,"data":[]}

4.7.2 Automated deployment reads /sys_provision/get

Client→Server Request

Server→Client Response

KEY VAL REQ DEF Remark Renew
Reference /sys_provision/set 240313

Request Example

Post:/controller/sys_provision/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_provision\/get",
"msg": "",
"code": 200,
"data": {
"auto_switch": "boot",
"auto_hour": 1,
"auto_dayofweek": 0,
"auto_target": "all",
"upgrade_type": "tftp",
"upgrade_dhcp": "yes",
"upgrade_user": "",
"upgrade_pass": "",
"firmware_url": "",
"firmware_pre": "",
"firmware_post": "",
"config_url": "",
"config_pre": "",
"config_post": "",
"config_filename": ""
}
}

4.8 SNMP

  • Note: SNMP-related interfaces are only installed by default on ARM platform devices. 7688 platform (iac-v20) counterparts should have icvp-snmp ticked if they want to use it.

4.8.1 SNMP Configuration /sys_snmp/set

Client→Server Request

KEY VAL Default Remark Renew
enabled int 0 Switch Format: 0 (off), 1 (on)
ip string unoccupied Support ip and ip segment Format: 0-18 characters, empty means no restriction on IP access.
port int 161 The open port must be allowed by the firewall, refer to sys_snmp/set Management Station Request Port Format: the default port value is 161, and the range of values is 1025 to 65535.
versions string v2c Version selection Format: v1, v2c, v3, multiple selections separated by commas

Server→Client Response

Request Example

Post:/controller/sys_snmp/set
Host:172.16.6.79
Raw:{"enabled":1,"versions":"v1,v2c","ip":"172.16.6.24","port":161,"token":"deb9ecf630247326ff9e3de6acec5eda"}

Response Example

{"uri":"sys_snmp/set","msg":"","code":200,"data":[]}

4.8.2 SNMP Get /sys_snmp/get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark
References /sys_snmp/set

Request Example

Post:/controller/sys_snmp/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_snmp/get",
"msg": "",
"code": 200,
"data": {
"enabled": 1,
"ip": "172.16.6.24",
"port": 161,
"versions": "v1,v2c"
}
}

4.9 ocloudclient

  • The interface is a plug-in interface, only installed ocloudclient plug-in can be used, you can pass the /sys_info/package interface ocloudclient query

4.9.1 ocloudclient configuration /sys_ocloudclient/set

Client→Server Request

KEY VAL Default Remark Renew
disabled int 0 Switch Format: 0 (on), 1 (off) 230531
server_addr string openvox.cloud Server address Support ip and domain name, length 1~100 230531
server_port int 7000 Open ports must be allowed by the firewall, server port Format: Default port value is 7000, range 1 to 65535. 230531

Server→Client Response

Request Example

Post:/controller/sys_ocloudclient/set
Host:172.16.6.79
Raw:{"disabled":0,"server_addr":"asia-sg.openvox.cloud","server_port":7000,"token":"deb9ecf630247326ff9e3de6acec5eda"}

Response Example

{"uri":"sys_ocloudclient/set","msg":"","code":200,"data":[]}

4.9.2 ocloudclient configuration /sys_ocloudclient/get

Client→Server Request

Server→Client Response

DATA_SUBKEY VAL Default Remark
References /sys_ocloudclient/set

Request Example

Post:/controller/sys_ocloudclient/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_ocloudclient/get",
"msg": "",
"code": 200,
"data": {
"disabled": 0,
"server_addr": "asia-sg.openvox.cloud",
"server_port": 7000
}
}

4.9.3 ocloudclient cloud management bindings /sys_ocloudclient/bind_set

Client→Server Request

KEY VAL Default Remark Renew
bind_code string Cloud Management Binding Code 230531

Server→Client Response

KEY VAL Default Remark Renew
msg string clue 230531
code string 200 is success, not 200 is failure. 230531

Request Example

Post:/controller/sys_ocloudclient/bind_set
Host:172.16.6.79
Raw:{"bind_code":"6b4cd1dd4814409399b28237d8204af5","token":"deb9ecf630247326ff9e3de6acec5eda"}

Response Example

{
"uri": "sys_ocloudclient/bind_set",
"msg": "",
"code": 200,
"data": {
"msg": "Successful operation",
"code": 200v
}
}

4.9.4 ocloudclient get cloud management activation code /sys_ocloudclient/bind_get

Client→Server Request

Server→Client Response

KEY VAL Default Remark Renew
bind_code string Cloud Management Binding Code 230531

Request Example

Post:/controller/sys_ocloudclient/bind_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_ocloudclient/bind_get",
"msg": "",
"code": 200,
"data": {
"bind_code": "6b4cd1dd4814409399b28237d8204af5"
}
}

4.9.5 ocloudclient status query /sys_ocloudclient/status

Client→Server Request

Server→Client Response

KEY VAL Default Remark Renew
msg string Connection status information, web-direct display 230531

Request Example

Post:/controller/sys_ocloudclient/status
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{
"uri": "sys_ocloudclient/status",
"msg": "",
"code": 200,
"data": {
"msg": "login success"
}
}

4.9.6 ocloudclient http configuration changes taking effect interface /sys_ocloudclient/hooks_do

  • For http port and type configuration changes to take effect and restart ocloudclient

Client→Server Request

Server→Client Response

Request Example

Post:/controller/sys_ocloudclient/hooks_do
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}

Response Example

{ "uri": "sys_ocloudclient/hooks_do",
"msg": "",
"code": 200,
"data": {
"msg": "login success"
} }

 

4.9.7 ocloudclient configure xfrpc ssh port /sys_ocloudclient/ssh2_set

Client→Server Request

KEY VAL Default Remark Renew
server_addr string Server address Support ip and domain name, length 1~100 231115
remote_port int port, the value range is 1 to 65535 231115
sign_str string Authentication string, md5(sn+openvox+server_addr+port) 32-bit lowercase format 231115

Server→Client Response

KEY VAL Default Remark Renew
code int 200 for success, 400 or other for failure 231116
msg string Alerts 231116
data json remote_port Set port 231116

Request Example

Post:/controller/sys_ocloudclient/ssh2_set
Host:172.16.6.79
Raw:{"token":"33b9bb139a6436ec308c1f8310410aa2","server_addr":"172.16.6.79","remote_port":7000,"sign_str":"75243cbd8e852d3d413611d90e18b17c"}

Response Example

{
"uri": "sys_ocloudclient/ssh2_set",
"msg": "",
"code": 200,
"data": {
"remote_port": "7000"
}
}

 

Still stuck? How can we help?

Was this page helpful? Yes No

How can we help?

Leave a Comment Cancel reply

CONTENTS

Copyright © 2002-2024 OpenVox all rights reserved.