Skip to Content

Welcome!

Access to User Support Forum

Thank you for your interest in our support forum. Please note that posting in our user support forum is exclusively available to registered users who have activated our products.

To gain posting privileges:

  • Download and install one of our product
  • Complete the product registration process
  • Use the account credentials created during activation to access the forum.

Need help? If you're experiencing any issues with product activation or forum access, please contact us at team@oduist.com.

Sign up

This question has been flagged
2 Replies
62 Views
Justinol

I have an Odoo server running behind a proxy server and Nginx. I’m trying to integrate it with Oduist PBX (FreePBX + Agent).

The agent container is starting successfully, connecting to both Odoo and the FreePBX AMI without issues. Logs from the agent show:

agent-1  | 2025-09-01 06:04:42,234 - root:1049 - INFO - Starting the application.

agent-1  | 2025-09-01 06:04:42,234 - root:1049 - INFO - Starting the application.

agent-1  | 2025-09-01 06:04:42,237 - __main__:125 - INFO - Config file loaded.

agent-1  | 2025-09-01 06:04:42,237 - __main__:125 - INFO - Config file loaded.

agent-1  | 2025-09-01 06:04:42,238 - __main__:612 - INFO - Connecting to Odoo at https://example.com

agent-1  | 2025-09-01 06:04:42,238 - __main__:612 - INFO - Connecting to Odoo at https://example.com

agent-1  | 2025-09-01 06:01:15,830 - __main__:620 - INFO - Connected to Odoo.

agent-1  | 2025-09-01 06:01:15,830 - __main__:620 - INFO - Connected to Odoo.

agent-1  | 2025-09-01 06:01:16,214 - __main__:672 - INFO - Downloaded event handlers.

agent-1  | 2025-09-01 06:01:16,214 - __main__:672 - INFO - Downloaded event handlers.

agent-1  | 2025-09-01 06:01:16,215 - __main__:312 - INFO - Connecting to AMI at asterisk_plus@localhost:5038

agent-1  | 2025-09-01 06:01:16,215 - __main__:312 - INFO - Connecting to AMI at asterisk_plus@localhost:5038

agent-1  | 2025-09-01 06:01:16,216 - __main__:543 - INFO - Starting FastAGI server on 0.0.0.0:44574

agent-1  | 2025-09-01 06:01:16,216 - __main__:543 - INFO - Starting FastAGI server on 0.0.0.0:44574

agent-1  | 2025-09-01 06:01:16,217 - __main__:547 - INFO - Register FAGI route: route_did

agent-1  | 2025-09-01 06:01:16,217 - __main__:547 - INFO - Register FAGI route: route_did

agent-1  | 2025-09-01 06:01:16,220 - __main__:166 - INFO - Security rules not enabled.

agent-1  | 2025-09-01 06:01:16,223 - panoramisk.manager:57 - INFO - protocol version: '9.0.0'

agent-1  | 2025-09-01 06:01:16,223 - panoramisk.manager:112 - INFO - Sending awaiting actions

agent-1  | 2025-09-01 06:01:16,223 - __main__:323 - INFO - AMI connected.

agent-1  | 2025-09-01 06:01:16,224 - __main__:336 - INFO - Register AMI event: VarSet

agent-1  | 2025-09-01 06:01:16,225 - __main__:336 - INFO - Register AMI event: UserEvent

agent-1  | 2025-09-01 06:01:16,226 - __main__:336 - INFO - Register AMI event: Newchannel

agent-1  | 2025-09-01 06:01:16,226 - __main__:336 - INFO - Register AMI event: Hangup

agent-1  | 2025-09-01 06:01:16,226 - __main__:336 - INFO - Register AMI event: OriginateResponse

agent-1  | 2025-09-01 06:01:16,228 - __main__:336 - INFO - Register AMI event: Newstate

agent-1  | 2025-09-01 06:01:16,230 - __main__:254 - INFO - Starting HTTP server for AMI actions at 0.0.0.0:48000

However, when I try to ping the agent from Odoo, I receive the following error:

