Query SIP Trunk Settings
Query the basic settings and DOD settings of a SIP trunk, multiple SIP trunks, or all SIP trunks.
Endpoint
POST /api/v1.1.0/siptrunk/query?token={token}
Request Parameters
Name | Importance | Type | Description |
---|---|---|---|
trunkname |
Required | String | SIP trunk name.
|
Response Parameters
Name | Type | Description |
---|---|---|
trunks |
Object | Object parameter. |
id |
Int | Trunk ID. |
trunkname |
String | Trunk name. |
trunktype |
String | SIP trunk type.
|
Register Trunk | ||
host |
String | The domain or IP address of the ITSP. |
port |
String | The SIP trunk port. |
domain |
String | The domain or IP address of the ITSP. |
username |
String | The SIP account that is provided by the ITSP. |
authname |
String | The SIP account that is provided by the ITSP. |
fromuser |
String | If fromuser is set, all outgoing calls from
this SIP trunk will use the fromuser value as
From Header of the SIP INVITE packets. |
password |
String | The password of the SIP account. |
Peer Trunk | ||
host |
String | The domain or IP address of the ITSP. |
port |
String | SIP trunk port. |
domain |
String | The domain or IP address of the ITSP. |
Account Trunk | ||
username |
String | The user name of the Account Trunk. |
authname |
String | The authentication name of the Account Trunk. |
password |
String | The password of the Account Trunk. |
DOD Number | ||
extensionsdod |
String | The DOD number that is bound with an extension. Format: {dod_number}-{dod_name}-{extension_number} Example:"extensionsdod":"5503301-yeastar-1000" |
extensionsgroupdod |
String | The DOD number that is bound with an extension
group. Format: {dod_number}-{dod_name}-{extension_group_name} Example:"extensionsdod":"5503301-yeastar-sales" |
Examples
Request Example
POST /api/v1.1.0/siptrunk/query?token=277ac400357b509b4a587ff2157f7ad5 HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: api.yeastarcloud.com { "trunkname": "SIP" }
Response Example
HTTP/1.1 200 OK Access-control-allow-origin: * Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE { "status": "Success", "trunks": [ { "id": "8", "trunkname": "SIP", "trunktype": "register", "host": "192.168.11.158", "port": "5060", "domain": "192.168.11.158", "username": "8001", "authname": "8001", "fromuser": "8001", "password": "E7PO?LywXnXa_B-n", "extensionsdod": "", "extensionsgroupdod": "" } ] }