5 IAD analogue class
5 IAD analogue class
- Note: For the number of slots available, refer to sys_info/oem for instructions.
- Note: For various limited quantities, refer to the sys_info/oem description.
- Note: This class interface can be called only when the current controller is analog, refer to the sys_info/oem description.
- Note: There may be parts of this category of interface settings that have been implemented that need to take effect (/general/apply_do).
5.1 Modelling the global
5.1.1 Driver settings /analog/tel_set
Note: tel includes port global Three-way call fork-tapping rules: (1).threeway_up_only = yes Effect: A –> B, B connects, B taps fork to dial C number, C rings, A plays wait tone; B taps fork again, B resumes call with A, C hangs up (2).threeway_up_only = no Effect: A –> B, B connects, B taps fork to dial C number, C rings, A plays wait tone; B taps fork again, B resumes call with A, C continues to ring; B taps fork again, B resumes call with A, C continues to ring. Threeway_up_only = no effect: A->B, B connects, B taps fork to dial C number, C rings, A plays wait tone; B taps fork again, B resumes the call with A, C continues to ring.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
driver_custom | string | N | unoccupied | (ALL) Driver Extension Parameters Format: up to 64 characters, nullable | 240131 |
opermode | string | N | FCC | (ALL) Line Impedance Matching Optional: FCC, CHINA, BRAZIL, PHILIPPINES, INDONESIA, NIGERIA, INDIA, ARGENTINA, AUSTRALIA | 240131 |
alawoverride | int | N | 0 | (ALL) Line forced alaw encoding (with bugs) Format: 1 forced 0 not forced | 240131 |
fxshonormode | int | N | 1 | (FXS) FXS impedance mode Format: 1 (opermode in effect) 0 (FCC) | 240131 |
boostringer | int | N | 0 | (FXS) High-voltage ringing Format: 0 (off) 1 (on) Note: If opermode is AUSTRALIA, it is automatically set to 1. | 240131 |
fastringer | int | N | 0 | (FXS) Ringing frequency Format: 0 (20Hz) 1 (25Hz) | 240131 |
signaling | string | N | ls | (ALL) Ports signalling: ks(kewlstart) ls(loopstart) | 240131 |
loadzone | string | N | cn | (ALL) LINE AUDIO REGIONAL CODE Optional: us, au, fr, nl, uk, fi, es, jp, no, at, nz, it, us-old, gr, tw, cl, se, be, sg, il, br, hu, lt, pl, za, pt, ee, mx, in, de, ch, dk, cz, cn, ar, my, th. bg, ve, ph, ru, tr, pa, mo, cr, ae | 240131 |
language | string | N | cn | (ALL) Audio Area Codes Optional: at, au, bg, br, be, ch, cl, cn, cz, de, dk, ee, es, fi, fr, gr, hu, id, il, in, it, lt, jp, mx, my, nl, no, nz, ph, pl, pt, ru, se, sg, th, uk, us, us-old , tw, ve, za | 240131 |
pulsedial | string | N | no | (FXO) Use pulse dialling Format: yes/no | 240131 |
ringtimeout | int | N | 8000 | (FXO) Pre-answer hang-up detection Format: 1000-20000 Units ms | 240131 |
waitfordialtone | int | N | 0 | (FXO) Hang-up and then off-hook dial tone detection Format: 0-20000 Units ms | 240131 |
dialtone_detect | int | N | 10000 | (FXO) Dial tone detection duration after off-hook Format: 0-100000 in ms | 240131 |
busycount | int | N | 4 | (FXO) Busy Tone Detection Match Count Format: 1-16 Note: Less than 4 without configuring busypattern may be incorrectly detected. | 240131 |
busypattern | string | N | unoccupied | (FXO) Busy Tone Detection Cadence Format: null (off) Length 0-64 Note: If not set, auto cadence will be used. | 240131 |
cidstart | string | N | ring | (FXO) Caller ID Timing Format: ring,polarity,polarity_IN,dtmf | 240131 |
cidsignalling | string | N | bell | (FXO) Caller ID signal Format: bell,v23,dtmf | 240131 |
dtmfcidlevel | int | N | 256 | (FXO) Incoming DTMF intensity Format: 128-1024 Note: valid only when cidstart=dtmf, too small leakage too large false detection | 240131 |
port_osi | string | N | 500 | (ALL) Open Switching Interval, valid only at kewlstart, used for switching on by changing the voltage, unit ms, range 100-10000 | 240131 |
port_led_reg | string | N | no | (FXS) Interface lamp SIP registration success is always lit Format: yes/no | 240131 |
port_led_idle | string | N | 0,2000 | (FXS) Interface lamp idle time Format: [on,off] Unit ms Remarks: e.g. 0,2000 long off, integer multiple of 100, the sum of two numbers can be divided by 2000, not 2000,2000 | 240131 |
port_led_nobat | string | N | 1000,1000 | When the FXO connector lamp is not wired Format: [on,off] Unit ms | 240131 |
port_led_offhook | string | N | 500,500 | (FXS) Interface lamp removal time Format: [on,off] Unit ms | 240131 |
port_led_ring | string | N | 100,100 | (FXS) Interface lamp ringing time Format: [on,off] Unit ms | 240131 |
port_led_talk | string | N | 500,500 | (FXS) Interface lamp talk time Format: [on,off] Unit ms | 240131 |
port_led_talkend | string | N | 500,500 | (FXS) Interface lamp call end Format: [on,off] Unit ms | 240131 |
dahdi_pulsedial | int | N | 0 | (FXS) Support Pulse Dialing Optional: 0(no)/1(yes) | 240131 |
dahdi_maxpulsetime | int | N | 200 | (FXS) Maxmum Pulse Time Optional: 16-2000 Recommended <=rxminflash | 240131 |
fxs_dialdebounce | int | N | 64 | (FXS) Off-hook detection de-jitter time Optional: 32 (pulse dialling) 64 96 128 | 240131 |
rxflash | int | N | 1250 | (FXS) Maximum Fork Tap Time Optional: 100-3000 units ms | 240131 |
rxminflash | int | N | 40 | (FXS) Minimum Fork Tap Time Optional: 40-2000 units ms Recommended <=rxflash | 240131 |
firstdigit_timeout | int | N | 10000 | (FXS) First Digit Dial Timeout Optional: 1000-40000 Units ms | 240530 |
interdigit_timeout | int | N | 6000 | (FXS) Inter-bit dialling timeout Optional: 1000-20000 units ms | 240530 |
mwi_hz | int | N | 1 | (FXS) Set MWI waveform frequency Selectable: 1,2,4 | 240418 |
jbenable | string | N | no | (ALL) Jitter buffer on Optional: yes/no | 240131 |
jbmaxsize | int | N | 200 | (ALL) Jitter Maximum Buffer Optional: 10-10000 units ms | 240131 |
jbresyncthreshold | int | N | 1000 | (ALL) Jump frame timestamp on jitter resynchronisation Optional: 10-10000 units ms | 240131 |
jbimpl | string | N | fixed | (ALL) jitter buffer method Optional: fixed (static buffer, jbmaxsize only), adaptive (variable buffer) | 240131 |
jbtargetextra | int | N | 40 | (ALL) Jitter variable new buffer size (valid only in ADAPTIVE) for use in case of sudden peak jitter. Optional: 10-10000 units ms | 240131 |
dtmf_to_total_energy | int | N | 35 | (ALL) DTMF total energy scaling factor Optional: 10-100 | 240131 |
dtmf_gsize | int | N | 120 | (ALL) DTMF Sampling Points per Detection Zone Optional: 80-160 | 240131 |
dtmf_threshold | int | N | 80000000 | (ALL) DTMF Energy Threshold Optional: 80000000-2400000000 | 240131 |
transferremote | string | N | yes | (ALL) Call Transfer to Remote Extension Format: yes/no | 240131 |
threeway_up_only | string | N | yes | (ALL) Three-way call tapping rule (table header description) Format: yes/no, front-end not configured | 240520 |
Server→Client Response
Request Example
Post:/controller/analog/tel_set
Host:172.16.6.79
Raw:{"driver_custom":"","opermode":"FCC","alawoverride":0,"fxshonormode":1,"boostringer":0,"fastringer":0,"signaling":"ls","loadzone":"cn","language":"cn","pulsedial":"no","ringtimeout":8000,"waitfordialtone":0,"dialtone_detect":10000,"busycount":4,"busypattern":"","cidstart":"ring","cidsignalling":"bell","dtmfcidlevel":256,"port_osi":"500","port_led_reg":"no","port_led_idle":"0,2000","port_led_nobat":"1000,1000","port_led_offhook":"500,500","port_led_ring":"100,100","port_led_talk":"500,500","port_led_talkend":"500,500","dahdi_pulsedial":0,"dahdi_maxpulsetime":200,"fxs_dialdebounce":64,"mwi_hz":1,"rxflash":1250,"rxminflash":40,"firstdigit_timeout":10000,"interdigit_timeout":6000,"jbenable":"no","jbmaxsize":200,"jbresyncthreshold":1000,"jbimpl":"fixed","jbtargetextra":40,"dtmf_to_total_energy":35,"dtmf_gsize":120,"dtmf_threshold":80000000,"transferremote":"yes","threeway_up_only":"yes","token":"4c9d3afddbaaf6ac2bd5138bd531ac96"}
Response Example
{"uri":"analog/tel_set","msg":"","code":200,"data":[]}
5.1.2 Driver acquisition /analog/tel_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Refer to /analog/tel_set description |
Request Example
Post:/controller/analog/tel_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{
"uri": "analog/tel_get",
"msg": "",
"code": 200,
"data": {
"driver_custom": "",
"opermode": "FCC",
"alawoverride": 0,
"fxshonormode": 1,
"boostringer": 0,
"fastringer": 0,
"signaling": "ls",
"loadzone": "cn",
"language": "cn",
"pulsedial": "no",
"ringtimeout": 8000,
"waitfordialtone": 0,
"dialtone_detect": 10000,
"busycount": 4,
"busypattern": "",
"cidstart": "ring",
"cidsignalling": "bell",
"dtmfcidlevel": 256,
"port_osi": "500",
"port_led_reg": "no",
"port_led_idle": "0,2000",
"port_led_nobat": "1000,1000",
"port_led_offhook": "500,500",
"port_led_ring": "100,100",
"port_led_talk": "500,500",
"port_led_talkend": "500,500",
"dahdi_pulsedial": 0,
"dahdi_maxpulsetime": 200,
"fxs_dialdebounce": 64,
"mwi_hz": 1,
"rxflash": 1250,
"rxminflash": 40,
"firstdigit_timeout": 10000,
"interdigit_timeout": 6000,
"jbenable": "no",
"jbmaxsize": 200,
"jbresyncthreshold": 1000,
"jbimpl": "fixed",
"jbtargetextra": 40,
"dtmf_to_total_energy": 35,
"dtmf_gsize": 120,
"dtmf_threshold": 80000000,
"transferremote": "yes",
"threeway_up_only": "yes"
}
}
5.1.3 VOIP settings /analog/voip_set
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
user_agent | string | N | OIAD | SIP protocol user-agent string Length: 1-64 Note: This parameter cannot be modified when the user_agent_force of UCI is not empty. | 240228 |
quick_dnssrv_switch | string | N | no | Fast DNSSRV switching Format: yes (yes) no (no) | 240418 |
timer_t1 | int | N | 500 | Transmission time T1 value Format: (ms) 100-10000000 | 240131 |
timer_t2 | int | N | 4000 | Transmission time T2 value Format: (ms) 800-10000000 | 240131 |
allow_tx_hash_in_uri | string | N | no | The “#” sign is not escaped Format: yes (yes) no (no) | 240131 |
timers | string | N | yes | Session Timer (RFC4028) support method Format: yes/no/always/required | 240131 |
timers_min_se | int | N | 90 | Session refresh minimum interval Format: (ms) 90-10000000 | 240131 |
timers_sess_expires | int | N | 1800 | Session refresh maximum interval (must be greater than or equal to the minimum value) Format: (ms) 90-10000000 | 240131 |
g723_rate | string | N | 63 | G723 Rate Optional: 63 (6.3kbps encoding rate) 53 (5.3kbps encoding rate) No field if the device does not support G723 codecs | 240223 |
ilbc_mode | string | N | 30 | iLBC frame duration Optional: 20(20ms) 30(30ms) No field if the device does not support iLBC codecs | 240223 |
sip_anonymous | string | N | no | (pjsip_account) Initiates anonymous SIP inbound Format: yes/no | 240131 |
in_ringtime | int | N | 55 | (dialplan) Incoming call wait timeout Optional: 10-1000 units of s | 240131 |
out_ringtime | int | N | 55 | (dialplan) Outgoing wait timeout Optional: 10-1000 units of s | 240131 |
cadence | array | N | – | FXS Distinctive Ringing Table Format: [c1,c2…. .c10], must be 10 entries Data cN format: r1,s1[,r2,s2…. .r8,s8] Total length not to exceed 64 characters | 240202 |
sip_cid2 | int | N | 0 | (dialplan) Calling number display priority: 0 (FROM), 1 (P-Asserted-Identity) | 240131 |
calltimeout | int | N | 43200000 | (FXO) Call Maximum Limit Format: 0-9999999999 Unit ms 0 for unlimited | 240131 |
net_failover | string | N | yes | (FXS) Disconnect Escape Optional: yes/no Remarks: Automatically call out using the FXO port when the network fails or the call times out | 240131 |
early_media | string | N | no | (dialplan) Enable early_media Format: yes (yes) no (no) | 240312 |
ring_cadence | int | N | 0 | (FXS) Distinctive ringing function uses ringing interval matching, selectable:0-10 0 represents cadence without distinctive ringing | 240407 |
ring_alert_info | array | N | – | (FXS) Distinguish ringing function using alert_info match Empty array means empty, quantity limit 5, format [{k1:v1},{k2:v2}] value range 1-10, example data [{“ring2”: “2”},{“ccc”: “4”}] | 240407 |
ring_caller_id | array | N | – | (FXS) Difference ringing function using caller_id matching, caller_id support prefix matching Empty array means empty, the number of limit 5, format [{k1:v1},{k2:v2}] value range 1-10, example data [{“102”: “2”},{“9002”: “7”}] | 240407 |
Server→Client Response
Request Example
Post:/controller/analog/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":"4c9d3afddbaaf6ac2bd5138bd531ac96"}
Response Example
{"uri":"analog/voip_set","msg":"","code":200,"data":[]}
5.1.4 VOIP get /analog/voip_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
user_agent | Note: The value of this parameter is null when the user_agent_force of UCI is not null. | 240228 | ||
Reference /analog/voip_set |
Request Example
Post:/controller/analog/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"
}
}
5.2 Analogue ports
5.2.1 Port actions /analog_port/port_action
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
slotnum | int | – | Slot number Format: not null, note limitations, invalid error report | |
sipid | string | – | String SIP number Format: “channel” for FXS, “group” for FXO. | 220908 |
cmd_register | int | 0 | Corresponding SIP registration action Format: 0 no action, 1 registration, 2 cancellation |
Server→Client Response
Request Example
Post:/controller/analog_port/port_action<br>
Host:172.16.6.79<br>
Raw:{"token":"779e95d003b7f1d94f044c55964c290e","slotnum":"0","sipid":"FXS 5","cmd_register":1}
Response Example
{
"uri": "analog_port/port_action",
"msg": "",
"code": 200,
"data": []
}
5.2.2 Getting port information /analog_port/port_get
- Note: The port configuration data read is the maximum supported data and there are false data
- Note: Always check the result value of sys_info/interface to see if the data is valid.
- For example, for a 1O1S device, it is possible that the FXS has both channel=1 and channel=2 data, while in reality the interface has only channel=1 as FXO, so the reported interface data must be checked.
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
slotnum | int | – | Slot number Format: not null, note limitations, invalid error report | 221208 |
type | string | fxs | Type Format: fxo fxs all | 230515 |
enable | string | unoccupied | Filter number is enable Format: yes/no/empty | 230414 |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
slotnum | int | Slot number Format: not null, note limitations, invalid error report | 221208 | |
fxs | array | FXS table Format: [{POKV}…] Reference to “PSKV”. | 221208 | |
fxo | array | FXO table Format: [{PSKV}…], refer to “POKV”. Reference “POKV”. | 221208 |
PSKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
Refer to the description of analogue_port/fxs_get | 221212 |
POKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
Refer to the description of analog_port/fxo_get | 221212 |
Request Example
Post:/controller/analog_port/port_get
Host:172.16.6.79
Raw:{"slotnum":0,"type":"fxs","token":"e8d530ec3dc890af53a078b7acf45762"}
Response Example
"uri": "analog_port/port_get",
"msg": "",
"code": 200,
"data": {
"slotnum": 0,
"fxs": [
{
"slotnum": 0,
"channel": 1,
"sip_listen_port": 30000,
"enable": "yes",
"fxs_tpl": "iadfxs",
"group": "",
"callwaiting": "yes",
"threewaycalling": "yes",
"transfer": "yes",
"canpark": "yes",
"callerid_name": "",
"cidformat": 3,
"port_profile": 0,
"sip_tpl": "iadfxs",
"callerid_num": "",
"from_user": "",
"auth_username": "",
"auth_password": "",
"register": "yes",
"sip_server_profile": 0,
"voip_profile": 0,
"send_pai": "no",
"send_rpid": "no",
"user_eq_phone": "no",
"hotline_num": "",
"hotline_delaytime": 1,
"dnd": 0,
"digitmap_profile": 0,
"ucf": "",
"bcf": "",
"nacf": "",
"send_pani": "no",
"send_pei": "no"
}
],
"fxo": []
}
}
5.2.3 FXS settings /analog_port/fxs_set
- Detects front-end program detection when enable is yes:
- sys_info/interface Check whether the interface board reported data, uptime time and other parameters are valid and reasonable.
- sys_info/interface Check if SPAN=1 and type is analogue in the dahdi_scan of the data reported by the interface board, and check if the corresponding channel is FXS.
- Detection when enable is no: No need to detect as above.
- The recommended interface has an option to set all ports to disable in bulk for easy operation after replacing the board.
Client→Server Request
KEY | VAL | Default | Remark | renew |
---|---|---|---|---|
slotnum | int | – | Slot number Format: not null, note limitations, invalid error report | |
channel | int | – | Port number Format: not null, note the restriction, invalid error report | |
enable | string | no | Enable port Format: yes/no | |
Primarily used for chan_dahdi_channels | ||||
group | string | unoccupied | (FXS) Port grouping Format: contents 4-63 | 240507 |
callwaiting | string | yes | (FXS) Call waiting support switched via hook-flash Format: yes/no | |
threewaycalling | string | yes | (FXS) 3-way call/talk support (need to enable transfer) Format: yes/no Note: Setting to no will send a fork event to the sip server. | 230420 |
transfer | string | yes | (FXS) Call Forwarding Support (need to enable threewaycalling, auto override canpark) Format: yes/no | |
canpark | string | yes | (FXS) Allow resident support (affected by transfer) Format: yes/no | |
callerid_name | string | unoccupied | (FXS) Display name Format: forbidden ‘”<> Fill in, 32-bit length, nullable | 221209 |
cidformat | int | 3 | (FXS) Configuring Caller ID Format: 1 CID Only,2 Display Name Only,3 Display Name and CID | 231115 |
port_profile | int | 0 | (FXS) Bind PORT policy Format: policy number, non-nullable | |
Primarily used for pjsip_accounts | ||||
callerid_num | string | unoccupied | (FXS/SIP) Account name Format: 32-bit length Note: if empty, register is forced to no | 230515 |
from_user | string | unoccupied | (SIP) FROM mandatory account Format: 32-bit length, null (not mandatory) | 220723 |
auth_username | string | unoccupied | (SIP) Authentication account Format: 64-bit length, null Note: If null, use callerid_num instead | 230515 |
auth_password | string | unoccupied | (SIP) Authentication Password Format: 64-bit length, empty | 220723 |
register | string | yes | (SIP) Enable Registration Format: yes/no | |
sip_server_profile | int | 0 | (SIP) Binding Service Policy Format: policy number, not nullable | |
voip_profile | int | 0 | (SIP) Bind VOIP policy Format: policy number, non-nullable | |
send_pai | string | no | (SIP) Add P-Asserted-Identity header on INVITE Format: yes/no | 230523 |
send_rpid | string | no | (SIP) Add Remote Party ID header when INVITE Format: yes/no | 230523 |
user_eq_phone | string | no | (SIP) Add user=phone header when INVITE Format: yes/no | 230523 |
Mainly for AGI | ||||
hotline_num | string | unoccupied | (AGI Dynamic) Hotline number Format: (0-9a-zA-Z+-#*), empty (closed) Length up to 32 digits | |
hotline_delaytime | int | 1 | (AGI Dynamic) Hotline Delay Wait Format: 0-1000 Unit s | |
dnd | int | 0 | (AGI Dynamic) Enable Do Not Disturb Format: 0 (off) 1 (on) Note: The stutter tone is heard when the phone is off the hook to indicate that Do Not Disturb is in operation. | 230509 |
digitmap_profile | int | 0 | (AGI Dynamic) Bind Number Map Policies Format: policy number, not null, note restrictions, invalid error report | 220729 |
ucf | string | unoccupied | (AGI Dynamic) Unconditional Call Forwarding Number Format: length 0-256 bits Null means off Note: DEVICE/RES method of forwarding is allowed and will be processed directly. such as DAHDI/g0. or resonance DAHDI/1 & DAHDI/2. Note: The phone can still only be set to a 16-bit length. | 240404 |
bcf | string | unoccupied | (AGI Dynamic) Busy Call Forwarding Number Format: Length 0-256 digits Empty means off Note: The phone still can only set the length of 16 digits. | 240404 |
nacf | string | unoccupied | (AGI Dynamic) No Answer Call Forwarding Number Format: Length 0-256 digits Null means off Note: The phone can still only be set to 16 digits in length. | 240404 |
send_pani | string | no | (AGI dynamic) Add P-Access-Network-Info header when INVITE Format: yes/no | 230523 |
send_pei | string | no | (AGI dynamic) Add P-Emergency-Info header when INVITE Format: yes/no | 230523 |
Server→Client Response
Request Example
Post:/controller/analog_port/fxs_set
Host:172.16.6.79
Raw:{"slotnum":0,"channel":5,"enable":"yes","callwaiting":"yes","threewaycalling":"yes","transfer":"yes","canpark":"yes","callerid_name":"1000","callerid_num":"1000","from_user":"","cidformat":3,"auth_username":"1000","auth_password":"1000","register":"yes","group":"","hotline_num":"","hotline_delaytime":1,"dnd":0,"port_profile":0,"sip_server_profile":0,"voip_profile":0,"digitmap_profile":0,"ucf":"","bcf":"","nacf":"","send_pai":"no","send_rpid":"no","user_eq_phone":"no","send_pani":"no","send_pei":"no","token":"e8d530ec3dc890af53a078b7acf45762"}
Response Example
{"uri":"analog_port/fxs_set","msg":"","code":200,"data":[]}
5.2.4 FXS get /analog_port/fxs_get
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
slotnum | int | – | Slot number Format: not null, note limitations, invalid error report |
channel | int | – | Port number Format: not null, note the restriction, invalid error report |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
sip_listen_port | int | – | (SIP) SIP signalling port | 221115 |
fxs_tpl | string | – | Template type: iadfxs | 221212 |
sip_tpl | string | – | Template type: iadfxs/anon/iadfxo | 221212 |
Refer to /analog_port/fxs_set description |
Request Example
Post:/controller/analog_port/fxs_get
Host:172.16.6.79
Raw:{"slotnum":0,"channel":"1","token":"e8d530ec3dc890af53a078b7acf45762"}
Response Example
{
"uri": "analog_port/fxs_get",
"msg": "",
"code": 200,
"data": {
"slotnum": 0,
"channel": 1,
"sip_listen_port": 30000,
"enable": "yes",
"fxs_tpl": "iadfxs",
"group": "",
"callwaiting": "yes",
"threewaycalling": "yes",
"transfer": "yes",
"canpark": "yes",
"callerid_name": "",
"cidformat": 3,
"port_profile": 0,
"sip_tpl": "iadfxs",
"callerid_num": "",
"from_user": "",
"auth_username": "",
"auth_password": "",
"register": "yes",
"sip_server_profile": 0,
"voip_profile": 0,
"send_pai": "no",
"send_rpid": "no",
"user_eq_phone": "no",
"hotline_num": "",
"hotline_delaytime": 1,v
"dnd": 0,
"digitmap_profile": 0,
"ucf": "",
"bcf": "",
"nacf": "",
"send_pani": "no",
"send_pei": "no"
}
}
5.2.5 FXO settings /analog_port/fxo_set
- Detects front-end program detection when enable is yes:
- sys_info/interface Check whether the interface board reported data, uptime time and other parameters are valid and reasonable.
- sys_info/interface Check if SPAN=1 and type is analogue in the dahdi_scan of the data reported by the interface board, and check if the corresponding channel is FXO.
- Detects if the channel in the current channel= is already in use by another fxo group and cannot be duplicated.
- Detection when enable is no: No need to detect as above.
- The recommended interface has an option to set all ports to disable in bulk for easy operation after replacing the board.
Client→Server Request
KEY | VAL | Default | Remark | renew |
---|---|---|---|---|
slotnum | int | – | Slot number Format: not null, note limitations, invalid error report | 221208 |
group | string | – | Grouping number Format: not null, note the restriction, invalid error report | 221208 |
enable | string | no | Enable port Format: yes/no | 221208 |
Primarily used for chan_dahdi_channels | ||||
channel | string | unoccupied | (FXO) port Format: multi-port comma separated, length 0-256 Note: port is empty force enable=no Note: avoid channel being present in other enabled fxo’s | 221208 |
port_profile | int | 0 | (FXS) Bind PORT policy Format: policy number, non-nullable | 221208 |
Primarily used for pjsip_accounts | ||||
callerid_num | string | unoccupied | (SIP) Account name Format: 32-bit length Note: if empty, register is forced to no | 230515 |
from_user | string | unoccupied | (SIP) FROM mandatory account Format: 32-bit length, null (not mandatory) | 221208 |
auth_username | string | unoccupied | (SIP) Authentication account Format: 64-bit length, null Note: If null, use callerid_num instead | 230515 |
auth_password | string | unoccupied | (SIP) Authentication Password Format: 64-bit length, empty | 221208 |
register | string | yes | (SIP) Enable Registration Format: yes/no | 221208 |
identify | string | unoccupied | (SIP) IP Direct Table Format: address[:0-65535] Note: comma separated, max 8 entries | 221208 |
identify_prefix | string | unoccupied | (SIP) Called Prefix Format: 32-bit length, nullable | 240219 |
sip_server_profile | int | 0 | (SIP) Binding Service Policy Format: policy number, not nullable | 221208 |
voip_profile | int | 0 | (SIP) Bind VOIP policy Format: policy number, non-nullable | 221208 |
Mainly for AGI | ||||
ip2tel_callee_mode | int | 0 | (AGI) IP2TEL Called Mode Secondary Dialling Format: 0 Disable,1 Enable | 221208 |
ip2tel_callee_policy | string | g | (AGI) IP2TEL Polling Policy Format: g(incremental) G(decremental) r(cyclic incremental) R(cyclic decremental) | 240103 |
tel2ip_callee_mode | int | 1 | (AGI) TEL2IP Called Mode Called Generation Format: 0 Packet Number,1 Port Number,2 Customised | 221208 |
tel2ip_callee | string | unoccupied | (AGI) TEL2IP customised called number Format: length 0-33 bits | 221208 |
callroute_profile | int | 0 | (AGI) Bind Call Routing Policy Format: policy number, non-nullable | 221208 |
Server→Client Response
Request Example
Post:/controller/analog_port/fxo_set
Host:172.16.6.79
Raw:{"slotnum":0,"group":"g4","ip2tel_callee_policy":"g","enable":"yes","channel":"1,2","callerid_num":"","from_user":"","auth_username":"","auth_password":"","register":"no","identify":"","ip2tel_callee_mode":0,"tel2ip_callee_mode":1,"tel2ip_callee":"","port_profile":0,"sip_server_profile":0,"voip_profile":0,"callroute_profile":0,"identify_prefix":"","token":"e8d530ec3dc890af53a078b7acf45762"}
Response Example
{"uri":"analog_port/fxo_set","msg":"","code":200,"data":[]}
5.2.6 FXO Get /analog_port/fxo_get
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
slotnum | int | – | Slot number Format: not null, note limitations, invalid error report |
group | string | – | Grouping number Format: not null, note the restriction, invalid error report |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
sip_listen_port | int | – | (SIP) SIP signalling port | 221208 |
fxo_tpl | string | – | Template type: iadfxo | 221212 |
sip_tpl | string | – | Template type: iadfxs/anon/iadfxo | 221212 |
Refer to /analog_port/fxo_set description |
Request Example
Post:/controller/analog_port/fxo_get
Host:172.16.6.79
Raw:{"slotnum":0,"group":"g4","token":"e8d530ec3dc890af53a078b7acf45762"}
Response Example
{
"uri": "analog_port/fxo_get",
"msg": "",
"code": 200,
"data": {
"slotnum": 0,
"group": "g4",
"sip_listen_port": 30008,
"enable": "yes",
"fxo_tpl": "iadfxo",
"channel": "1,2",
"port_profile": 0,
"sip_tpl": "iadfxo",
"callerid_num": "",
"from_user": "",
"auth_username": "",
"auth_password": "",
"register": "no",
"sip_server_profile": 0,
"voip_profile": 0,
"identify": "",
"identify_prefix": "",
"ip2tel_callee_mode": 0,
"ip2tel_callee_policy": "g",
"tel2ip_callee_mode": 1,
"tel2ip_callee": "",
"callroute_profile": 0
}
}
5.2.7 Port testing /analog_port/port_test
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
slotnum | int | Y | – | Slot number Format: not null, note limitations, invalid error report | 240201 |
channel | int | Y | – | Port number Format: not null, note the restriction, invalid error report | 240201 |
number | string | N | unoccupied | Test number, for O-port use Format: no more than 64 characters, can be empty | 240201 |
Server→Client Response
Request Example
Post:/controller/analog_port/port_test
Host:172.16.6.79
Raw:{"slotnum":0,"channel":1,"number":"1001","token":"e8d530ec3dc890af53a078b7acf45762"}
Response Example
{"uri":"analog_port/port_test","msg":"","code":200,"data":[]}
5.3 Simulation strategies
5.3.1 Service policy settings /analog_profile/sip_server_set
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report | |
name | string | unoccupied | Strategy name Format: 32 characters, nullable | |
media_encryption | string | no | (RTP) Media enable SRTP format: sdes, no | |
media_encryption_optimistic | string | no | (RTP) Media forced SRTP format: yes/no (auto) | |
registration_expiration | int | 3600 | (SIP) Registration expiry time Format: 10-10000 units s | |
registration_retry_interval | int | 30 | (SIP) Registration Retry Interval Format: 0-2147483647 Units s | 240105 |
registration_max_retries | int | 2147483647 | (SIP) Number of registration retries Format: 0-2147483647 | 240105 |
auth_realm | string | * | (SIP) Authentication domain Format: *(peer-based), other, length 1-64 | 220730 |
aor_qualify_frequency | int | 0 | (SIP) Signalling Incoming Heartbeat Time Format: 0-10000 Unit s | 220723 |
aor_qualify_timeout | int | 60 | (SIP) Signalling heartbeat timeout interval Format: 1-10000 units s | 220723 |
aor_authenticate_qualify | string | no | (SIP) qualify authentication Format: yes/no | 220730 |
sip_port_mode | string | udp | (SIP) Signalling port type Format: udp/tcp/tls | 220723 |
primary_ipaddr | string | unoccupied | (SIP) Primary server address Format: (domain name and IP address standard) 63 characters, nullable Note: If primary_ipaddr is null, no SIP configuration is issued. | 230515 |
primary_sip_port | int | 5060 | (SIP) Primary server signalling port Format: 100-65535 | |
second_ipaddr | string | unoccupied | (SIP) Backup server address Format: (domain name and IP address standard) 63 characters, nullable Primary is null second is automatically forced to null | 221001 |
second_sip_port | int | 5060 | (SIP) Standby server signalling port Format: 100-65535 | |
from_domain | string | unoccupied | (SIP) Field to use the specified URI as the From Header Length: 0-64 | 230605 |
external_boundle | string | unoccupied | (SIP) Service Binding Interface (Basic, Logical, Virtual) Format: wan lan vpn1 alias1 alias2 null | 240202 |
outbound_proxy | string | unoccupied | (SIP) Outgoing Proxy Server Format: (address):(port) address is the address or domain name port is the port Length 0-63 null means no | 230427 |
dns_mode | string | unoccupied | (SIP) DNS mode Format: null (automatically recognises A Record or IP) srv (dnssrv mode) | 230223 |
ice_support | string | no | (SIP) Enable STUN for this server Format: yes/no Remarks: You need to configure the STUN address and enable this parameter to make it valid. | 230504 |
method | string | unoccupied | (SIP) TLS version Format: empty (tlsv1) tlsv1 tlsv1_1 tlsv1_2 sslv2 sslv3 ssv23 | 230508 |
tls_uri | int | 0 | (SIP) URI pattern for TLS Format: 0 (SIP) 1 (SIPS) | 230508 |
tls_pem | int | -1 | (SIP) Device certificate PEM selection for TLS Format: -1 (none) 0 (default) 1 2 3 4 | 230508 |
tls_calist | int | -1 | (SIP) CA certificate chain selection for TLS Format: -1 (off) 0 (enabled) | 230508 |
verify_server | string | no | (SIP) UAC behaviour for TLS verifies the validity of the peer’s certificate Format: yes/no | 230508 |
require_client_cert | string | no | (SIP) UAS behaviour for TLS verifies the validity of the counterpart’s certificate Format: yes/no | 230508 |
identify_mode | string | unoccupied | (SIP) compatibility mode, used to identify, can be extended Format: default value empty string, optional header_cidnum | 240117 |
Server→Client Response
Request Example
Post:/controller/analog_profile/sip_server_set
Host:172.16.6.79
Raw:{"name":"模板1","media_encryption":"no","media_encryption_optimistic":"no","registration_expiration":3600,"registration_retry_interval":30,"registration_max_retries":2147483647,"auth_realm":"*","aor_qualify_frequency":0,"aor_qualify_timeout":60,"aor_authenticate_qualify":"no","sip_port_mode":"udp","primary_ipaddr":"172.16.6.99","primary_sip_port":5060,"second_ipaddr":"","second_sip_port":5060,"from_domain":"","external_boundle":"","dns_mode":"","outbound_proxy":"","ice_support":"no","method":"","tls_uri":0,"tls_pem":-1,"tls_calist":-1,"verify_server":"no","require_client_cert":"no","identify_mode":"","profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"analog_profile/sip_server_set","msg":"","code":200,"data":[]}
5.3.2 Service Policy Get /analog_profile/sip_server_get
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Refer to /analog_profile/sip_server_get for instructions. |
Request Example
Post:/controller/analog_profile/sip_server_get
Host:172.16.6.79
Raw:{"profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{
"uri": "analog_profile/sip_server_get",
"msg": "",
"code": 200,
"data": {
"name": "\u6a21\u677f1",
"media_encryption": "no",
"media_encryption_optimistic": "no",
"registration_expiration": 3600,
"registration_retry_interval": 30,
"registration_max_retries": 2147483647,
"auth_realm": "*",
"aor_qualify_frequency": 0,
"aor_qualify_timeout": 60,
"aor_authenticate_qualify": "no",
"sip_port_mode": "udp",
"primary_ipaddr": "172.16.6.99",
"primary_sip_port": 5060,
"second_ipaddr": "",
"second_sip_port": 5060,
"from_domain": "",
"external_boundle": "",
"dns_mode": "",
"outbound_proxy": "",
"ice_support": "no",
"method": "",
"tls_uri": 0,
"tls_pem": -1,
"tls_calist": -1,
"verify_server": "no",
"require_client_cert": "no",
"identify_mode": "",
"profile": 0
}
}
5.3.3 VOIP policy settings /analog_profile/voip_set
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report | |
name | string | unoccupied | Strategy name Format: 32 characters, nullable | |
allow_transfer | string | yes | (SIP) Allow REFER Format: yes/no | |
sip_udptl | string | yes | (SIP) Enable UDPTL Format: yes/no | 220722 |
sip_udptl_ec | string | redundancy | (SIP) UDPTL error correction Format: none/fec/redundancy | 220722 |
dtmf_mode | string | rfc4733 | (RTP) DTMF mode Format: rfc4733 (improves rfc2833), inband (in-band audio), info (signalling send), auto (prioritises rfc4733 over inband), auto_info (prioritises rfc4733 over info) | |
use_ptime | string | no | (RTP) Use the requested coded packing duration Format: yes/no | |
allow | string | ulaw, alaw, g729, g722 | (RTP) Encoding Preferred Format: 1. Multiple options are comma-separated and sequential 2. Default models: ulaw, alaw, g729, g722 3. Optional models are retrieved from available_codecs in voip_get 4. The page removes the packet duration model configuration | 231220 |
voice_frames_per_tx | int | 2 | Speech frame/TX format: selectable 1, 2, 3, 4, 6 | 231220 |
rtp_keepalive | int | 0 | (RTP) Media Revival Transmission Interval Format: 0-10000 units s | |
rtp_timeout | int | 0 | (RTP) Inactive hang time in OFF HOLD Format: 0-10000 Unit s | |
rtp_timeout_hold | int | 0 | (RTP) Inactive hang time in ON HOLD Format: 0-10000 Unit s |
Server→Client Response
Request Example
Post:/controller/analog_profile/voip_set
Host:172.16.6.79
Raw:{"name":"模板1","allow_transfer":"yes","sip_udptl":"yes","sip_udptl_ec":"redundancy","dtmf_mode":"rfc4733","use_ptime":"no","allow":"ulaw,alaw,g729,g722,g723,g726,ilbc,opus,amr,amrwb","rtp_keepalive":0,"rtp_timeout":0,"rtp_timeout_hold":0,"voice_frames_per_tx":2,"profile":0,"available_codecs":"ulaw,alaw,g729,g722,g723,g726,ilbc,opus,amr,amrwb","token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"analog_profile/voip_set","msg":"","code":200,"data":[]}
5.3.4 VOIP Policy Get /analog_profile/voip_get
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report | |
available_codecs | string | – | Optional codecs model Example:ulaw,alaw,g729,g722,g723,g726 | 231220 |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
References /analog_profile/voip_set |
Request Example
Post:/controller/analog_profile/voip_get
Host:172.16.6.79
Raw:{"profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{
"uri": "analog_profile/voip_get",
"msg": "",
"code": 200,
"data": {
"name": "\u6a21\u677f1",
"allow_transfer": "yes",
"sip_udptl": "yes",
"sip_udptl_ec": "redundancy",
"dtmf_mode": "rfc4733",
"use_ptime": "no",
"allow": "ulaw,alaw,g729,g722,g723,g726,ilbc,opus,amr,amrwb",
"rtp_keepalive": 0,
"rtp_timeout": 0,
"rtp_timeout_hold": 0,
"voice_frames_per_tx": 2,
"profile": 0,
"available_codecs": "ulaw,alaw,g729,g722,g723,g726,ilbc,opus,amr,amrwb"
}
}
5.3.5 PORT policy settings /analog_profile/port_set
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report | |
name | string | unoccupied | Strategy name Format: 32 characters, nullable | |
echocancel | string | 128 | (ALL) echo cancellation length (unit ms), front-end implementation, it is recommended to provide only open and close options, no on behalf of the close, read non-no on behalf of the open, (cli is can be set to: 16, 32, 64, 128, no), write open to pass 128 | 231013 |
answeronpolarityswitch | string | no | (ALL) Answer Reverse Pole (FXO receive/FXS generate) Optional: yes/no | |
hanguponpolarityswitch | string | no | (ALL) Pendant Reverse Pole (FXO Receive/FXS Generate) Optional: yes/no | |
rxgain | string | -2.5 | (ALL) Receiving Energy Gain Format: -12.0 to 12.0 in dB | 230426 |
txgain | string | 0.0 | (ALL) Sending Energy Gain Format: -12.0 to 12.0 in dB | |
sendcalleridafter | int | 1 | (FXS) Send Calling Number Method Optional: 0 (before ringing),1 (after first tone),2,3 | |
mwi_enable | string | no | (FXS) Enable MWI Optional: yes/no Note: If callerid_num is not set, it is equivalent to no. | 231124 |
mwitype_number | string | fsk | (FXS) Local number display method Optional: fsk (FSK display) nofsk (off) rpas (FSK sends pulse before display) | 230518 |
mwitype_led | string | no | (FXS) MWI Lighting Message Light Method Optional: no (off) lrev (polarity reversal) hvdc (90V hookup DC) hvac (90V hookup AC) | 230518 |
tx_mwi_sub_enable | string | no | (FXS) Enable MWI subscription Optional: yes/no | 231124 |
tx_mwi_sub_expiry | int | 3600 | (FXS) MWI Subscription Timeout Format: 10-2147483647 | 231124 |
Server→Client Response
Request Example
Post:/controller/analog_profile/port_set
Host:172.16.6.79
Raw:{"name":"模板1","echocancel":"128","answeronpolarityswitch":"no","hanguponpolarityswitch":"no","rxgain":"-2.5","txgain":"0.0","sendcalleridafter":1,"mwi_enable":"no","mwitype_number":"fsk","mwitype_led":"no","tx_mwi_sub_enable":"no","tx_mwi_sub_expiry":3600,"profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"analog_profile/port_set","msg":"","code":200,"data":[]}
5.3.6 PORT Policy Get /analog_profile/port_get
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
References /analog_profile/port_set |
Request Example
Post:/controller/analog_profile/port_get
Host:172.16.6.79
Raw:{"profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{
"uri": "analog_profile/port_get",<br>
"msg": "",<br>
"code": 200,<br>
"data": {<br>
"name": "\u6a21\u677f1",<br>
"echocancel": "128",<br>
"answeronpolarityswitch": "no",<br>
"hanguponpolarityswitch": "no",<br>
"rxgain": "-2.5",<br>
"txgain": "0.0",<br>
"sendcalleridafter": 1,<br>
"mwi_enable": "no",<br>
"mwitype_number": "fsk",<br>
"mwitype_led": "no",<br>
"tx_mwi_sub_enable": "no",<br>
"tx_mwi_sub_expiry": 3600,<br>
"profile": 0
}
}
5.3.7 Digit Map Policy Settings /analog_profile/digitmap_set
- Note: This interface is only used in FXS for number collection.
- Note: This interface is an AGI static function, after the setup needs to have the effective demand
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report | |
name | string | unoccupied | Strategy name Format: 32 characters, nullable | |
priority | int | 0 | Count model Format: 0 local priority 1 remote count map (remote mode hotkey disabled) | 220726 |
match_fail | int | 0 | Incomplete match send number Format: 0 off 1 on | |
sharp_asdial | int | 1 | # key as send Format: 0 No 1 Yes | 221216 |
rules | array | – | (Digit Map Rule) Format: [{RSKV}…]. Reference to “RSKV”, empty array means empty Maxdigitmaprule of sys_info/oem. | |
key_sayip | string | *02 | (SYSKEY) broadcast wan IP address Format: asterisk + XX Length 3 digits | 231204 |
key_saylanip | string | *03 | (SYSKEY) broadcast lan IP address Format: asterisk + XX Length 3 digits | 231204 |
key_saymgtip | string | *04 | (SYSKEY) broadcast mgt IP address Format: asterisk + XX Length 3 digits | 231212 |
key_saychid | string | *97 | (SYSKEY) Announcement of channel number Format: asterisk + XX Length 3 digits | 230509 |
key_sayexten | string | *98 | (SYSKEY) Announcement number Format: asterisk + XX Length 3 digits | 230509 |
enable_key_dnd | int | 0 | (CALLKEY) Do not disturb function Format: 0 (enable) 1 (disable) | 230509 |
key_dnd_on | string | *78 | (CALLKEY) Do Not Disturb Enable Format: asterisk + XX Length 3 digits | 230509 |
key_dnd_off | string | *79 | (CALLKEY) Do not disturb close Format: asterisk + XX Length 3 digits | 230509 |
enable_key_ucf | int | 0 | (CALLKEY) Unconditional call forwarding function Format: 0 (enable) 1 (disable) | 230510 |
key_ucf_on | string | *72 | (CALLKEY) Unconditional Call Forwarding On Format: (asterisk + XX) Length 3 digits Dialling Format: hotkey + number (no more than 16 digits) + well number (e.g. turn on sharp_asdial) | 230510 |
key_ucf_off | string | *73 | (CALLKEY) Unconditional Call Forward Close Format: asterisk + XX Length 3 digits | 230510 |
enable_key_bcf | int | 0 | (CALLKEY) Busy call forwarding function Format: 0 (enable) 1 (disable) | 230510 |
key_bcf_on | string | *90 | (CALLKEY) busy call forwarding on Format: asterisk + XX length 3 digits Dialling format: hotkey + number (no more than 16 digits) + well number (e.g. turn on sharp_asdial) | 230510 |
key_bcf_off | string | *91 | (CALLKEY) Busy Call Forward Close Format: Asterisk + XX Length 3 digits | 230510 |
enable_key_nacf | int | 0 | (CALLKEY) No-answer call forwarding function Format: 0 (enable) 1 (disable) | 230510 |
key_nacf_on | string | *92 | (CALLKEY) No Answer Call Forwarding Enabled Format: asterisk + XX Length 3 digits Dialling Format: hotkey + number (no more than 16 digits) + well number (e.g. turn on sharp_asdial) | 230510 |
key_nacf_off | string | *93 | (CALLKEY) No Answer Call Forward Close Format: asterisk + XX Length 3 digits | 230510 |
RSKV | VAL | Default | Remark |
---|---|---|---|
rule | string | – | Routing rules Format: length 1-33 1.”.” can only appear once. Can only appear once and only at the end 2. “#” can only be at the beginning or end 3. “*” is not restricted 4.”[]” cannot be empty [] 5.”[]” only X-X,Digit,*,#* is allowed in “[] |
Server→Client Response
Request Example
Post:/controller
Host:172.16.6.79
Raw:{"name":"模板1","priority":0,"match_fail":"0","sharp_asdial":"1","rules":[{"rule":"x."}],"key_sayip":"*02","key_saylanip":"*03","key_saymgtip":"*04","key_saychid":"*97","key_sayexten":"*98","enable_key_dnd":"0","key_dnd_on":"*78","key_dnd_off":"*79","enable_key_ucf":"0","key_ucf_on":"*72","key_ucf_off":"*73","enable_key_bcf":"0","key_bcf_on":"*90","key_bcf_off":"*91","enable_key_nacf":"0","key_nacf_on":"*92","key_nacf_off":"*93","profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"analog_profile/digitmap_set","msg":"","code":200,"data":[]}
5.3.8 Digit Map Policy Get /analog_profile/digitmap_get
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Refer to /analog_profile/digitmap_set for instructions. |
Request Example
Post:/controller
Host:172.16.6.79
Raw:{"profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{
"uri": "analog_profile/digitmap_get",
"msg": "",
"code": 200,
"data": {
"name": "\u6a21\u677f1",
"priority": 0,
"match_fail": 0,
"sharp_asdial": 1,
"rules": [
{
"rule": "x."
}
],
"key_sayip": "*02",
"key_saylanip": "*03",
"key_saymgtip": "*04",
"key_saychid": "*97",
"key_sayexten": "*98",
"enable_key_dnd": 0,
"key_dnd_on": "*78",
"key_dnd_off": "*79",
"enable_key_ucf": 0,
"key_ucf_on": "*72",
"key_ucf_off": "*73",
"enable_key_bcf": 0,
"key_bcf_on": "*90",
"key_bcf_off": "*91",
"enable_key_nacf": 0,
"key_nacf_on": "*92",
"key_nacf_off": "*93",
"profile": 0
}
}
5.3.9 Call routing policy settings /analog_profile/callroute_set
- Note: This interface needs to be in effect after setting up.
- Note: This policy only works with FXO ports, the relationship between matching conditions is “and”, and the matching conditions are in order.
- Note: Similar to the iptables design, once a match is made, the match is closed and no further matches are processed.
Client→Server Request
KEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report | 221207 |
name | string | unoccupied | Strategy name Format: 32 characters, nullable | 221207 |
match_fail | int | 0 | (AGI static) Match Failure Handling Format: 1 direct failure 0 direct call | 221207 |
ip2tel | array | – | (AGI static) IP to port Format: [{I2TKV}…]. Reference “I2TKV”, empty array means empty Priority order, quantity limit sys_info/oem maxcallrouterule | 221207 |
tel2ip | array | – | (AGI static) Port to IP Format: [{T2IKV}…], refer to “T2IKV”, empty array means clear Successive order of priority, quantity limit sys_info/oem maxcallrouterule. Reference “T2IKV”, empty array means empty Priority order, quantity limit sys_info/oem maxcallrouterule | 221207 |
IP to Port I2TKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
src | string | unoccupied | Call source device Format: null (ignore)/other (content), length 0-33 | 221215 |
match_callerprefix | string | unoccupied | Calling prefix match Format: empty (ignore)/any (any)/other (content), length 0-33 | |
match_calleeprefix | string | unoccupied | Called prefix match Format: null (ignore)/any (any)/other (content), length 0-33 | |
target | int | 0 | Routing Action Format: 0 deny 1 permit | |
replace_callerdel_prefix | int | 0 | Calling Prefix deletion Format: 0-128 | |
replace_callerdel_suffix | int | 0 | Caller Suffix Deletion Format: 0-128 | |
replace_calleradd_prefix | string | unoccupied | Calling Prefix added Format: null (ignore)/other (content), length 0-33 | |
replace_calleradd_suffix | string | unoccupied | Caller Suffix added Format: null (ignore)/other (content), length 0-33 | |
replace_calleedel_prefix | int | 0 | Called Prefix Deletion Format: 0-64 | |
replace_calleedel_suffix | int | 0 | Called Suffix deletion Format: 0-64 | |
replace_calleeadd_prefix | string | unoccupied | Called Prefix added Format: null (ignore)/other (content), length 0-33 | |
replace_calleeadd_suffix | string | unoccupied | Called Suffix added Format: null (ignore)/other (content), length 0-33 | |
dest | string | unoccupied | Call destination device Format: null (auto)/port number/port grouping number, length 0-33 Note: you can set it arbitrarily or get the number by querying analog_port/port_get Note: if you don’t set it then the default setting prevails | 231229 |
Port to IP T2IKV | VAL | Default | Remark | Renew |
---|---|---|---|---|
src | string | unoccupied | Call source device Format: null (ignore)/other (content), length 0-33 | 221215 |
match_callerprefix | string | unoccupied | Calling prefix match Format: empty (ignore)/any (any)/other (content), length 0-33 | |
match_calleeprefix | string | unoccupied | Called prefix match Format: null (ignore)/any (any)/other (content), length 0-33 | |
target | int | 0 | Routing Action Format: 0 deny 1 permit | |
replace_callerdel_prefix | int | 0 | Calling Prefix deletion Format: 0-128 | |
replace_callerdel_suffix | int | 0 | Caller Suffix Deletion Format: 0-128 | |
replace_calleradd_prefix | string | unoccupied | Calling Prefix added Format: null (ignore)/other (content), length 0-33 | |
replace_calleradd_suffix | string | unoccupied | Caller Suffix added Format: null (ignore)/other (content), length 0-33 | |
replace_calleedel_prefix | int | 0 | Called Prefix Deletion Format: 0-64 | |
replace_calleedel_suffix | int | 0 | Called Suffix deletion Format: 0-64 | |
replace_calleeadd_prefix | string | unoccupied | Called Prefix added Format: null (ignore)/other (content), length 0-33 | |
replace_calleeadd_suffix | string | unoccupied | Called Suffix added Format: null (ignore)/other (content), length 0-33 | |
dest | string | unoccupied | Call destination device Format: null (auto)/port number/port grouping number, length 0-33 Note: you can set it arbitrarily or get the number by querying analog_port/port_get Note: if you don’t set it then the default setting prevails | 231229 |
Server→Client Response
Request Example
Post:/controller<br>
Host:172.16.6.79<br>
Raw:{"ip2tel":[{"src":"","match_callerprefix":"","match_calleeprefix":"","target":1,"replace_callerdel_prefix":<br>0,"replace_callerdel_suffix":0,"replace_calleradd_prefix":"","replace_calleradd_suffix":"",<br>"replace_calleedel_prefix":0,"replace_calleedel_suffix":0,"replace_calleeadd_prefix":"",<br>"replace_calleeadd_suffix":"","dest":""}],<br>"tel2ip":[],"profile":0,"match_fail":1,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{"uri":"analog_profile/callroute_set","msg":"","code":200,"data":[]}
5.3.10 Call Routing Policy Get /analog_profile/callroute_get
Client→Server Request
KEY | VAL | Default | Remark |
---|---|---|---|
profile | int | – | Strategy number Format: not null, note the restriction, invalid error report |
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark |
---|---|---|---|
Refer to /analog_profile/callroute_set for instructions. |
Request Example
Post:/controller/analog_profile/callroute_get
Host:172.16.6.79
Raw:{"profile":0,"token":"b909a2dbd2e55367638ab59065bf7f9b"}
Response Example
{
"uri": "analog_profile/callroute_get",
"msg": "",
"code": 200,
"data": {
"name": "",
"match_fail": 1,
"ip2tel": [
{
"src": "",
"match_callerprefix": "",
"match_calleeprefix": "",
"target": 1,
"replace_callerdel_prefix": 0,
"replace_callerdel_suffix": 0,
"replace_calleradd_prefix": "",
"replace_calleradd_suffix": "",
"replace_calleedel_prefix": 0,
"replace_calleedel_suffix": 0,
"replace_calleeadd_prefix": "",
"replace_calleeadd_suffix": "",
"dest": ""
}
],
"tel2ip": [],
"profile": 0
}
}