About user configuration in freeSwitch

117 Views Asked by At

Here comes a page:

XML User Directory

In the page,there is section 1.1 and 1.2,what is the diffrent,they are both user configure file right,why one is start with include attrubute,another is domain attribute,,when to use the first kind and when to use the second?

1

There are 1 best solutions below

0
On

The documentation clearly mentions that the domain tag tells FreeSWITCH to which domain the user belongs to. This will come into picture only when you want to provide service to multiple tenants/ companies through your FS. In that case you can create multiple domains in your FS and each domain can have the same extension range. You will have to write different dialplans for each of these domains.

When a domain is not mentioned, FS will consider that user to be part of the default domain. Thus the domain tag is not mandatory. I hope that explains your doubt about the domain tag.

The include tag just means that the xml which follows will be a xml snippet, to be included into the main xml. If you check the directory default.xml in your FS, you will notice the section:

<users>
    <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
</users>

Thus will cause FS to go inside the default directory and include all the xml in there. It's a good practice to put these xmls for individual users inside an include tag, but I believe there is no compulsion to do so.