asterisk / asterisk-feature-requests

A place to submit feature and improvement requests for the Asterisk project. Contains no code.
2 stars 1 forks source link

Add support for ndots to unbound resolver #37

Open lgyurci opened 1 month ago

lgyurci commented 1 month ago

Severity

Trivial

Versions

20.5.0

Components/Modules

Tested in pjsip, but probably an issue everywhere else

Operating Environment

Fedora 38

Frequency of Occurrence

Constant

Issue Description

As the title says. Suppose you have a resolv.conf:

search anything.something.example.com something.example.com example.com
nameserver 10.0.0.1
options ndots:4

And an asterisk config snippet like:

[reg1]
type=registration
transport=transport-udp
client_uri=sip:pbx@nothing.everything.local
server_uri=sip:registrar@nothing.everything.local

Then asterisk will only try to resolve nothing.everything.local, and for example, not nothing.everything.local.example.com, like the underlying operating system would. While the workaround for this is easy, this causes confusion, especially in kubernetes environments. This way, the registrartion will be shown as rejected, while asterisk just couldn't resolve the domain properly, while everything else in the system could.

Relevant log output

No response

Asterisk Issue Guidelines

seanbright commented 1 month ago

libunbound ignores those settings. We would have to implement this behavior ourselves.