HTTP API - Get Configuration: Difference between revisions

From Ultiroam User Docs
Jump to navigation Jump to search
(Created page with "== 9.1         Request == POST   http:// gateway /api/get_config == 9.2         Request Parameter == {| class="wikitable" |'''Parameter''' |'''Type''' |'''Description''' |- | colspan="3" |'''The following are the parameters included in the object, select at least one''' |- |sip_proxy |Array |Contents of the array can only be empty |- |sip_trunk |Array |Content is plastic, the value is 0-31, empty means all |- |ip_to_tel_routing |Array |Content is plastic,...")
 
No edit summary
Line 73: Line 73:
|Array,contain  s  at least one object
|Array,contain  s  at least one object
|"index":0  "enable":"on"
|"index":0  "enable":"on"
|index Status
"operation": "Allow"       Call restriction Allow/  Forbid "description":""                                            Description
|}
 
 
{| class="wikitable"
|
|
|"operation": "Allow"       Call restriction Allow/  Forbid "description":""                                            Description


"src_mode":"sip_trunk"                  Call Source
"src_mode":"sip_trunk"                  Call Source
Line 99: Line 92:


"reserve_digit":255                Reserved number  digits
"reserve_digit":255                Reserved number  digits
|index Status
|-
|-
|tel_to_ip_routing
|tel_to_ip_routing
|Array,contain  s  at least one object
|Array,contain  s  at least one object
|"index":63                            index
|"index":63                            index
"enable":"on"                        Status  "description":"default"           Description
"enable":"on"                        Status  "description":"default"           Description


Line 121: Line 114:


"reserve_digit":0              Reserved number  digits
"reserve_digit":0              Reserved number  digits
|
|-
|-
|port_group
|port_group
|Array,contain  s at least one object
|Array,contains at least one object
|"index":0                             Index,int
|"index":0                             Index,int
"enable":"on"                        Status
"enable":"on"                        Status


Line 137: Line 130:


"reg_type":"no_register"    no_register/ sip_proxy/
"reg_type":"no_register"    no_register/ sip_proxy/
|}


{| class="wikitable"
Trunk-index
|
|
|Trunk-index


"select_type":"cyclic_ascending"                                                  ascending/ cyclic_ascending/ descending/ cyclic_descending/ unknown  
"select_type":"cyclic_ascending"                                                  ascending/ cyclic_ascending/ descending/ cyclic_descending/ unknown  


"tel_to_ip_hot_line":""    VOIP Hotline  "ip_to_tel_hot_line":""    PSTNHotline
"tel_to_ip_hot_line":""    VOIP Hotline  "ip_to_tel_hot_line":""    PSTNHotline
|
|}  
|}  


== 9.4         Example ==
'''Example:'''
Request
 
'''Request'''


curl -d '
curl -d '
Line 159: Line 149:
oup":[],"tel_to_ip_routing":[]}' -H "Content-Type:  application/json" <nowiki>http://gateway_ip/api/</nowiki> get_config  
oup":[],"tel_to_ip_routing":[]}' -H "Content-Type:  application/json" <nowiki>http://gateway_ip/api/</nowiki> get_config  


'''Response'''


 
{ "sip_proxy":{"domain":"","port":5060,"check_network_status":"off"},"sip_trunk":[ {"index":31,"enable":"on","domain":"172.18.110.110","port":9367,"description":"cs","check_network_status":"off"}],"ip_to_tel_routing":[ {"index":63,"enable":"on","description":"default","ope ration":"Allow","src_mode":"sip_trunk","dst_mode":"port","src_id":31,"dst_id":0,"src_prefix ":"","dst_prefix":"","prefix_to_be_added":"","suffix_to_be_added":"","del_digit":0,"reserve_digit":0}],"tel_to_ip_routing":[ {"index":63,"enable":"on","description":"default","operation": "Allow","src_mode":"port_group","dst_mode":"sip_trunk_group","src_id":0,"dst_id":0,"src_ prefix":"","dst_prefix":"","prefix_to_be_added":"","suffix_to_be_added":"","del_digit":0,"reserve_digit":0}],"port_group":[ {"index":0,"enable":"on","description":"all","sip_account":"","sip_authid":"","sip_authpswd":"","port_map":"[ 0,1,2,3,4,5,6,7]","reg_type":"no_register","select_type":"cyclic_ascending","tel_to_ip_hot_line":"","ip_to_tel_hot_line":""}]}
Response
 