HTTPSConnectionPool(host='example.com', port=48000): Max retries exceeded with url: /app/asterisk_plus/agent (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7206c5653430>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

What I’ve observed so far:

  • The agent is successfully connected to the AMI on FreePBX.
  • Port 48000 is listening inside the agent container (0.0.0.0:48000).
  • The issue appears to be with Odoo being unable to reach the agent when using the proxy/Nginx.

Question:

How should I properly expose or proxy the agent’s HTTP server (running on port 48000) so that Odoo, which is behind Nginx and a proxy, can communicate with it? Do I need to configure a reverse proxy rule in Nginx for port 48000, or should this be handled differently?

Any guidance on the correct network/proxy setup would be appreciated.

Avatar
Discard
Justinol
Author Best Answer

I was able to resolve the initial connectivity issue. My Odoo instance and FreePBX are hosted on separate servers. Initially, I had configured the Agent URL with my Odoo server’s hostname, which prevented proper communication. After updating the Agent URL to use the FreePBX server’s hostname, the connection is now working successfully.


However, I am currently facing three issues:


CRM Integration: Call recordings and call-related data are not appearing in the CRM leads.


Default Country Code Issue: When making calls from the Contacts module using numbers without a “+” prefix (e.g., 1234567890), a default country code (e.g., +61) is automatically prepended, resulting in numbers like +611234567890, which prevents the call from connecting.


Calls with “+” Prefix: When dialing numbers that already include the “+” prefix (e.g., +1234567890), the number is correctly formatted, but the call still fails to connect.


I would appreciate guidance on resolving the CRM integration for recordings and ensuring that numbers are dialed correctly from Odoo, both with and without the international prefix.

Avatar
Discard
Max

Hello.
1. You must create routing rules in your FreePBX. Asterisk Plus always use numbers in E.164 format. So you must configure FreePBX to manipulate numbers as required by your provider.
2. CRM integration is done in Asterisk Plus CRM module that is EE not CE. Send your request for a quote.
P.S. Check out MikoPBX.com, it's a very good Asterisk based system.

Max
Best Answer

Hello!

Thanks for the question.

Nginx has nothing to do with the outgoing connection from Odoo to the Agent. The Agent port 48000 must be accessible from the Odoo host.

I see you are using example.com for the Agent’s connection to Odoo (I assume example.com is just a placeholder for the real hostname you use):

agent-1 | 2025-09-01 06:04:42,238 - __main__:612 - INFO - Connecting to Odoo at https://example.com

So, the connection from the Agent to Odoo works through Nginx.

Now you need to create a connection from Odoo to the Agent using the Agent’s hostname (not example.com—that is the Odoo hostname). Either use the Agent’s IP or hostname in the Agent URL field, or use internal Docker addresses or service names that are reachable from Odoo.

Let me know if this helps.

Avatar
Discard
Justinol
Author

I was able to resolve the initial connectivity issue. My Odoo instance and FreePBX are hosted on separate servers. Initially, I had configured the Agent URL with my Odoo server’s hostname, which prevented proper communication. After updating the Agent URL to use the FreePBX server’s hostname, the connection is now working successfully.

However, I am currently facing three issues:

CRM Integration: Call recordings and call-related data are not appearing in the CRM leads.

Default Country Code Issue: When making calls from the Contacts module using numbers without a “+” prefix (e.g., 1234567890), a default country code (e.g., +61) is automatically prepended, resulting in numbers like +611234567890, which prevents the call from connecting.

Calls with “+” Prefix: When dialing numbers that already include the “+” prefix (e.g., +1234567890), the number is correctly formatted, but the call still fails to connect.

I would appreciate guidance on resolving the CRM integration for recordings and ensuring that numbers are dialed correctly from Odoo, both with and without the international prefix.

Justinol
Author

I was able to resolve the last two issues, which were related to dial patterns. After adding the dial pattern in the outbound route on FreePBX, the calls are now connecting correctly.

The only remaining issue is that I am unable to view call recordings and call details within the CRM leads. Could you please advise if some specific settings or configurations need to be enabled in order for the recordings and call data to appear in the CRM?

Max

Can you please mark your question as resolved. Thx.

Justinol
Author

I'm unable to mark it as resolved, as it gives me a Karma Error as below.

2500 karma is required to perform this action.

Related Posts Replies Views Activity
1
Aug 25
68
2
Jul 25
215
2
Jun 25
200
1
May 25
182
2
May 25
175