[asterisk-users] No retry after DNS failure
Michael Strelnikov
michaelst at gmail.com
Mon Aug 21 23:49:46 MST 2006
I have the similar problem but with IAX.
I have two servers. First is primary with dynamic IP and open 4569 port.
Second is behind firewall.
If first server is being disconnected for some time, the second server
cannot reconnect. I have to either restart asterisk or stop it, wait for
some time and start it again.
The same situation is happening when primary server changes IP address.
On 8/22/06, John Marvin <jm-asterisk at themarvins.org> wrote:
>
> Today I had a brief power outage which caused the Asterisk server and
> DSL modem to reboot. The Asterisk server came up before the internet
> connection was working, so it failed when try to look up some of the
> hosts for my outbound voip providers in sip.conf.
>
> Asterisk never recovered from that, i.e. it never retried so those
> providers were unavailable. The only provider that was still available
> was one that I had entered the IP address for, rather than the host name.
>
> Have any of you run into this issue, and if so, how have you solved it?
> It seems that since Asterisk periodically tries to reregister it should
> also retry the DNS lookup at the same time, rather than never trying
> again if the lookup fails. This would indicate that Asterisk would also
> fail if the voip provider changed the IP address of its server because
> Asterisk would never see the new IP address.
>
> Here are some workarounds I thought of, but none of them are
> particularly good:
>
> 1) Get a UPS so my machines won't reboot when the power fails. This
> actually might not solve anything, because I'm connected to a remote
> DSLAM in my neighborhood that I believe does not have backup power, so
> it won't work when the power is out. But perhaps Asterisk is more robust
> after it has booted (I'll have to test this).
>
> 2) Change all host names in sip.conf to IP addresses. This is kind of
> ugly and also will break when a voip provider changes their IP address.
> There is a reason for DNS!
>
> 3) Have a cron job send asterisk periodic "sip reload" commands.
>
> 4) Delay the start of asterisk until the internet connection has come
> up. This could cause me to be without any phones if there is any delay
> or failure in bringing up the network (I also have zap channels and PSTN
> lines).
>
> 5) A hybrid of ideas 3 and 4 above: Have a startup script that waits for
> the internet connection to come up, and then sends a "sip reload"
> command to Asterisk.
>
> Any other ideas?
>
> John
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Best regards,
Michael Strelnikov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060821/fd951b09/attachment.htm
More information about the asterisk-users
mailing list