Update Voice OUT Trunk

PATCH https://{{host}}/v3/voice_out_trunks/:id

Updates a Trunk.

Request Body Scheme

{

data (object, required) {

type (string, required): voiceouttrunks
Trunks

id (string, required)
Unique ID identifier of Trunk.

attributes (object, required) {
Trunk configuration complex object.

name (string, required, NOT nullable)
The voice out trunk name.

allowedsipips (array[string], required, NOT nullable)
The allowed originating IPs. Array from 0 to 15 items: IP v4/v6 single or subnet.

allowedrtpips (array[string], NOT required, nullable)
The allowed RTP IPs. Array from 0 to 10 items: IP v4/v6 single or subnet.

onclimismatch_action (enumerate[string], required, NOT nullable): sendoriginalcli, reject_call
Possible values are: sendoriginalcli - the system will pass the FROM header value to the termination gateway. reject_call - the system will reject the call if the FROM header value does not match any of the allowed DIDs.

capacity_limit (integer, NOT required, nullable): The capacity limit of the voice out trunk. Allowed values from 0 to 32767.

allowanydidascli (boolean, NOT required, NOT nullable): When set to True, passed than DIDs relationship can not be set to explicit DIDs. if DIDs relationship is omitted in payload already linked DIDs will be automatically unassigned. Default value is False.

status (enumerate[string], NOT required, NOT nullable): active, blocked Can be either: active or blocked. Default value is active.

threshold_amount (string, NOT required, NOT nullable): The outbound trunk 24 hour threshold limit. Can be from 0.0 to 100000.0.

defaultdstaction (enumerate[string], NOT required, NOT nullable): allow_all, reject_all Can be either: allow_all or reject_all. Default value is allow_all.

dst_prefixes (array[string], NOT required, nullable) The allowed destination prefixes.

mediaencryptionmode (enumerate[string], NOT required, NOT nullable): disabled, srtp_sdes, srtp_dtls, zrtp Media encryption mode. See RFC4568 about SRTP SDES, RFC5764 about SRTP DTLS, and RFC6189 about ZRTP for more details. Possible values: disabled - Disabled srtp_sdes - SRTP SDES srtp_dtls - SRTP DTLS zrtp - ZRTP

callback_url (string, NOT required, nullable) Can be null or valid HTTP(s) URL.

forcesymmetricrtp (boolean, NOT required, NOT nullable) Forced to work in Symmetric RTP / COMEDIA mode. Default value is false.

rtp_ping (boolean, NOT required, NOT nullable) Use RTP PING when connecting a call. After establishing the call, DIDWW will send empty RTP packet RTP PING. It is necessary if both parties operate in Symmetric RTP / Comedia mode and expect the other party to start sending RTP first. Default value is false.

}

relationships (object, optional) {

dids (object, optional): to-many
Linkage for included DID Object The DID numbers if allow_any_did_as_cli is set to false.

}

}

}

Request Body Example:

Voice OUT trunk
{
  "data": {
    "id": "457bf47d-446d-41cd-91c3-dfbda7bf0753",
    "type": "voice_out_trunks",
    "attributes": {
      "name": "Outbound trunk 99",
      "allowed_sip_ips": [
        "192.168.1.1"
      ],
      "on_cli_mismatch_action": "send_original_cli",
      "capacity_limit": 300,
      "allow_any_did_as_cli": false,
      "status": "blocked",
      "threshold_amount": "1000.0",
      "default_dst_action": "allow_all",
      "dst_prefixes": [
        "23",
        "45"
      ],
      "media_encryption_mode": "disabled",
      "allowed_rtp_ips": [
        "192.168.1.1"
      ],
      "force_symmetric_rtp": true,
      "rtp_ping": true
    }
  }
}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring
Content-Typestring
Api-Keystring

RESPONSES

status: OK

{"data":{"id":"291ef437-8896-4834-b0c2-eefaa0bbde98","type":"voice_out_trunks","attributes":{"allowed_sip_ips":["192.168.1.1/32"],"allowed_rtp_ips":["192.168.1.1/32"],"allow_any_did_as_cli":false,"status":"blocked","on_cli_mismatch_action":"send_original_cli","name":"Outbound trunk 99","capacity_limit":300,"username":"e1********","password":"ke********","created_at":"2022-03-03T08:21:48.322Z","threshold_reached":false,"threshold_amount":"1000.0","media_encryption_mode":"disabled","default_dst_action":"allow_all","dst_prefixes":["23","45"],"force_symmetric_rtp":true,"rtp_ping":true,"callback_url":"http://10.201.10.1/test.php"},"relationships":{"dids":{"links":{"self":"https://api.didww.com/v3/voice_out_trunks/291ef437-8896-4834-b0c2-eefaa0bbde98/relationships/dids","related":"https://api.didww.com/v3/voice_out_trunks/291ef437-8896-4834-b0c2-eefaa0bbde98/dids"}}},"meta":{"spent_amount":"0.0"}},"meta":{"api_version":"2022-05-10"}}