User Directory concepts

The User Directory is a (possibly big and complex) XML document that is accessed by FreeSWITCH and all of its modules whenever they need to know about users' attributes. It is in the User Directory that the user's password, which groups (if any) the user belongs to, various and arbitrary variables and parameters related to the user or to the group, and so on are defined.

Each time the FreeSWITCH core or one of its modules needs such an information, it will issue an internal request. That internal request will use one of many different methods to end up with an XML snippet that defines the information requested. So, that XML snippet can be the result of a query to a database or to a webserver, or it can be built starting from the XML tree FreeSWITCH composed in its own memory at startup based on the configuration XML documents found on the filesystem.

In this chapter we'll mostly look at the User Directory we find on the filesystem after a default fresh install, in the example demo configuration. The same concepts will apply also when the User Directory registry is accessed via database query or HTTP request.

The User Directory, or more colloquially in FreeSWITCH parlance simply the "directory", usually has this schema:

It contains one or more "domain", each "domain" contains "groups", each "groups" contains one or more "group" items. Each "group" contains the "users" item, which contains one or more "user" item. The "user" item contains the "params" item, which contains one or more "param" items. Being XML the eXtendable Markup Language, the schema can actually be more complex, we'll see it with "variables" and "variable" items interspersed here and there, but you sure got the knack of it.

By the way, the only required XML items are "domain" and "user". So, the simplest possible complete "directory" XML tree (or, quite possibly, the XML snippet returned by mod_xml_curl) would be similar to the following:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.62.105