But some VoIP providers don’t support direct A/AAAA calls any more, because they use SRV records.
So for creating the dynamic list I need something like:
The only workaround currently available requires scripting. RouterOS is unable to generate a SRV query at all, not just as a way to populate an address list, but it does cache the responses to SRV queries issued by clients. So you can schedule a script that will keep reading the cached responses and update the address list with their contents. Is the following a sufficient hint?
_:foreach dtagSIPs in=[/ip/dns/cache/find where name=_sips.tcp.tel.t-online.de] do={:put [/ip/dns/cache get $dtagSIPs data]}
don’t show any _sips._tcp.tel… entries.
Because if I understand the example correctly, it is based on the cache.
But my clients don’t use the internal dns server of the router.
Hm, but this will result in an huge load on the device I think.
Because the script must be called after every call to the dns service and then hope that the call to the sip server from the client comes after the lists are updated.
Running scripts loads the device several orders of magnitude less than routing packets, so you can literally run the check every second without a noticeable impact.
The phone will send the SYN packet to establish a connection to a new server multiple times before giving up so running the script once per second will be enough.
What worries me more is that the phones do not use the Mikrotik as their DNS server, because although it may be possible to use the traffic generator feature to make the Mikrotik send SRV requests to itself, substituting the absent ability to send them the “normal” way, it may receive a different response than the phone, so the phone may attempt to connect to a server the router does not know about. So you would have to just add the fqdns to the list and never remove them, and still there would be a chance that a phone learns about a new server sooner than the router. But since the phone gets three of them, it should not panic if one of them turns out to be unreachable.
Also bear in mind that the SBCs may use different IP addresses for media than for signalling, so if you want to use the address lists to filter the destinations in the internet towards which the phones are allowed to initiate connections, you may end up with silent calls.
The main reason not to use the build in one is, that it don’t support DNSsec. So all answers are not trusted.
There is an long topic for it here.
So I have created an future request at the support.