[Freeswitch-dev] Openzap/PRI not working, see pastebin 3492

Trixter aka Bret McDanel trixternospam at 0xdecafbad.com
Sun Nov 18 12:03:43 EST 2007


On 11/18/07, Michael Jerris <mike at jerris.com> wrote:
>
> 2007-11-17 23:40:47 [ERR] mod_openzap.c:1085 load_config() open of
> openzap.conf failed:
>
> The openzap.conf section is not being found in your xml config.  You might
> want to check you includes to make sure that it is included from
> freeswitch.xml.
>
> Mike



To add to that and since this has caused confusion for others, I feel like
clarifying the configuration system in FreeSWITCH[tm] for the benefit of
anyone that was unclear on this (it has been asked several times over the
last few weeks in channel).

In reality there is 1 and only 1 configuration file in FreeSWITCH[tm], its
name is freeswitch.xml.  Within that file there are 4 sections (although its
number may increase in the future).  Configuration, Dialplan, Directory, and
Phrases.  The preprocessor will process all the <!--#include ...-->
directives and create a single file, then it is processed.  So while there
is the illusion of multiple files, in reality there is only one.

The name of each of the files is defined in its contents, not its actual
name (other than freeswitch.xml of course).  The actual file name only
matters so that the include preprocessor directive can locate it, and it
must match what you did for the include directive.

If you are curious as to why this occurs, it is so that it is slightly
faster to process, since that one file can be opened and processed without
hunting for a file for each and ever call, along with an open, read, close
loop.  The reloadxml api command causes that one file to be closed, and the
process of generating one single file is repeated.  All reloadxml does is
regenerate and reopen the freeswitch.xml config file, it does not push those
changes to the individual modules that may want that data.  It is on each
module to allow or disallow dynamic reconfigs during runtime (which can be
accomplished by adding an api command to the modules in question).

Some modules read the data per call, which means they work very well with
mod_xml_curl (or using that as a reference replacing curl with anything you
want) so that you can create custom XML for each unique call, such as for a
conference, dialplan, or a few other things.  Technically speaking
mod_xml_curl can deliver all xml with the exception of freeswitch.xml and
the modules.conf configuration section, which is used to load mod_xml_curl
(and I recommend at least one logger such as mod_console or mod_syslog so
you can see why stuff broke should that occur).  There is a
postload_modules.conf section that is unused in a static config, which can
be used to load all the other modules from mod_xml_curl, and when they
request their own configurations, assuming you bound mod_xml_curl to the
'configuration' section, they will pull those from the predefined web server
as well, allowing you to create a central provisioning authority for all of
your switches.  For the really curious there is a php example that does
exactly this (although I havent maintained it and some configuration stuff
has changed slightly so you may have to tweak it) in
TRUNK/scripts/contrib/trixter/xml-curl which would let someone write their
own provisioning system, perhaps even using something like
carp/ultramonkey/etc to load balance and provide failover between web
servers creating a setup that would allow for scalability to a very large
degree, and fault tolerance such that if it broke you have more important
things to worry about :)


-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
Belfast +44 28 9099 6461        US +1 516 687 5200
http://www.trxtel.com the phone company that pays you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20071118/2b394006/attachment.html 


More information about the Freeswitch-dev mailing list