Edit a SIP Trunk
Endpoint
POST /api/v0.0.1/siptrunk/update?token={token}
Request Parameters
Name | Importance | Type | Description |
id | Required | Int | Trunk ID. |
trunkname | Required | String | SIP trunk name. |
trunktype | Required | String | SIP trunk type.
|
Register Trunk | |||
host | Required | String | The domain or IP address of the ITSP. |
port | Required | String | The SIP trunk port. |
username | Required | String | The SIP account that is provided by the ITSP. |
authname | Required | String | The SIP account that is provided by the ITSP. |
fromuser | Optional | 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.
Note: If the ITSP doesn’t require this setting, leave fromuser blank. |
password | Required | String | The password of the SIP account. |
Peer Trunk | |||
host | Required | String | The domain or IP address of the ITSP. |
port | Required | String | SIP trunk port. |
Account Trunk | |||
username | Required | String | The user name of the Account Trunk. |
authname | Required | String | The authentication name of the Account Trunk. |
password | Required | String | The password of the Account Trunk. |
Examples
Request Example
POST /api/v0.0.1/siptrunk/update?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“id”:”3″,
“trunkname”: “to-108-16”,
“trunktype”: “register”,
“host”: “172.16.108.100”,
“port”: “5060”,
“username”:”6100″,
“authname”:”6100″,
“password”:”@123456wW”
}
POST /api/v0.0.1/siptrunk/update?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
<?xml version=”1.0″ encoding=”UTF-8″ ?>
<xml>
<id>3</id>
<trunkname>to-108-16</trunkname>
<trunktype>register</trunktype>
<host>172.16.108.100</host>
<port>5060</port>
<domain>172.16.108.100</domain>
<username>6100</username>
<authname>6100</authname>
<password>@123456wW</password>
</xml>
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<status>Success</status>
</xml>