A PHP module to generate and serve FreeSwitch configuration via mod_curl
Source available /usr/src/freeswitch.trunk/contrib/intralanman # /usr/src ( is the path where i have downloaded the trunk), (*1)
This README. created by Balaji BHR .... balajibhr@gmail.com IRC : ramindia, (*2)
REQUIREMENTS:, (*3)
apt-get install mysql-server libmysqlclient15-dev, (*4)
apt-get install php5 php5-common libapache2-mod-php5 php5-gd php5-dev curl libcurl3 libcurl3-dev php5-curl, (*5)
apt-get install php-pear, (*6)
pecl install pdo, (*7)
pecl install pdo_mysql, (*8)
updatedb, (*9)
vi /etc/php5/apache2/php.ini, (*10)
add below lines, (*11)
extension=pdo.so extension=pdo_mysql.so, (*12)
cp -R contrib/intralanman/PHP/fs_curl /var/www, (*13)
create database "freeswitch", (*14)
mysql -u root -p < /var/www/fs_curl/sql/mysql-5.0-with-samples.sql, (*15)
cd /var/www/fs_curl, (*16)
vi global_defines.php, (*17)
change the below settings according to your setup, (*18)
/** * 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'); /**, (*19)
save the file, (*20)
cd /usr/local/freeswitch/conf/autoload_configs, (*21)
vi modules.conf.xml, (*22)
add line
example below, (*24)
<load module="mod_console"/> <load module="mod_xml_curl"/> <load module="mod_logfile"/> <!-- <load module="mod_syslog"/> -->
save files, (*25)
vi xml_curl.conf.xml, (*26)
add this line "<param name="gateway-url" value="http://localhost/fs_curl/index.php bindings="dialplan|directory"/>, (*27)
example looks like this, (*28)
save the file, (*30)
example :, (*31)
mv /usr/local/freeswitch/conf/directory/deafult/1000.xml to /usr/local/freeswitch/conf/directory/deafult/1000.xml.noload, (*32)
stop the freeswitch, (*33)
start the freeswitch, (*34)
restart apache, (*35)
http://ipaddress/fs_curl/index.php?section=directory&user=1000&domain=domain.com, (*36)
you see this results, (*37)
-
CONGRADULATIONS... XML_CURL with intralan contrib working, (*39)
now its your own, how you like to do next, (*40)
Good luck, (*41)
try login using username and password as show below document, (*42)
http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Some_stuff_to_try_out.21, (*43)
try calling, (*44)
5000 - demo IVR (requires sounds and music files to be installed) 9995 - five second delay echo test 9996 - standard echo test 9999 - music on hold (requires music files to be installed), (*45)