Domain
From Pbxnsip Wiki
Before you can start to use the PBX, you must set up at least one domain. By default, the PBX will create a domain called "localhost" for you.
A domain is like an email domain. It groups a number of users. These users are able to call each other without going through a trunk. Additional features like call pickup can be configured and might have additional restrictions. If you can, you should set up your DNS accordingly, so that uses from other domains can find the group by standard DNS name resolution.
You may have several names for a domain (domain alias). One of these names will be the "primary" (canonical) name for the domain. The PBX will use that name whenever it has to generate a name for the domain.
In the profession version of the product, domains may have a limited number of accounts. This feature is necessary for hosted environments, where you want to make sure that customers are not using more accounts than you have sold to them.
The domain that has the name "localhost" (or an alias name "localhost") has a special function. It will match all requests that cannot be matched to a domain name in the domain list. This makes it possible to run the PBX on changing IP addresses without changing the name of the domain and significantly simplifies the setup of the PBX in environments where only one domain is needed.
It is recommended that the domain "localhost" should not be deleted, since it is there for convenience. If you have another named domain other than "localhost", it is useful to use the pbx's IP address as an alias name for that domain, so that the pbx will recognize the IP-phones that you may have setup, particularly to a specific domain, instead of localhost. This is helpful for breaking down a company's departments, such as Technical Support, Billing, Payable, Executive team, into domains.
Domain names may be IP version 4 addresses. Especially when you cannot change DNS, you might want to assign such a name to a domain. However, you must be sure that the host is always running on that IP address, if you are assigning IP addresses by DHCP you have to be careful with this method.
You may mix IPv4 names with DNS addresses. You may also later rename the domain names and reassign the primary domain name.
