Open palmtown opened 6 years ago
Hi @palmtown , the is_mysql
is not doing any dynamic DNS lookup - it is checking against listeners, aliases and domain (via domain module).
So, if you want something dynamic, try to use the domain
module to push the dynamic list of domains
Hi @bogdan-iancu ,
Thanks for the update, however, note the following:
Having stated that, I believe that users should be able to add wildcard aliases in OpenSIPs because SIP in general allows for wildcard certificates and subdomains are becoming more prevalent. Because the lack of support for wildcard domains, OpenSIPs is not allowing users to configure it to adhere to this industry standard of using wildcard certificates. Even more, the current solution for using the domains table is not feasible as OpenSIPs has to be reloaded.
This can be solved in a variety of very simple ways:
Any one of the above will work, and only one is needed. Because of my urgency, I am willing to pitch in $200 if you offer this as it is causing me problems that I have yet to resolve.
2023 update... wildcard support for domains is relevant for support multi-tenant Direct Routing (and possibly Operator Connect) with Microsoft Teams.
@bogdan-iancu I have a PR that I think solves on our fork, would you have time to discuss the implementation?
I made the change with a flag on the alias, the alias would be sas such
alias=tcp:my.sub.domain.com:5060 wildcard_match
Though I'm thinking of changing the wildcard_match to subdomain_match or something like that
The behaviour this way would be that sip.my.sub.domain.com and company.sip.my.sub.domain.com would match it and even matching the subdomain strictly like my.sub.domain.com would match it too
Thoughts? If you're happy I can open a PR
If Record-Route is set to a hostname that DNS resolves to an IP that OpenSIPs is configured to listen on, and that hostname is not listed as an alias, loose_route will route the transaction to itself causing the call to fail as the is_myself("$si") will return true when checking for loops in addition to other problems.
My issue is that I am using dynamic hostnames which are merely sub-domains pointing to my OpenSIPs server. As a work around, I tried to set alias=*.mydomain.com, but OpenSIPs will fail to start.
Next, I tried to use set_advertised_address and specify the $td, but my call still fails as it does not have the same affect as specifying the hostname in alias. If I set the hostname in alias on startup, everything works fine.
If there a function that I can set alias dynamically as a work around? A solution would be to allow alias values to be wildcards.