SIP trunk connecting using a proxy

Hello everyone, I have created several topics on this subject trying to explore different possible solutions, but unfortunately, after a week, I still haven’t solved the problem.

I have a FreePBX server that works correctly on DigitalOcean, and I have a TRUNK on VOIP.ms for incoming calls. For outgoing calls, I would like to use the SIP Trunk of my internet provider, Vodafone Italy, which unfortunately limits SIP connections to local ones only. I’ve thought of several solutions, but since I don’t yet have a server at home (to host FreePBX), I thought of installing a proxy on my Raspberry Pi.

Is there a way, for example, to host a proxy on my Raspberry Pi locally and enter the SIP Trunk credentials on the FreePBX hosted on DigitalOcean and use the proxy for connecting? I have never understood what the “Outbound proxy” section is for when configuring a Trunk on FreePBX… Could this be a solution?

What ‘proxy’ do envision installing on a raspberry? Is the raspberry behind a firewall? Does the raspberry have a static ip?

As I have told you twice already your easiest option is a generic reverse proxy on your droplet that forwards name based connections to your voip server but drops those to your public IP that would otherwise attempt go to the same server,

Hi, sorry, I didn’t see your message. Could you explain it better? It’s not very clear to me what I should do.

You will have to explain what exact test does your provider apply to decide if it is local,

I can only connect to the local SIP VOIP (the one from Vodafone) if I am connected to the Vodafone network. I have tried many things, but Vodafone blocks external VOIP connections and only allows them from the local network.

I have also installed FreePBX on my local Raspberry Pi. If there is a way to make the FreePBX on DigitalOcean communicate with the local one (where I have installed my Vodafone trunk that works correctly), it wouldn’t be a bad idea. Otherwise, if you could explain better what you mean by “generic reverse proxy on your droplet that forwards name based connections to your VOIP server but drops those to your public IP that would otherwise attempt to go to the same server,” because I didn’t understand.

Not easy to build a trunk from DO to a behind the curtains box, but you can build a trunk from your pi to DO, just register the trunk with a user and password, unfortunately it will generally break incoming connections everytime your IP changes, you can set up DDNS that is messy, a tunnel of some sort to is your best bet, openvpn being the easiest (but probably slowest) to implement.

You could also offload all thatfor 15 euros to something like

I can easily install a system like No-IP on the Raspberry Pi. Meanwhile, what do you mean by “but you can build a trunk from your Pi to DO, just register the trunk with a user and password”? What can I use to build a trunk on my Pi and then on DigitalOcean? It’s not very clear to me.

You don’t build it directly on the Pi. you build it just like any other trunk on the FreePBX instance on the Pi, have you read the wiki or any of the other resources explaining this yet? (I suggest you only do do pj_sip)

Unfortunately, no, I haven’t read anything about it. Anyway, I have an instance on the Raspberry Pi with FreePBX (RaspBX), I installed the trunk and it works correctly. However, I need to make it communicate with DigitalOcean since my colleagues’ phones are connected via extensions on FreePBX on DigitalOcean.

Sorry, not going to do your homework for you :slight_smile: Ask your colleague

I’m not asking you to do my homework for me, of course. However, if you have a guide on how to make the two PBXs (DigitalOcean with the one on Raspberry) communicate for outgoing calls, I would be grateful as I can’t find anything on Google. Before making this post on this forum, I searched everywhere, but found nothing.

As they say, RTFM (all of them, twice) then you will know a little more . . .

Good Hunting,

Ciao

Excuse me, but is the forum for seeking help or what? If you don’t feel like helping me, there’s no problem, I’ll wait for someone else. But telling me RTFM when I’ve searched everywhere and found nothing doesn’t solve anything.

We will have to agree to disagree here, I have RTFM’s a lot (and even written a few) I learned more than a lot, probably because I didn’t give up. Roll your sleeves up and try over maybe?

Or maybe just pay for a better VSP?

IMO you are trying something needlessly complex. Consider one of the following:

  1. Give up on the cloud PBX and run your phone system entirely on the Pi. One of the biggest advantages of a cloud PBX is that during a power failure or internet outage, the system continues to function and you can make and take calls on mobile phones. Unfortunately, with your proposed hybrid setup, you would lose access to your primary number anyway, so there is little advantage to the cloud system. Your colleagues would register to the home system instead.

  2. Use the simplest VPN setup (probably OpenVPN or Wireguard) and set up routing on both ends so the DO system accesses the Vodafone server via the tunnel. At the home end, your router may be capable of running the VPN, or you may have some other capable device (Windows, Mac or Linux) that runs 24/7, so you wouldn’t need the Pi. If not, the Pi can function as a tunnel endpoint.

  3. Give up on the Vodafone trunk and get a commercial SIP trunk instead. Perhaps one of these plans would suit your needs: Il numero VoIP per professionisti e aziende .

Thank you very much for the response. I had already thought of these two initial solutions, but they are not feasible. I simply want to connect the two PBXs together, so that when one of my colleagues makes an outgoing call to an Italian number (39XXXXXXXXXX) from DigitalOcean, the call is handled by the local FreePBX server (since it has the Vodafone trunk that works correctly). Unfortunately, I can’t find any guide on how to do this, even though I know it can be done.

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