FreePBX in Cloud and Gateway FXO

Hello to all,
I state that about the subject, I have some fundamental knowledge. But the time has come to address them so that I can solve the needs I am having.

Before describing the topic and problems for which I wrote this post, I make a quick summary of my current system (FreePBX) and what I would like to add.

Synthetic summary.

  • My FreePBX is installed in the Cloud (it can be reached through a static public address made available by my data center provider).

In FreePBX, some sip trunks are currently configured to connect some geographic numbers purchased from VoIP line providers.

  • My internet connectivity and PSTN line arrives in my office through the router provided by my telephone and data service provider. Also, in my office on my desk, I have a VoIP phone with some extensions registered. Everything works fine.

  • Now, I would like to be able to use the VoIP numbers also my PSTN line.

To fulfill my desire to make both inbound and outbound calls with my PSTN line, I purchased a VoIP FXO Gateway (Yeastar TA810). The FXO VoIP Gateway is placed inside my office network, which is assigned a static IP address and I connect one of the two RJ11 telephone sockets on my router to an FXO port on my Gateway.

In the Gateway I create a Service Provider trunk that points to my FreePBX in the Cloud through its public static address:

image

I also provide in LAN settings in my Gateway to set a static private address (consistent with the local network of my office as follows):

image

In the SIP settings of my Gateway I have configured as follows:

As you can see, I have set UDP as port 6060 because when FreePBX tries to connect to my router’s static public address in the office, the router does not allow port forwarding to port 5060 to the Gateway FXO placed in the internal office network. While if I use the 6060 port, my router will be able to do the port forwarding of the 6060 UDP port towards the Gateway in the corporate LAN.

image

Finally, to manage outbound calls from the VoIP phone in the Gateway, set the IP-> Port in the Routes Settings section as follows:

image

While managing incoming calls, always in the Routes Settings section, I set the Port-> Ip / Port as follows:

image

In FreePBX placed in the Cloud (external network to that of the office) I configured a pjsip trunk as follows:

image

I enable this trunk (for the management of my PSTN). On my VoIP phone placed on the desk, all the configured extensions are disconnected, including those that use the VoIP trunks. Also is disconnected the extension dedicated to using the PSTN.
What is not understandable to me is that if I use a softphone on my mobile phone, using 4G data connection(Zoiper), all extensions work, I can make outgoing calls and receive calls PSTN line placed in my office.

Could you help me understand what I’m doing wrong? Even simply from a conceptual point of view? I wonder if an FXO Gateway must be inside the same LAN as the PBX, but in this case, it is a virtualized FreePBX in the Cloud… Why does everything work with the mobile phone using the 4G connection? Of course, if I use my mobile phone with the office Wi-FI, it stops working too.

I apologize for the long post. Any help and advice would be valuable to me.

I appreciate any help you can provide.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.