The mod_xml_curl configuration
You can supply FreeSWITCH with a number of configuration files using mod_xml_curl
and the configuration
binding. In this section we'll dynamically generate a sofia.conf
file and build a bit of a framework for doing other configurations with ease. We will be adding a few new files and subfolders to our web server.
Add the following configuration.php
file to the same folder that has the index.php
file:
<?php if ( array_key_exists( 'key_value', $_REQUEST ) ) { $conf = $_REQUEST['key_value']; if ( is_file( "configuration/$conf.php" ) ) { include_once( "configuration/$conf.php" ); } else { not_found( "unable to find config script ($conf.php)" ); } }
Note that the configuration.php
file will look for specific configurations in a subfolder appropriately named configuration
. Create this subfolder under the same folder that contains index.php
and configuration.php
.
Next, add the following sofia.conf.php
file in the configuration
subfolder...