{ "sip_proxy":{"domain":"","port":5060,"check_network_status":"off"},"sip_trunk":[ {"index
 
":31,"enable":"on","domain":"172.18.110.110","port":9367,"description":"cs","check_networ
 
k_status":"off"}],"ip_to_tel_routing":[ {"index":63,"enable":"on","description":"default","ope ration":"Allow","src_mode":"sip_trunk","dst_mode":"port","src_id":31,"dst_id":0,"src_prefix ":"","dst_prefix":"","prefix_to_be_added":"","suffix_to_be_added":"","del_digit":0,"reserve_
 
digit":0}],"tel_to_ip_routing":[ {"index":63,"enable":"on","description":"default","operation": "Allow","src_mode":"port_group","dst_mode":"sip_trunk_group","src_id":0,"dst_id":0,"src_ prefix":"","dst_prefix":"","prefix_to_be_added":"","suffix_to_be_added":"","del_digit":0,"res
 
erve_digit":0}],"port_group":[ {"index":0,"enable":"on","description":"all","sip_account":"","
 
sip_authid":"","sip_authpswd":"","port_map":"[ 0,1,2,3,4,5,6,7]","reg_type":"no_register","se lect_type":"cyclic_ascending","tel_to_ip_hot_line":"","ip_to_tel_hot_line":""}]}

Revision as of 22:09, 7 May 2024

9.1         Request

POST   http:// gateway /api/get_config

9.2         Request Parameter

Parameter Type Description
The following are the parameters included in the object, select at least one
sip_proxy Array Contents of the array can only be empty
sip_trunk Array Content is plastic, the value is 0-31, empty means all
ip_to_tel_routing Array Content is plastic, the value is 0-31, empty means all
tel_to_ip_routing Array Content is plastic, the value is 0-31, empty means all
port_group Array Content is plastic, the value is 0-31, empty means all

9.3         Response Parameter

Parameter Type Description
Returns the object in JSON format, the following is the object content, including at least one
sip_proxy Object "domain":"172.18.25.31"

"port":5060 "check_network_status":"on"

Domain/IP Port

Keepalive Enable

sip_trunk Array,contain s at least one object "index":0 "enable":"on"

"domain":"172.18.25.31"

Index Status Domain/IP
"port":5060 Port
"description":"xxxx" Description
"check_network_status":"on" Keepalive Enable
ip_to_tel_routing Array,contain s at least one object "index":0 "enable":"on"

"operation": "Allow"       Call restriction Allow/ Forbid "description":""                                            Description

"src_mode":"sip_trunk"                  Call Source

SIP Trunk/SIP Trunk Group/SIP Server

"src_id":0                   SIP Trunk/SIP Trunk Group ID "dst_mode":"port_group"     Call delivery

Port/Port Group

"dst_id":0                            Port/Port Group ID

"src_prefix":""                     Calling number prefix

"dst_prefix":""                     Called number prefix "prefix_to_be_added":""         Add prefix number

"suffix_to_be_added":""        Add suffix number "del_digit":0                                           Remove prefix digits

"reserve_digit":255                Reserved number digits

index Status
tel_to_ip_routing Array,contain s at least one object "index":63                            index

"enable":"on"                        Status "description":"default"           Description

"operation": "Allow"       Call restriction Allow/ Forbid

"src_mode":"port_group"    Call Source

Port/Port Group

"dst_mode":"sip_trunk_group"    Call delivery

SIP Trunk/SIP Trunk Group/SIP Server

"src_id":0   Port/Port Group ID

"dst_id":0   SIP Trunk/SIP Trunk Group ID "src_prefix":""  Calling number prefix "dst_prefix":""                  Called number prefix "prefix_to_be_added":""   Add prefix number "suffix_to_be_added":""   Add suffix number "del_digit":0                               Remove prefix digits

"reserve_digit":0              Reserved number digits

port_group Array,contains at least one object "index":0                             Index,int

"enable":"on"                        Status

"description":"all"                   Description

"sip_account":""                       SIP ID

"sip_authid":""                        SIP Auth ID

"sip_authpswd":""                     Password "port_map":"[ 0,1,2,3,4,5,6,7]"    Port,Array

"reg_type":"no_register"    no_register/ sip_proxy/

Trunk-index

"select_type":"cyclic_ascending"                                                  ascending/ cyclic_ascending/ descending/ cyclic_descending/ unknown

"tel_to_ip_hot_line":""    VOIP Hotline "ip_to_tel_hot_line":""   PSTNHotline

Example:

Request

curl -d '

{"sip_proxy":[],"sip_trunk":[ ],"ip_to_tel_routing":[ ],"port_gr

oup":[],"tel_to_ip_routing":[]}' -H "Content-Type:  application/json" http://gateway_ip/api/ get_config

Response

{ "sip_proxy":{"domain":"","port":5060,"check_network_status":"off"},"sip_trunk":[ {"index":31,"enable":"on","domain":"172.18.110.110","port":9367,"description":"cs","check_network_status":"off"}],"ip_to_tel_routing":[ {"index":63,"enable":"on","description":"default","ope ration":"Allow","src_mode":"sip_trunk","dst_mode":"port","src_id":31,"dst_id":0,"src_prefix ":"","dst_prefix":"","prefix_to_be_added":"","suffix_to_be_added":"","del_digit":0,"reserve_digit":0}],"tel_to_ip_routing":[ {"index":63,"enable":"on","description":"default","operation": "Allow","src_mode":"port_group","dst_mode":"sip_trunk_group","src_id":0,"dst_id":0,"src_ prefix":"","dst_prefix":"","prefix_to_be_added":"","suffix_to_be_added":"","del_digit":0,"reserve_digit":0}],"port_group":[ {"index":0,"enable":"on","description":"all","sip_account":"","sip_authid":"","sip_authpswd":"","port_map":"[ 0,1,2,3,4,5,6,7]","reg_type":"no_register","select_type":"cyclic_ascending","tel_to_ip_hot_line":"","ip_to_tel_hot_line":""}]}