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

replace

allowPeerToPeer

replace

alwaysAnonymous

replace

anonymousCallerId

replace

anonymousCallerName

replace

authenticationAccount

replace

customSIPOptions

replace

defaultCallerNr

replace

defaultNormalization

replace

defaultLine

replace

dontRegisterWithServer

replace

gateway

replace

host

replace

keepAlive

replace

acceptUnknownNumbers

replace

outboundPort

replace

outboundProxy

replace

password

replace

port

replace

providerName

replace

registrationDate

replace

registrationStatus

replace

registrationTimeOut

replace

rejectedRegistrationCause

replace

serverNet

replace

snmpId

replace

supportsAnonymous

replace

supportsRedirect

replace

supportsSenderId

replace

transportType

replace

useAsFallback

replace

useAssertedIdentity

replace

useDiversionHeader

replace

useMediaSecHeaders

replace

usePreferredIdentity

replace

assignedNumbers

add remove

dialPrefixes

add remove

numberMapping

add remove

Response

None

Context

Authorization

Administrator

Errors

Example

Request
PATCH https://xelion.nl/api/v1/master/trunks/21436587
Payload
{
        "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"
            }
    ]
}