FreeSWITCH mod_xml_curl base configuration classes
REQUIREMENTS:
apt install apache2 php7.0 libapache2-mod-php php-xml curl php7.0-mysql
/var/www
create database "freeswitch"
mysql -u root -p < /var/www/fs_curl/sql/mysql-5.0-with-samples.sql
cd /var/www/fs_curl
vi global_defines.php
change the below settings according to your setup
/**
- Defines the default dsn for the FS_PDO class / define('DEFAULT_DSN', 'mysql:dbname=freeswitch;host=localhost'); /*
- Defines the default dsn login for the PDO class / define('DEFAULT_DSN_LOGIN', 'root'); /*
- Defines the default dsn password for the PDOclass / define('DEFAULT_DSN_PASSWORD', 'password'); /*
cd /usr/local/freeswitch/conf/autoload_configs
vi modules.conf.xml
add line <load module="mod_xml_curl"/>
vi xml_curl.conf.xml
add this line "<param name="gateway-url" value="http://localhost/fs_curl/index.php bindings="dialplan|directory"/>
example looks like this
stop freeswitch
start freeswitch
restart apache
curl http://ipaddress/fs_curl/index.php?section=directory&user=1000&domain=domain.com