Create H323 Trunk

POST https://{{host}}/v3/voice_in_trunks

Request Body Scheme

{

data (object, required) {

type (string, required): voiceintrunks
Trunks

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

priority (integer, required)
The priority of this target host. DIDWW will attempt to contact the target trunk with the lowest-numbered priority; target trunk with the same priority will be tried in an order defined by the weight field. The range is 0-65535. See RFC 2782 for more details.

weight (integer, required)
A trunk selection mechanism. The weight field specifies a relative weight for entries with the same priority. Larger weights will be given a proportionately higher probability of being selected. The range of this number is 0-65535. In the presence of records containing weights greater than 0, records with weight 0 will have a very small chance of being selected. See RFC 2782 for more details.

capacity_limit (integer, required)
Maximum number of simultaneous calls for the trunk.

ringing_timeout (integer, required)
After which it will be end transaction with internal disconnect code Ringing timeout if the call was not connected.

name (string, required)
Friendly name of the trunk.

cli_format (string, required): RAW, E164, Local
RAW - Do not alter CLI (default).
E164 - Attempt to convert CLI to E.164 format.
Local - Attempt to convert CLI to Localized format.

CLI format conversion may not work correctly for phone calls originating from outside the country of that specific DID.

cli_prefix (string, required)
You may prefix the CLI with an optional + sign followed by up to 6 characters, including digits and #.

description (string, optional)
Optional description of the trunk.

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

type (string, required): h323_configurations
H323 configuration complex object.

attributes (object, required) {
H323 configuration attributes object.

dst (string, optional, NOT nullable)
Phone number’s.

host (string, optional, NOT nullable)
Destination server.

port (string, optional, nullable)
Destination port.

codec_ids (array[integer], optional, NOT nullable)
Codecs

}

}

}

relationships (object, optional) {

pop (object, optional): to-one
Linkage for included POP Object

voiceintrunk_group (object, optional): to-one
Linkage for included Voice In Trunk Group Object

}

}

}

Request Body Example

{
  "data": {
    "type": "voice_in_trunks",
    "attributes": {
      "name": "Office H323",
      "capacity_limit": 18,
      "cli_format": "e164",
      "cli_prefix": "+1",
      "configuration": {
        "type": "h323_configurations",
        "attributes": {
          "dst": "1xxxxxxxxx",
          "host": "example.com",
          "codec_ids": [
            9,
            6
          ]
        }
      }
    }
  }
}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring
Content-Typestring
Api-Keystring

RESPONSES

status: Created

{"data":{"id":"01155457-b08e-4b5a-a5a7-7cfa4e5bd37a","type":"voice_in_trunks","attributes":{"priority":1,"capacity_limit":18,"weight":65535,"name":"Office H323","cli_format":"e164","cli_prefix":"+1","description":null,"ringing_timeout":null,"created_at":"2017-06-25T08:21:41.795Z","configuration":{"type":"h323_configurations","attributes":{"dst":"1xxxxxxxxx","host":"example.com","port":null,"codec_ids":[9,6]}}},"relationships":{"voice_in_trunk_group":{"links":{"self":"https://api.didww.com/v3/voice_in_trunks/01155457-b08e-4b5a-a5a7-7cfa4e5bd37a/relationships/voice_in_trunk_group","related":"https://api.didww.com/v3/voice_in_trunks/01155457-b08e-4b5a-a5a7-7cfa4e5bd37a/voice_in_trunk_group"}},"pop":{"links":{"self":"https://api.didww.com/v3/voice_in_trunks/01155457-b08e-4b5a-a5a7-7cfa4e5bd37a/relationships/pop","related":"https://api.didww.com/v3/voice_in_trunks/01155457-b08e-4b5a-a5a7-7cfa4e5bd37a/pop"}}}},"meta":{"api_version":"2022-05-10"}}