Update Trunk
This request changes the attributes of a trunk.
Resource
PATCH /trunks/<OID>
Where OID
is the object ID of the trunk.
Parameters
None
Payload
Fields
name | Patch Operations |
---|---|
account |
|
allowPeerToPeer |
|
alwaysAnonymous |
|
anonymousCallerId |
|
anonymousCallerName |
|
authenticationAccount |
|
customSIPOptions |
|
defaultCallerNr |
|
defaultNormalization |
|
defaultLine |
|
dontRegisterWithServer |
|
gateway |
|
host |
|
keepAlive |
|
acceptUnknownNumbers |
|
outboundPort |
|
outboundProxy |
|
password |
|
port |
|
providerName |
|
registrationDate |
|
registrationStatus |
|
registrationTimeOut |
|
rejectedRegistrationCause |
|
serverNet |
|
snmpId |
|
supportsAnonymous |
|
supportsRedirect |
|
supportsSenderId |
|
transportType |
|
useAsFallback |
|
useAssertedIdentity |
|
useDiversionHeader |
|
useMediaSecHeaders |
|
usePreferredIdentity |
|
assignedNumbers |
|
dialPrefixes |
|
numberMapping |
|
Response
None
Context
Authorization |
Administrator |
Errors
Example
PATCH https://xelion.nl/api/v1/master/trunks/21436587
{
"operations": [
{
"op": "replace",
"path": "/snmpId",
"value": 4
},
{
"op": "add",
"path": "/assignedNumbers/1",
"value": "01234567890"
}, {
"op": "add",
"path": "/assignedNumbers/1/orderNumber",
"value": 1
},
{
"op": "add",
"path": "/assignedNumbers/2",
"value": "31234567800"
},
{
"op": "add",
"path": "/assignedNumbers/2/orderNumber",
"value": 2
},
{
"op": "add",
"path": "/assignedNumbers/3",
"value": "31234567801"
},
{
"op": "remove",
"path": "/assignedNumbers/1651652"
},
{
"op": "add",
"path": "/dialPrefixes/1"
},
{
"op": "replace",
"path": "/dialPrefixes/1/matchString",
"value":"40"
}
]
}
To change numbermapping:
{
"operations": [
{
"op": "add",
"path": "/numberMapping/1"
},
{
"op": "replace",
"path": "/numberMapping/1/prefix",
"value":"40"
},
{
"op": "replace",
"path": "/numberMapping/1/replacement",
"value":"04"
},
{
"op": "replace",
"path": "/numberMapping/1/applyTo",
"value":"0_all_nrs"
}
]
}