3CX icon

3CX

Interact with 3CX telephony system

Actions462

Overview

The "Update Trunk" operation in the 3CX node allows users to modify the configuration of an existing trunk entity within the 3CX telephony system. This operation is useful for administrators who need to update trunk settings such as authentication credentials, call routing rules, codec preferences, and other telephony parameters without recreating the trunk from scratch.

Common scenarios include:

  • Changing authentication details (Auth ID and Password) for a trunk.
  • Adjusting call direction permissions (inbound/outbound).
  • Updating codec or gateway configurations.
  • Modifying emergency location data or routing rules.
  • Enabling or disabling features like video calls or tunneling.

Practical example: An administrator wants to update the simultaneous call limit and enable inbound calls on a specific trunk identified by its Id. Using this operation, they can send the new configuration directly to 3CX via the API.

Properties

Name Meaning
Id The unique identifier of the trunk entity to update. Required. Can be set using expressions like {{$json.Id}}.
Auth ID Authentication ID string used for the trunk.
Auth Password Authentication password in JSON format.
Certificate Certificate string associated with the trunk.
Certificate Name Name of the certificate used.
Configuration Issue Description or flag indicating any configuration issues.
Did Numbers JSON array of DID numbers associated with the trunk.
Direction Call direction allowed on the trunk. Options: None, Inbound, Outbound, Both.
Disable Video Boolean flag to disable video calls on the trunk. Default true.
Diversion Header Boolean flag indicating if diversion headers are enabled. Default true.
E 164 Country Code String representing the E.164 country code for number formatting.
E 164 Process Incoming Number Boolean flag to process incoming numbers according to E.164 formatting. Default true.
Emergency Geo Locations JSON array defining emergency geographic locations related to the trunk.
Enable Inbound Calls Boolean to enable or disable inbound calls. Default true.
Enable Outbound Calls Boolean to enable or disable outbound calls. Default true.
External Number External phone number string associated with the trunk.
Gateway JSON object containing gateway configuration including codecs, inbound/outbound params, source identification, and variable choices.
Groups JSON array defining groups with rights and tags associated with the trunk.
In CID Formatting JSON array defining inbound caller ID formatting rules.
IP Restriction IP restriction type. Options: Any, IPV4, IPV6.
Is Online Boolean indicating if the trunk is currently online. Default true.
Messaging JSON object for messaging-related configuration.
Number Phone number string assigned to the trunk.
Outbound Caller ID String specifying the outbound caller ID.
Out CID Formatting JSON array defining outbound caller ID formatting rules.
Public Info Groups JSON array of public information groups associated with the trunk.
Public IP in SIP String specifying the public IP address used in SIP signaling.
Publish Info Boolean flag to publish trunk info. Default true.
Receive Extensions JSON array defining extensions that receive calls through this trunk.
Receive Info Boolean flag to receive info. Default true.
Remote My Phone URI Host String for remote phone URI host configuration.
Remote PBX Prefix String prefix for remote PBX.
Routing Rules JSON array defining routing rules including holidays, office hours, out-of-office hours, and trunk DN membership and tags.
Secondary Registrar String specifying secondary registrar address.
Separate Auth Id String for separate authentication ID if used.
Simultaneous Calls Number specifying how many simultaneous calls are allowed on the trunk.
Tags JSON array of tags associated with the trunk.
Transcription Mode Mode for transcription services. Options: Nothing, Voicemail, Recordings, Both, Inherit.
Transport Restriction Transport protocol restriction. Options: Any, UDP, TCP, TLS.
Trunk Reg Times JSON array defining registration times for the trunk.
Tunnel Enabled Boolean flag to enable or disable tunneling. Default true.
Tunnel Remote Addr String specifying the remote address for tunneling.
Tunnel Remote Port Number specifying the remote port for tunneling.
Use Separate Auth Id Boolean flag indicating whether to use a separate authentication ID. Default true.

Output

The output of the "Update Trunk" operation typically contains JSON data reflecting the updated trunk entity as returned by the 3CX API. This includes all the properties of the trunk after the update has been applied, such as identifiers, configuration details, status flags, and any metadata.

If the node supports binary data output (not indicated here), it would generally represent files or media related to the trunk configuration, but this operation primarily deals with JSON data.

Dependencies

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

Troubleshooting

  • Invalid or missing Id: The operation requires a valid trunk Id. Ensure the Id property is provided and corresponds to an existing trunk.
  • Authentication errors: If the API key or OAuth2 token is invalid or expired, the request will fail. Refresh or reconfigure credentials.
  • Malformed JSON inputs: Properties expecting JSON (e.g., AuthPassword, DidNumbers) must be valid JSON strings. Invalid JSON will cause parsing errors.
  • Permission denied: The authenticated user may lack permission to update trunks. Verify API user roles and permissions.
  • Network issues: Connectivity problems to the 3CX server will prevent updates. Check network access and server availability.
  • Unsupported values: Some properties have restricted options (e.g., Direction, IPRestriction). Providing unsupported values will cause errors.

Links and References

Discussion