7 IAD General Classes
7 IAD General Classes
- Note: The number of slots available and whether the slot number starts at -1 or 0, refer to sys_info/oem for instructions.
- Note: The policy limits the number, refer to the sys_info/oem description.
7.1 Global functions
7.1.1 Effective acquisition /general/apply_get
- Note: Returns a list of what needs to take effect. This interface is like some routers or some large IAD’s products, when part of the operation is done, their interface will have a button for you to press to take effect (pressing it is executing apply_do).
- Note: It is recommended that the interface automatically call this interface detection at certain intervals and the interface prompts the effective banner, which will take effect after pressing the key to confirm.
- Note: Because there are some ports that have a need to take effect, but other parts do not, in order to simplify the front-end processing, it is the most suitable approach to use an interval to call this interface once
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
Reference /general/apply_set description |
Request Example
Post:/controller/general/apply_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{
"uri": "general/apply_get",
"msg": "",
"code": 200,
"data": {
"network": 0,
"voip": 0
}
}
7.1.2 Effective settings /general/apply_set
- Note: setting through this interface changes the behaviour of apply_do and apply_get
- Note: Mainly used for front-end implementations to force network or VOIP reboot
- Note: If only one parameter is passed to this interface, the other parameters will be ignored (neither 0 nor 1).
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
network | int | 0 | Network modification required to take effect Format: 0 Not required 1 Required | 221114 |
voip | int | 0 | VOIP modification required to take effect Format: 0 Not required 1 Required | 221114 |
Server→Client Response
Request Example
Post:/controller/general/apply_set
Host:172.16.6.79
Raw:{"token":"798529e0b6928706e4c8ce566c55e49f","network":1}
Response Example
{
"uri": "general/apply_set",
"msg": "",
"code": 200,
"data": []
}
7.1.3 Effective implementation /general/apply_do
Note: Execution to take effect will reboot the network or VOIP, and will be modified to 0 when finished
Client→Server Request
Server→Client Response
Request Example
Post:/controller/general/apply_do
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{"uri":"general/apply_do","msg":"","code":200,"data":[]}
7.1.4 Policy Summary /general/profile_get
- Note: This interface is used to read out policy-specific information (profile number and name string)
- Note: Summary of the use of the need to consult the development engineers, such as non-existent need to discuss the development of engineering is to give support!
// The following is a sample policy summary
{“point”: “analog”, “type”: “sip_server”} // Emulates a SIP server
{“point”: “analog”, “type”: “voip”} // Emulates a voip options policy
{“point”: “analog”, “type”:”” port”} // Emulates a port options policy {“point”: “analog”, “type”:””
port”} // Analogue port option policy {“point
“: “analog”, “type”: “digitmap”} // Analogue digitmap policy
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
point | string | – | The location of the policy. Format: analog valid only if sys_info/oem interface is analog digital valid only if sys_info/oem interface is digital |
type | string | – | Policy number Format: described by each policy interface No more than 32 characters |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
list | array | Format: [{‘profile’:”,’name’:”}…] |
Request Example
Post:/controller/general/profile_get
Host:172.16.6.79
Raw:{"token":"798529e0b6928706e4c8ce566c55e49f","point":"analog","type":"sip_server"}
Response Example
{
"uri": "general/profile_get",
"msg": "",
"code": 200,
"data": [
{
"profile": 0,
"name": "模板1"
},
{
"profile": 1,
"name": "sip_server"
},
{
"profile": 2,
"name": "sip_server"
},
{
"profile": 3,
"name": "sip_server"
}
]
}
7.2 Global settings
7.2.1 Fax settings /general_option/fax_set
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
t38_modem | string | v17, v27, v29 | Modem type Format: v17/v27/v29, comma-separated multiple choices possible | |
t38_maxrate | string | 14400 | Maximum rate Format: 14400/9600/7200/4800/2400 When the maximum rate is smaller than the minimum rate, the minimum rate is automatically forced to be used as the maximum rate. | 221001 |
t38_minrate | string | 7200 | Minimum rate Format: 14400/9600/7200/4800/2400 | |
t38_ecm | string | no | Turn on error checking Format: yes/no | |
t38_negotiate_both | string | no | Enable automatic two-way negotiation Format: yes/no | |
t38_detect_timeout | int | 0 | Detect Fax Tone Gateway Mode Duration Format: 0-1000 in s |
Server→Client Response
Request Example
Post:/controller/general_option/fax_set
Host:172.16.6.79
Raw:{"t38_modem":"v17","t38_maxrate":"14400","t38_minrate":"7200","t38_ecm":"no","t38_negotiate_both":"no","t38_detect_timeout":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"general_option/fax_set","msg":"","code":200,"data":[]}
7.2.2 Fax Get /general_option/fax_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Reference to /general_option/fax_set description |
Request Example
Post:/controller/general_option/fax_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{
"uri": "general_option/fax_get",
"msg": "",
"code": 200,
"data": {
"t38_modem": "v17",
"t38_maxrate": "14400",
"t38_minrate": "7200",
"t38_ecm": "no",
"t38_negotiate_both": "no",
"t38_detect_timeout": 0
}
}
7.2.3 QoS settings /general_option/qos_set
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
tos_audio | int | 0 | RTP Audio TOS Value Format: 0-255 | 220915 |
tos_signal | int | 0 | SIP signalling TOS value Format: 0-255 | 220915 |
Server→Client Response
Request Example
Post:/controller/general_option/qos_set
Host:172.16.6.79
Raw:{"tos_audio":"3","tos_signal":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"general_option/qos_set","msg":"","code":200,"data":[]}
7.2.4 QoS Get /general_option/qos_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Refer to /general_option/qos_set description |
Request Example
Post:/controller/general_option/qos_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{
"uri": "general_option/qos_get",
"msg": "",
"code": 200,
"data": {
"tos_audio": 3,
"tos_signal": 0
}
}
7.2.5 VOIP settings /general_option/voip_set
- Note: The port setting method and port will be updated automatically after modifying the port
- Note: The sip_channel_start in the voip assignment is automatically assigned based on the slot (refer to sys_info/interface interface to get the exact assignment of each slotnum)
- Note: digital does not currently support single port mode
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
sip_mode | int | 0 | FXS listening mode for SIP Format: 0 (continuous multi-port) 1 (single port, valid for FXS only) | 230310 |
sip_start | int | 30000 | SIP start port Format: 1000-65000 | 221115 |
sip_unregister_mode | int | 0 | (SIP) SIP logout on device reboot Format: 0 (off) 1 (on) | 230420 |
rtp_start | int | 10000 | RTP start port Format: 1000-65000 Note: Need to be spaced with SIP to avoid overlap, it is recommended that the interval of more than 1W | 221115 |
icesupport | string | no | STUN on for RTP Format: yes/no Note: Configuration must be turned on in sip for this to take effect. | 230504 |
stunaddr | string | unoccupied | STUN address for RTP Format: length 0-63 characters [addr]:[port] Remarks: null is off, port default 3478 | 230503 |
Server→Client Response
Request Example
Post:/controller/general_option/voip_set
Host:172.16.6.79
Raw:{"sip_anonymous":"no","in_ringtime":65,"out_ringtime":65,"user_agent":"OIAD","quick_dnssrv_switch":"no","timer_t1":500,"timer_t2":4000,"allow_tx_hash_in_uri":"no","timers":"yes","timers_min_se":90,"timers_sess_expires":1800,"cadence":["2000,4000","2000,4000","2000,4000","2000,4000","2000,4000","2000,4000","2000,4000","2000,4000","2000,4000","2000,4000"],"sip_cid2":0,"calltimeout":43200000,"net_failover":"yes","early_media":"no","ring_cadence":0,"ring_alert_info":[],"ring_caller_id":[],"g723_rate":"63","ilbc_mode":"30","token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"analog/voip_set","msg":"","code":200,"data":[]}
7.2.6 VOIP Get /general_option/voip_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Reference /general_option/voip_set description |
Request Example
Post:/controller/general_option/voip_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{
"uri": "analog/voip_get",
"msg": "",
"code": 200,
"data": {
"sip_anonymous": "no",
"in_ringtime": 65,
"out_ringtime": 65,
"user_agent": "OIAD",
"quick_dnssrv_switch": "no",
"timer_t1": 500,
"timer_t2": 4000,
"allow_tx_hash_in_uri": "no",
"timers": "yes",
"timers_min_se": 90,
"timers_sess_expires": 1800,
"cadence": [
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000",
"2000,4000"
],
"sip_cid2": 0,
"calltimeout": 43200000,
"net_failover": "yes",
"early_media": "no",
"ring_cadence": 0,
"ring_alert_info": [],
"ring_caller_id": [],
"g723_rate": "63",
"ilbc_mode": "30"
}
}
7.2.7 CDR settings /general_option/cdr_set
Note: For CDR data viewing, please call interface/sys_info/cdr Note: To improve FLASH life, CDR is only retained in memory and lost on reboot
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
cdr_enable | string | no | Enable CDR recording Format: yes/no | 230317 |
cdr_filter | string | ANSWERED | Filtered data Format: empty (no filtering) “NO ANSWER” (no quotes) FAILED BUSY ANSWERED CONGESTION UNKNOWN | 230317 |
cdr_limit | int | 100 | Limit on number of saves Format: range 100-5000 Note: small devices try not to exceed 1000 or they may crash (500KB) 5000 entries (2MB) | 230317 |
action | int | 0 | Action execution format: 0 no action, 1 clear CDR data | 230317 |
Server→Client Response
Request Example
Post:/controller/general_option/cdr_set
Host:172.16.6.79
Raw:{"cdr_enable":"yes","cdr_filter":"ANSWERED","cdr_limit":100,"action":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"general_option/cdr_set","msg":"","code":200,"data":[]}
7.2.8 CDR Get /general_option/cdr_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Refer to /general_option/cdr_set description |
Request Example
Post:/controller/general_option/cdr_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{
"uri": "general_option/cdr_get",
"msg": "",
"code": 200,
"data": {
"cdr_enable": "yes",
"cdr_filter": "ANSWERED",
"cdr_limit": 100,
"action": 0
}
}