I need to receive calls using 3cx as telephony system

I am trying to receive calls using 3cx as my telephony system. I have already set up a trung pointing to sip.retell.ai but I get Call or Registration to 112@(Ln.10001@Retell) has failed. sip:84.235.227.5:5060;lr replied: Not Found (404) Seems like retell is not finding my agent.

Its not a connection issue as I have been able to connect to retell but I get connected to a russian speaking ai agent.

Any details on how to proceed?

Based on the 404 error you’re receiving, the issue is that Retell cannot route your inbound call to the correct agent(1). When using Elastic SIP Trunking with 3CX, you need to import your phone number into Retell and bind it to a specific agent(1).

Steps to Fix This Issue

1. Import Your Number into Retell

You need to import your phone number in E.164 format (including country code, no spaces or special characters)(2). During import, you’ll provide:

  • The termination URI to identify your elastic SIP trunk (used for outbound calls)(2)
  • A unique agent ID to bind the number, ensuring inbound calls are automatically directed to the specified agent(2)
  • Optional username and password for SIP trunk authentication(2)

2. Configure Your SIP Trunk Settings

For your 3CX trunk pointing to sip:sip.retellai.com, ensure you’re using the correct transport method(1):

  • TCP (Recommended): sip:sip.retellai.com;transport=tcp(1)
  • UDP: sip:sip.retellai.com;transport=udp(1)
  • TLS: sip:sip.retellai.com;transport=tls(1)

You can whitelist Retell’s IP blocks in 3CX(1):

  • All regions: 18.98.16.120/30(1)
  • Certain US traffic: 143.223.88.0/21, 161.115.160.0/19(1)

3. Verify Origination Settings

Check your origination (inbound) settings in your SIP trunk configuration(1). The Russian-speaking agent you’re reaching suggests calls are connecting to Retell but not routing to your specific agent because the number isn’t properly imported and bound(1).

Without importing your number and binding it to your agent, Retell cannot determine which agent should handle the inbound call, resulting in the 404 error or routing to a default/incorrect agent(1).

For additional support with your specific 3CX configuration:

How can I inform to retell of the binded phone number from 3cx?

To inform Retell about your phone number from 3CX, you need to use the Import Phone Number API(1). This binds your 3CX number to a specific Retell agent(1).

Using the API to Import Your Number

Here’s the code to import your phone number(1):

import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
});
const phoneNumberResponse = await client.phoneNumber.import({
 phone_number: '+14157774444',
 termination_uri: 'someuri.pstn.twilio.com',
});
console.log(phoneNumberResponse.inbound_agent_id);

(1)

Required Parameters

When importing your 3CX number, you must provide(1):

  • phone_number: Your number in E.164 format (e.g., "+14157774444")(1)
  • termination_uri: The termination URI to uniquely identify your elastic SIP trunk (used for outbound calls)(1)

Optional Parameters to Bind Your Agent

To ensure inbound calls route to your specific agent, include(1):

  • inbound_agent_id: Unique ID of the agent to bind to the number for receiving inbound calls(1)
  • outbound_agent_id: Unique ID of the agent for conducting outbound calls(1)
  • sip_trunk_auth_username: Username for SIP trunk authentication(1)
  • sip_trunk_auth_password: Password for SIP trunk authentication(1)

Complete Example with Agent Binding

const phoneNumberResponse = await client.phoneNumber.import({
 phone_number: '+14157774444',
 termination_uri: 'someuri.pstn.twilio.com',
 inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
 sip_trunk_auth_username: 'username',
 sip_trunk_auth_password: '123456',
});

(1)

Once imported, your 3CX number will automatically use the bound agent when receiving inbound calls(1). This should resolve the 404 error you’re experiencing, as Retell will now know which agent to route calls to(2).

**

This has been already done. The agent is binded to a phone number but when the call is routed I am afraid I am forwarded to another agent. Is there something I need to add to my call so retell is able to know my from number?