Make an script that does that. You already got the STUN code, just sed sip.conf, sip reload, voila... Put cron to work... Simple as a potato. If don't like the cron idea make pf signal the failover
2016-10-23 19:19 GMT-02:00 Francesco Pasqualini <[email protected]>: > Yes indeed I have two static IP. One for the first gateway (the main) e > one for the second gateway. > > I'm not trying to solve a my problem, but trying to explain the usefulness > of a new asterisk feature: dynamic autoresolve of external IP address. > > It is useful for dynamic IP and/or for multiwan failover configuration. > > thanks > > On Sun, Oct 23, 2016 at 11:13 PM, Nabeel <[email protected]> wrote: > >> Can you get a static public IP from your ISP? I think that may solve part >> of your problem. >> >> On 23 Oct 2016 9:55 p.m., "Francesco Pasqualini" <[email protected]> >> wrote: >> >>> >>> I have asterisk in DMZ with private IP. >>> The firewall is pfsense with two WAN gateway in failover mode >>> >>> https://doc.pfsense.org/index.php/Multi-WAN#Failover >>> >>> >>> I want to avoid the need to use a script to reconfigure asterisk in the >>> event of external IP change (for example if the main gateway go down) >>> >>> http://lists.digium.com/pipermail/asterisk-users/2012-Februa >>> ry/270057.html >>> >>> >>> >>> thanks >>> >>> On Sun, Oct 23, 2016 at 8:24 PM, Guido Falsi <[email protected]> wrote: >>> >>>> On 10/23/16 11:58, Francesco Pasqualini wrote: >>>> > OK interresting. >>>> > >>>> > Is there a recipe to configure asterisk behind NAT with two WAN >>>> failover ? >>>> > >>>> >>>> I know no recipe, since WAN failover means your IP is moved on to the >>>> standby connection when links are switched. If this is not the case what >>>> you have isn't really a WAN failover, but just two unrelated internet >>>> connections and a router balancing them with a failover logic. >>>> >>>> If the IP changes when the WAN link is switched there is no way the >>>> router, or asterisk or anything in your LAN can do to bring over >>>> existing connections. >>>> >>>> Asterisk using ICE will analyze the active connection at call time and >>>> insert SDP information pertinent to that one for the call. So it will >>>> work correctly for whatever link is being used as long as it is used. >>>> Active calls when the link is switched due to a failure on the main one >>>> will go mute and time out. >>>> >>>> As Joshua Colp stated, ICE needs the other party to also have ICE >>>> enabled to work correctly, so you also need collaboration from the other >>>> side of the communication. >>>> >>>> Maybe if you explain better what you have and what you are trying to >>>> achieve some better suggestion can be given. >>>> >>>> -- >>>> Guido Falsi <[email protected]> >>>> >>>> -- >>>> _____________________________________________________________________ >>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>>> >>>> asterisk-dev mailing list >>>> To UNSUBSCRIBE or update options visit: >>>> http://lists.digium.com/mailman/listinfo/asterisk-dev >>>> >>> >>> >>> -- >>> _____________________________________________________________________ >>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>> >>> asterisk-dev mailing list >>> To UNSUBSCRIBE or update options visit: >>> http://lists.digium.com/mailman/listinfo/asterisk-dev >>> >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> asterisk-dev mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-dev >> > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-dev mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-dev >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
