RECOMMENDATIONS Two trunks to same provider with different WAN's

Discussion in 'Help' started by Michael_Melb, Jan 28, 2019.

  1. Michael_Melb

    Michael_Melb New Member

    Joined:
    Nov 11, 2013
    Messages:
    5
    Likes Received:
    1
    I'm hoping that someone might be able to help me with some ideas here.

    I have an IncrediblePBX that is successfully running behind a pfSense firewall. It has been working for many years. I have two WAN's and there is failover configured. The failover works and the PBX trunks eventually re-register, but there is a time in between (up to 3 minutes) that no calls in or out work.

    To improve on this, I would like to register two separate trunks with my ITSP. One out WAN1 and the other out WAN2. I can then configure the ITSP to automatically route the calls down the backup trunk (WAN2) if the main trunk (WAN1) is offline.

    I have however hit a stumbling block. My ITSP does not have a different hostname or port that I can use to allow pfSense to distinguish the destination and route the two trunks to different WAN's. Because I am using one PBX, I can't use the source to distinguish either.

    I was thinking of using something like FreeSwitch on a different device as a proxy for the backup trunk, but I don't know if that will work or where to start.

    Looking forward to any help on this.
     
    #1 Michael_Melb, Jan 28, 2019
    Last edited: Jan 29, 2019
  2. AndyInNYC

    AndyInNYC Active Member

    Joined:
    May 23, 2013
    Messages:
    497
    Likes Received:
    67
    Flowroute allows for Host-based routing; if you are on different WANs, I'm assuming you have different public IPs. Who is your Provider?
     
  3. Michael_Melb

    Michael_Melb New Member

    Joined:
    Nov 11, 2013
    Messages:
    5
    Likes Received:
    1
    Thanks for your reply. I am in Australia and my provider is Maxotel. Yes, I also have two static IP's.
    The very problem is that I can't send two different registrations to the same host and port from the same PBX through two WAN's.

    I have played with a second IncrediblePBX on a Raspberry Pi linked to the main one, forwarding calls. This allows me to fix the Internet Gateway for the main PBX to WAN1 and fix the Internet Gateway for the Raspberry Pi to WAN2. It seems to work. Does anyone know of any problems with doing this?
     
  4. Eliad

    Eliad Member

    Joined:
    Aug 13, 2017
    Messages:
    95
    Likes Received:
    14
    Try this it might help a little.
    System/Advanced/Miscellaneous, Gateway Monitoring click on Flush all states when gateway is down.
    I have a similar setup failover 2WAN pfSense. one problem that I found is when on gateway goes down pfSense does not clear the states. I found doing this helps recovering much faster when one gateway goes down.
     
    wardmundy likes this.
  5. Michael_Melb

    Michael_Melb New Member

    Joined:
    Nov 11, 2013
    Messages:
    5
    Likes Received:
    1
    Thanks @Eliad. I have this setting set in pfSense too, but I find for this particular application that the downtime during re-registration is unacceptably slow. Having two trunks registered over different links and getting the ITSP to do the failover is IMO an efficient way to reduce the trunk downtime.

    I have gone down the path of using a second IncrediblePBX on a Raspberry Pi and linking it with the main PBX via IAX. Then setting the inbound route on the second PBX to forward to the first one. Seems to be working well.

    Thanks to all for your replies. I truly appreciate your input.
     
    Eliad likes this.
  6. Eliad

    Eliad Member

    Joined:
    Aug 13, 2017
    Messages:
    95
    Likes Received:
    14
    You got a good solution. I have been struggling with the same issue for a long time. I will give it a try. I just came with another idea (not sure if it works) is to have a second trunk provider registered to the backup IP and when the main IP fails to have the main trunk provider forward to the second trunk provider. This could simplify the setup if it works.
     
    Michael_Melb likes this.
  7. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,507
    Likes Received:
    2,471
    FULL DISCLOSURE: Skyetel supports Nerd Vittles and Incredible PBX open source projects through funding.

    This is an area where the Skyetel SIP service really shines. They have 3 redundant platforms in 3 separate Amazon regions. All three service your calls, incoming AND outgoing. Once a call is connected, Skyetel is completely out of remainder of the call. RTP data does not pass through Skyetel at all. If one region fails (or even two), you'd never know it. Bottom line: it's so much easier to let your ITSP manage redundancy especially when it's totally transparent. $50 credit to try them out is available for a limited time on Nerd Vittles.
     
  8. Eliad

    Eliad Member

    Joined:
    Aug 13, 2017
    Messages:
    95
    Likes Received:
    14
    Ward, I will give it a try since fist $50 is free. When I looked a Skyetel schematics on how their system works I did not get the impression Skyetel could't handle 2 connections to a 2WAN failover firewall system. I thought at my end will be still connected to just one IP.
    My main ISP is Charter Spectrum cable and it sucks, my internet connection has a wide variation which is no good for VOIP. Unfortunately here the choice of an ISP is very limited. The other connection i have is Centurylink DSL which does not provide enough bandwidth for a daily operation, it is barely enough when Spectrum is out. The monopoly of the ISP's here in America allows no decent competition. Europe is so much better in this regard.
     
  9. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,507
    Likes Received:
    2,471
    @Eliad: You can only be connected to one IP address at a time. But, if you deploy Skyetel's new dynamic IP address updater, I think it will do exactly what you're looking for. The IP updater is covered in the last section of our Nerd Vittles tutorial.