<div dir="ltr">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.<div>If don't like the cron idea make pf signal the failover</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-23 19:19 GMT-02:00 Francesco Pasqualini <span dir="ltr"><<a href="mailto:frapas@gmail.com" target="_blank">frapas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes indeed I have two static IP. One for the first gateway (the main) e one for the second gateway.<div><br></div><div>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.</div><div><br></div><div>It is useful for dynamic IP and/or for multiwan failover configuration.</div><div><br></div><div>thanks</div><div><div class="h5"><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 23, 2016 at 11:13 PM, Nabeel <span dir="ltr"><<a href="mailto:nabeelshikder@gmail.com" target="_blank">nabeelshikder@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Can you get a static public IP from your ISP? I think that may solve part of your problem.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 23 Oct 2016 9:55 p.m., "Francesco Pasqualini" <<a href="mailto:frapas@gmail.com" target="_blank">frapas@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>I have asterisk in DMZ with private IP.</div><div>The firewall is pfsense with two WAN gateway in failover mode<br><br><a href="https://doc.pfsense.org/index.php/Multi-WAN#Failover" target="_blank">https://doc.pfsense.org/index.<wbr>php/Multi-WAN#Failover</a><br><br><br>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)<br><br><a href="http://lists.digium.com/pipermail/asterisk-users/2012-February/270057.html" target="_blank">http://lists.digium.com/piperm<wbr>ail/asterisk-users/2012-Februa<wbr>ry/270057.html</a><br><br><br></div><div><br></div><div>thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 23, 2016 at 8:24 PM, Guido Falsi <span dir="ltr"><<a href="mailto:mad@madpilot.net" target="_blank">mad@madpilot.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 10/23/16 11:58, Francesco Pasqualini wrote:<br>
> OK interresting.<br>
><br>
> Is there a recipe to configure asterisk behind NAT with two WAN failover ?<br>
><br>
<br>
I know no recipe, since WAN failover means your IP is moved on to the<br>
standby connection when links are switched. If this is not the case what<br>
you have isn't really a WAN failover, but just two unrelated internet<br>
connections and a router balancing them with a failover logic.<br>
<br>
If the IP changes when the WAN link is switched there is no way the<br>
router, or asterisk or anything in your LAN can do to bring over<br>
existing connections.<br>
<br>
Asterisk using ICE will analyze the active connection at call time and<br>
insert SDP information pertinent to that one for the call. So it will<br>
work correctly for whatever link is being used as long as it is used.<br>
Active calls when the link is switched due to a failure on the main one<br>
will go mute and time out.<br>
<br>
As Joshua Colp stated, ICE needs the other party to also have ICE<br>
enabled to work correctly, so you also need collaboration from the other<br>
side of the communication.<br>
<br>
Maybe if you explain better what you have and what you are trying to<br>
achieve some better suggestion can be given.<br>
<span class="m_6368149424581105483m_6513252282707717109m_3159231270722238120HOEnZb"><font color="#888888"><br>
--<br>
Guido Falsi <<a href="mailto:mad@madpilot.net" target="_blank">mad@madpilot.net</a>><span class="m_6368149424581105483HOEnZb"><font color="#888888"><br>
<br>
--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-dev</a><br>
</font></span></font></span></blockquote></div><span class="m_6368149424581105483HOEnZb"><font color="#888888"><br></font></span></div><span class="m_6368149424581105483HOEnZb"><font color="#888888">
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-dev</a><br></font></span></blockquote></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-dev</a><br></blockquote></div><br></div></div></div></div></div>
<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div>