This is an old revision of the document!
Dynamically Configured Mass Virtual Hosting
Contact: Jan Janak
The sip-router server can be configured with support for multiple virtual domains hosted on the same server. The domain module of sip-router maintains a list of all supported domains.
Currently, the domain module stores the list of all supported virtual domains in the database. The table named 'domain' contains the list of all domains supported by the sip server. To add support for a new domain, the administrator of the sip server has to add the new domain to the table.
This is often not necessary, because we can try to figure out whether a domain is local by consulting the DNS. If the sip-router server receives a request for a domain that is not on the list of supported domains then the domain module can lookup the SRV record for _sip._udp in that domain and if it points to the server itself then the server is reponsible for the domain. In such case the domain module will add the domain to the list of supported domains automatically.
The advantage of this approach is that there is no need to modify the contents of the database each time a new domain is added to the system.
The goal of this work is to extend the domain module with support for dynamically configured virtual domains that have not been pre-configured in the database, but have been obtained from DNS instead.
In version 2 the domain module should also check the TTL of DNS records and delete dynamically configured virtual domains if the records do not point to the server anymore.