Help with a Setup Im trying to complete.

Status
Not open for further replies.

Andyd358

Member
Aug 23, 2018
245
8
18
55
UK
We currently have our PBX in the cloud on ovh and this works fine.

To save some cost I want to move this in house using spare hardware we have and two internet connections we have spare. Also have spare hardware that we can use.

I have setup the following:

3 x Proxmox servers utilising failover and replication.

FusionPBX installed on PVE1 which is replicated to PVE2, PVE3 providing the quorum for HA.

This part works well and is fine. However, I was hoping to use the two separate internet connections I have to provide connection failover. I have put in a Mutli Wan router using a TP link ER605 and Port forwarding all the relevant ports. (Also have a router in so when an outbound route using 9 is sent to the second SBC, just to test so i dont have to keep unplugging an internet connection)

The IP for the domain is controlled via DNS Made Easy, so if one connection fails the DNS is switched over (this works fine). If one of the Internet connections go down the router fails over to the second straight away, again this works well.

The connections I have are 1 x GFast 160/30 single static IP, 1 x Ethernet 100/100 single static IP

The issue I have at the moment is if ISP one fails everything switches over, but the calls fail due to the fact that FusionPBX sends the original IP to the second SBC and is rejected.

I understand this is due to having to use autonat:xxx.xxx.xxx.xxx for the calls to go out and connect to the Gamma SBC

I tried to switch the external_rtp_sip and external_sip-ip to $$(External_rtp_ip) and $$(external_sip_ip) but this did not seem to work. The External IP’s seemed to get mixed up when it failed over.

Gamma Sip trunk authenticate via IP address, so I’m trying to work out how to achieve this.

Just to add this as Fusionpbx 5.0.1 on Debian 11

Any suggestions are welcome. I know people will say why not just keep it on OVH but we have the kit here sat doing nothing so may as well use this and save the cost of the OVH server.



Any hints, help or people saying I’m stupid are welcome
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
Have you tried restarting the external profile when the failover has happened?
 

Andyd358

Member
Aug 23, 2018
245
8
18
55
UK
Have you tried restarting the external profile when the failover has happened?
Hi Daz

Yeah Ive tried restarting freeswicth, even rebooted the whole VM it still seems to send the orginal IP with the invite andf them Gamma SBC rejects it and i tend to get a 403 error
 

Andyd358

Member
Aug 23, 2018
245
8
18
55
UK
Just to Add something else ive just noticed Ive set an outbound route to use SBC A then as an alternative use SBC B but it times out and does not seem to switch to use the second gateway. (Hope that makes sense)
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
Are you replacing the external sip/rtp ips on failover?

If so and its still not working, before restarting the external profile, flush cache

Code:
rm -fR /var/cache/fusionpbx/*
 

Andyd358

Member
Aug 23, 2018
245
8
18
55
UK
Are you replacing the external sip/rtp ips on failover?

If so and its still not working, before restarting the external profile, flush cache

Code:
rm -fR /var/cache/fusionpbx/*
Currently got the variables set as follows:
1654962052795.png
I suppose I have understood it incorrectly I was hoping that with it set as tis that it would send it out on the new second IP address once its failed over.

IF i chnage the to Autonat:xxx.xxx.xxx.xxx (second IP) the call connects but as Ivev jjust discovered there is no audio.

I was kind of hoping that getting this setup would auto fail over without having to access and chnage anything I'm obviously wrong and just wishing that this would have worked and almost been a easy was to have High Availability.
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I'l give it a shot this week as I have a couple of WAN connections here and plenty of hardware....

I think it will amount to something like this in the vars

<X-PRE-PROCESS cmd="exec-set" data="external_rtp_ip=curl -s ifconfig.co/>
<X-PRE-PROCESS cmd="exec-set" data="external_sip_ip=curl -s ifconfig.co"/>

I guess freeswitch is definitely going to need a restart as these variables get populated at start up, there must be a way to do this dynamically.
 

Andyd358

Member
Aug 23, 2018
245
8
18
55
UK
I'l give it a shot this week as I have a couple of WAN connections here and plenty of hardware....

I think it will amount to something like this in the vars

<X-PRE-PROCESS cmd="exec-set" data="external_rtp_ip=curl -s ifconfig.co/>
<X-PRE-PROCESS cmd="exec-set" data="external_sip_ip=curl -s ifconfig.co"/>

I guess freeswitch is definitely going to need a restart as these variables get populated at start up, there must be a way to do this dynamically.
Morning Daz, that woul dbe great if you could give it a try. Appreicate you help on this as always.
 
Status
Not open for further replies.