3CX icon

3CX

Interact with 3CX telephony system

Actions462

Overview

The "Create Trunk Template" operation in the Trunk Templates resource allows users to create a new trunk template configuration within the 3CX telephony system. This node is useful for automating the setup of trunk templates, which define how calls are routed and managed through SIP trunks in 3CX. Typical use cases include provisioning new trunk templates programmatically during deployment or integration workflows, managing multiple trunk configurations centrally, or updating templates with specific parameters such as proxy ports, messaging templates, or allowed countries.

Properties

Name Meaning
Add Allowed Boolean flag indicating whether to add allowed entities (true/false).
Content String content related to the trunk template, possibly configuration details or notes.
Countries JSON array specifying countries associated with the trunk template.
Default Proxy Port Number representing the default proxy port used by the trunk template.
Default Registrar Port Number representing the default registrar port used by the trunk template.
Description String description providing additional information about the trunk template.
Editors JSON array listing editors who have permissions or roles related to this trunk template.
Id String identifier for the trunk template.
Messaging Template JSON object defining messaging variables and structure for the trunk template's messaging capabilities.
Name String name of the trunk template.
Tags JSON array of tags associated with the trunk template for categorization or filtering.
Template Type Option selecting the type of the trunk template. Possible values: Preferred, Supported, Dedicated, Third Party, Deleted, Unknown.
Url String URL related to the trunk template, possibly for webhook or API callback purposes.

Output

The node outputs JSON data representing the created trunk template as returned by the 3CX API. This typically includes all properties sent in the request along with any additional metadata or identifiers assigned by the server. The output does not explicitly mention binary data, so it is assumed to be purely JSON structured data describing the newly created trunk template.

Dependencies

  • Requires an active connection to a 3CX telephony system via its API.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the 3CX API must be set correctly in the credentials.
  • The node sends HTTP requests with JSON payloads to the 3CX API endpoint /xapi/v1.

Troubleshooting

  • Invalid Credentials: If the API key or OAuth token is missing or incorrect, the node will fail to authenticate. Ensure valid credentials are provided.
  • Malformed JSON Inputs: Properties like Countries, Editors, Messaging Template, and Tags expect valid JSON strings. Invalid JSON will cause parsing errors.
  • Missing Required Fields: Some fields like Name or Id might be required by the API. Omitting them could result in validation errors.
  • API Endpoint Issues: Incorrect base URL or network issues can cause connection failures. Verify the server URL and network connectivity.
  • Unsupported Template Type: Selecting a Template Type not recognized by the API may cause errors; use one of the predefined options.

Links and References

Discussion