Problem with trunk SIP

Hello,

I have a problem with trunk SIP when I connect my Asterisk to my provider and the Internet connection is lost, the trunk SIP will be unreachable, the problem consist is all local extension are disconnected until the Internet connection will be up or I deactivate the trunk.

The second problem was sometimes, the Internet connection will be up and the trunk still down until I make asterisk -rx "reload" The same problem was detected if I make a system reboot, the trunk will be reachable only if I reload asterisk.

Any solution for this problem?

Thank you in advance for your help
Note: My asterisk version is 1.8.15 (certificate version)

The first problem is likely to be due to your not having valid reverse DNS for your LAN addresses. When you connect to the internet DNS can determine that no-one has DNS data for your LAN addresses, but when you are disconnected, it will get a temporary DNS failure, which is not definitive.

If you intend ot operate a network in isolation, you should run a local DNS server and make it authoritative (assuming your LAN is 192.168.x.x) for 168.192.in-addr.arpa. It is also possible to use /etc/hosts, but you will need to provide an entry for every address in use.

Running a local DNS server for your in-addr.arpa sub-domain is always desirable, as it removes wasted traffic from the internet.

The second one may be forcing a re-register, or you may have an unstable IP address. I’d be surprised if you needed more than sip reload. Asterisk cannot detect that the internet is up until it next tries to register, or make an outgoing call. It will only resolve forward DNS when reloading the configuration.

This is a discussion forum. Ypou should have used Asterisk Support for support questions, like this.

thank you a lot for the link, it is very interesting , the solution that I used:

[code]# /etc/hosts

I have added this line

ip_provider dns_name_provider[/code]

[code]#/etc/nsswitch.conf

Just I changed the order of dns files

.
.
.
hosts: dns files[/code]

And it works :smile: