Skip to main content

How to configure IAX Connection

Question or Case description

This article explains how to configure an IAX connection between a CoCoS environment and an external PBX system.

An IAX connection allows calls to be exchanged between CoCoS and another telephone system. This makes it possible for intercoms, SIP devices, and other connected endpoints to communicate between both platforms.

Typical situations where this configuration is used:

  • An intercom from an external PBX must be reachable from CoCoS
  • Calls from CoCoS must be routed to another PBX
  • An existing PBX environment must be integrated with CoCoS
  • CoCoS call handling features must be made available to another system

Possible symptoms when the connection is not configured correctly:

  • Intercom devices are unreachable
  • Calls do not arrive
  • Calls disconnect immediately
  • The trunk registration fails
  • Audio communication is not established

Application

This configuration is commonly used when a CoCoS environment needs to communicate with another PBX using the Inter Asterisk eXchange (IAX) protocol.

Examples include:

  • Connecting two PBX systems
  • Migrating an existing intercom environment to CoCoS
  • Integrating external SIP intercom devices
  • Connecting multiple locations through IAX

How To

Requirements

Before starting, verify that the following components are available:

  • A working CoCoS environment
  • A properly configured CoCoS Asterisk/PBX server
  • An external PBX with IAX support
  • Network connectivity between both systems
  • IAX authentication credentials

Step 1 - Prepare the External PBX

First, configure an IAX trunk on the external PBX.

The exact configuration depends on the PBX vendor, but the following settings are typically required:

Setting Value
Username IAX authentication username
Password IAX authentication password
Host / IP Address IP address of the CoCoS environment
Port 4569

Important: The username and password must match exactly on both systems.

Step 2 - Create a New IAX Trunk in CoCoS

Open the CoCoS Management environment, and navigate to:

Intercom → Trunks and Channels → Trunks

image.png

Click the plus icon to create a new trunk.

image.png

Select the appropriate Asterisk/PBX server in the Intercom Server field.

image.png

Select the trunk type: Inter Asterisk eXchange Trunk.

image.png

Enter a clear and recognizable name in Name / Description.

image.png


Step 3 - Configure the Basic Trunk Settings

Enable Use Dynamic Host only when a dynamic host configuration is required.

 

Use this when the extenal PBX is going to connect to CoCoS, which is the case for most use cases currently )

image.png

If not using Dynamic Host:

 

Enter the IP address or domain name of the external PBX in IP Address / Domain, and enter the correct port number.

IAX normally uses port 4569.

image.png

Enter the IAX username in the Username field.


Enter the correct password in the Password field.

image.png

Click Save and Close to store the trunk configuration.



After creating the trunk, the external devices must also be created in CoCoS.

This allows CoCoS to know which calls should be routed through the IAX connection.

Navigate to:

System → Devices

image.png

Create a new SIP endpoint device.

image.png

 

image.png

Enter the extension number of the external device.

image.png

Link the device to the previously created IAX trunk.

image.png

(Optional) You may need to change SIP transport protocol to UDP.

image.png

Disable registration monitoring since there is no registration to monitor.

 

Click Save and Close to store the device configuration.


Repeat these steps for every device that must be reachable through the IAX connection.

Validation

The configuration is considered successful when:

  • The trunk registers successfully
  • Both systems can reach each other
  • Calls work in both directions
  • Audio communication functions correctly
  • No authentication or other errors appear in the logs

Test Scenario 1 - External PBX to CoCoS

Test Expected Result
Call a CoCoS intercom from a device on the external PBX. The CoCoS intercom rings and a call can be established.

Test Scenario 2 - CoCoS to External PBX

Test Expected Result
Call a device on the external PBX from a CoCoS intercom. The external device rings and a call can be established.

Common Causes of Issues

Problem Likely Cause
Trunk registration fails Incorrect username or password
No connection possible Firewall or network restriction
Calls fail immediately Incorrect IP address or port number
One-way audio NAT or firewall configuration
Devices unreachable Endpoint not linked to the trunk

References

Describe where to find external answers or extra information's