Marek Greško
2023-Nov-07 15:19 UTC
[asterisk-users] Local calls not possible when Internet connection down
Hello, well I do not ask those who only guess, but those who know what is asterisk expected to do when internet connectivity goes down. I did not had a chance to make internet not to work yet, since it is needed. But inspecting dns logs I found out that there started to be resolving for _sip._tcp and _sip._udp records for the provider's server. So apparently making hosts record make asterisk happy when everything works, but when there is a communication problem then it falls back to searching for srv records. At least it seems to be so for now. Moreover I found out this old thread: https://community.freepbx.org/t/asterisk-become-mad-when-a-dns-problem-occur/4755/10 So the problem seems to be still present. So if asterisk is not able to resolve using it's dns resolver it breaks also local communication which is complete non-sense. I am thinking of two possible workarounds: 1. If thre is a possibility to convince asterisk not to fallback to searching for srv records, it would be ideal. Is somebody aware of such options in pjsip? 2. If the first workaround is not feasible I can create rpz records for provider's A and SRV records. When I will be able to shutdown internet or at least outbound DNS, I will try to make sure my findings are correct using tcpdump. Thanks Marek Sent with Proton Mail secure email. ------- Original Message ------- On Tuesday, November 7th, 2023 at 0:46, Greg Troxel <gdt at lexort.com> wrote:> Marek Greško marek.gresko at protonmail.com writes: > > > But I am not sure why this is happening. I have sip providers hostname > > in /etc/hosts file to prevent such situations. Should I reconfigure it > > not to use hosts file but rather some RPZ on DNS server? Does asterisk > > ignore hosts file? Or does it try to do some srv lookups? But in > > either case, why does this influence local calls? Local domain should > > really be resolvable. > > > You should run tcpdump on 53 and 5353 in multiple places and figure out > what it is doing, rather than asking us, who can only guess.
Joshua C. Colp
2023-Nov-07 15:28 UTC
[asterisk-users] Local calls not possible when Internet connection down
On Tue, Nov 7, 2023 at 11:20 AM Marek Greško <marek.gresko at protonmail.com> wrote:> Hello, > > well I do not ask those who only guess, but those who know what is > asterisk expected to do when internet connectivity goes down. I did not had > a chance to make internet not to work yet, since it is needed. But > inspecting dns logs I found out that there started to be resolving for > _sip._tcp and _sip._udp records for the provider's server. So apparently > making hosts record make asterisk happy when everything works, but when > there is a communication problem then it falls back to searching for srv > records. At least it seems to be so for now. Moreover I found out this old > thread: >The expectation is that Asterisk continues to work. That being said there is one case (specifically using realtime with an identify section that references a hostname) that can cause this specific behavior where PJSIP will block. Are you in that scenario? If so you CAN disable SRV records on the identify by setting "srv_lookups" to "no". -- Joshua C. Colp Asterisk Project Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20231107/c7fa43a9/attachment.html>
Maybe Matching Threads
- Local calls not possible when Internet connection down
- Local calls not possible when Internet connection down
- Local calls not possible when Internet connection down
- Local calls not possible when Internet connection down
- Local calls not possible when Internet connection down