Difference between revisions of "XML Handler"

From FusionPBX
Jump to: navigation, search
Line 3: Line 3:
 
To enable this functionality:
 
To enable this functionality:
  
 +
==XML not saved to the file system==
 
; Tell FusionPBX not to write XML configuration files for dialplans and extensions
 
; Tell FusionPBX not to write XML configuration files for dialplans and extensions
 
: Navigate to '''Advanced''' -> '''Default Settings'''
 
: Navigate to '''Advanced''' -> '''Default Settings'''
 
: Under '''Switch''', set '''dialplans''' and '''extensions''' to false
 
: Under '''Switch''', set '''dialplans''' and '''extensions''' to false
  
 +
==Remove the XML files==
 
; Remove the XML files in FreeSWITCH
 
; Remove the XML files in FreeSWITCH
 
: Move or delete all XML files in conf/dialplans and conf/directory
 
: Move or delete all XML files in conf/dialplans and conf/directory
 
: Add an empty file (named empty.xml or such) to conf/dialplans and conf/directory
 
: Add an empty file (named empty.xml or such) to conf/dialplans and conf/directory
  
 +
==Lua configured for xml_handler==
 
; Tell FreeSWITCH to load the dialplan and directory from lua
 
; Tell FreeSWITCH to load the dialplan and directory from lua
 
: In conf/autoload_configs/lua.conf.xml, add:
 
: In conf/autoload_configs/lua.conf.xml, add:
Line 16: Line 19:
 
:: <param name="xml-handler-bindings" value="dialplan,directory"/></code>
 
:: <param name="xml-handler-bindings" value="dialplan,directory"/></code>
  
; Restart FreeSWITCH
+
==Restart FreeSWITCH==
  
 
Now all dialplan and directory entries will be queried from the database via the lua handler script.
 
Now all dialplan and directory entries will be queried from the database via the lua handler script.

Revision as of 00:12, 15 August 2013

FusionPBX allows for many of the FreeSWITCH XML configuration files can be generated on the fly from the FusionPBX database. Currently, the Dialplan and Directory configuration files can be completely replaced.

To enable this functionality:

XML not saved to the file system

Tell FusionPBX not to write XML configuration files for dialplans and extensions
Navigate to Advanced -> Default Settings
Under Switch, set dialplans and extensions to false

Remove the XML files

Remove the XML files in FreeSWITCH
Move or delete all XML files in conf/dialplans and conf/directory
Add an empty file (named empty.xml or such) to conf/dialplans and conf/directory

Lua configured for xml_handler

Tell FreeSWITCH to load the dialplan and directory from lua
In conf/autoload_configs/lua.conf.xml, add:
<param name="xml-handler-script" value="app.lua xml_handler"/>
<param name="xml-handler-bindings" value="dialplan,directory"/>

Restart FreeSWITCH

Now all dialplan and directory entries will be queried from the database via the lua handler script.