<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14915] </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14915">14915</a></dd>
<dt>Author</dt> <dd>intralanman</dd>
<dt>Date</dt> <dd>2009-09-18 00:14:05 -0500 (Fri, 18 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>adding README (thanks to ramindia) and netbeans project files</pre>

<h3>Added Paths</h3>
<ul>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlREADME">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/README</a></li>
<li>freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/</li>
<li>freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/</li>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprivateprivateproperties">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.properties</a></li>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprivateprivatexml">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.xml</a></li>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprojectproperties">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.properties</a></li>
<li><a href="#freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprojectxml">freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.xml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlREADME"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/README (0 => 14915)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/README                                (rev 0)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/README        2009-09-18 05:14:05 UTC (rev 14915)
</span><span class="lines">@@ -0,0 +1,200 @@
</span><ins>+Users and dialplan use Mysql Database using XML_curl using &quot;intralanman&quot; contrib
+--------------------------------------------------------------------------------
+
+Source available  /usr/src/freeswitch.trunk/contrib/intralanman   # /usr/src ( is the path where i have downloaded the trunk)
+
+This README.  created by Balaji BHR .... balajibhr@gmail.com    IRC : ramindia
+
+
+REQUIREMENTS:
+
+
+apt-get install mysql-server libmysqlclient15-dev
+
+apt-get install php5 php5-common libapache2-mod-php5 php5-gd php5-dev curl libcurl3 libcurl3-dev php5-curl
+
+apt-get install php-pear
+
+pecl install pdo
+
+pecl install pdo_mysql
+
+updatedb
+
+
+
+
+vi /etc/php5/apache2/php.ini
+
+add below lines
+
+extension=pdo.so
+extension=pdo_mysql.so
+
+Copying the Source intralanman to web server root directory
+-----------------------------------------------------------
+
+cp -R contrib/intralanman/PHP/fs_curl /var/www
+
+
+Creating the database in Mysql
+------------------------------
+
+create database &quot;freeswitch&quot;
+
+
+populate the tables in to freeswitch database
+---------------------------------------------
+
+mysql -u root -p &lt; /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');
+/**
+
+save the file
+
+Configuring the XML_CURL Module
+-------------------------------
+
+cd /usr/local/freeswitch/conf/autoload_configs
+
+
+vi modules.conf.xml
+
+add line     &lt;load module=&quot;mod_xml_curl&quot;/&gt;
+
+example below
+
+
+    &lt;load module=&quot;mod_console&quot;/&gt;
+    &lt;load module=&quot;mod_xml_curl&quot;/&gt;
+    &lt;load module=&quot;mod_logfile&quot;/&gt;
+    &lt;!-- &lt;load module=&quot;mod_syslog&quot;/&gt; --&gt;
+
+save files
+
+Configuring the xml_curl to take users and dialplan information from Database
+-----------------------------------------------------------------------------
+
+
+vi xml_curl.conf.xml
+
+add this line &quot;&lt;param name=&quot;gateway-url&quot; value=&quot;http://localhost/fs_curl/index.php bindings=&quot;dialplan|directory&quot;/&gt;
+
+example looks like this
+
+
+&lt;bindings&gt;
+    &lt;binding name=&quot;example&quot;&gt;
+      &lt;!-- The url to a gateway cgi that can generate xml similar to
+           what's in this file only on-the-fly (leave it commented if you dont
+           need it) --&gt;
+      &lt;!-- one or more |-delim of configuration|directory|dialplan --&gt;
+ &lt;param name=&quot;gateway-url&quot; value=&quot;http://localhost/fs_curl/index.php bindings=&quot;dialplan|directory&quot;/&gt;
+      &lt;!-- set this to provide authentication credentials to the server --&gt;
+
+
+save the file
+
+
+move or remove all userfile from directory/default
+--------------------------------------------------
+
+example :
+
+
+mv /usr/local/freeswitch/conf/directory/deafult/1000.xml to /usr/local/freeswitch/conf/directory/deafult/1000.xml.noload
+
+
+Restaring the Services
+----------------------
+
+stop the freeswitch
+
+start the freeswitch
+
+restart apache
+
+
+TESTING
+-------
+
+
+http://ipaddress/fs_curl/index.php?section=directory&amp;user=1000&amp;domain=domain.com
+
+
+you see this results
+
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt; 
+- &lt;document type=&quot;freeswitch/xml&quot;&gt;
+- &lt;section name=&quot;directory&quot; description=&quot;FreeSWITCH Directory&quot;&gt;
+- &lt;domain name=&quot;domain.com&quot;&gt;
+- &lt;params&gt;
+  &lt;param name=&quot;default_gateway&quot; value=&quot;errors&quot; /&gt; 
+  &lt;/params&gt;
+  &lt;variables /&gt; 
+- &lt;user id=&quot;1000&quot; mailbox=&quot;1000&quot;&gt;
+- &lt;params&gt;
+  &lt;param name=&quot;password&quot; value=&quot;password&quot; /&gt; 
+  &lt;param name=&quot;vm-password&quot; value=&quot;861000&quot; /&gt; 
+  &lt;/params&gt;
+- &lt;variables&gt;
+  &lt;variable name=&quot;numbering_plan&quot; value=&quot;US&quot; /&gt; 
+  &lt;/variables&gt;
+  &lt;/user&gt;
+  &lt;/domain&gt;
+  &lt;/section&gt;
+- &lt;!-- User is 1000
+  --&gt; 
+- &lt;!-- where array has contents
+  --&gt; 
+- &lt;!-- user id is: 1
+  --&gt; 
+- &lt;!-- fs_directory:204 - 2:array_key_exists() [&lt;a href='function.array-key-exists'&gt;function.array-key-exists&lt;/a&gt;]: The second argument should be either an array or an object
+  --&gt; 
+- &lt;!-- Total # of Queries Run: 14
+  --&gt; 
+- &lt;!-- Estimated Execution Time Is: 0.216974020004
+  --&gt; 
+  &lt;/document&gt;
+
+
+
+CONGRADULATION... XML_CURL with intralan contrib working
+
+now its your own, how you like to do next
+
+Good luck
+
+try login using username and password as show below document
+
+
+http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Some_stuff_to_try_out.21
+
+try calling 
+
+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) 
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprivateprivateproperties"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.properties (0 => 14915)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.properties                                (rev 0)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.properties        2009-09-18 05:14:05 UTC (rev 14915)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+copy.src.files=false
+copy.src.target=/Applications/MAMP/htdocs/fs_curl
+index.file=index.php
+run.as=LOCAL
+url=http://vmcent/fs_curl/
</ins></span></pre></div>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprivateprivatexml"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.xml (0 => 14915)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.xml                                (rev 0)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/private/private.xml        2009-09-18 05:14:05 UTC (rev 14915)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;project-private xmlns=&quot;http://www.netbeans.org/ns/project-private/1&quot;&gt;
+    &lt;editor-bookmarks xmlns=&quot;http://www.netbeans.org/ns/editor-bookmarks/1&quot;/&gt;
+&lt;/project-private&gt;
</ins></span></pre></div>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprojectproperties"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.properties (0 => 14915)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.properties                                (rev 0)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.properties        2009-09-18 05:14:05 UTC (rev 14915)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+include.path=${php.global.include.path}
+source.encoding=UTF-8
+src.dir=.
+tags.asp=false
+tags.short=true
+web.root=.
</ins></span></pre></div>
<a id="freeswitchtrunkcontribintralanmanPHPfs_curlnbprojectprojectxml"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.xml (0 => 14915)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.xml                                (rev 0)
+++ freeswitch/trunk/contrib/intralanman/PHP/fs_curl/nbproject/project.xml        2009-09-18 05:14:05 UTC (rev 14915)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;project xmlns=&quot;http://www.netbeans.org/ns/project/1&quot;&gt;
+    &lt;type&gt;org.netbeans.modules.php.project&lt;/type&gt;
+    &lt;configuration&gt;
+        &lt;data xmlns=&quot;http://www.netbeans.org/ns/php-project/1&quot;&gt;
+            &lt;name&gt;fs_curl&lt;/name&gt;
+        &lt;/data&gt;
+    &lt;/configuration&gt;
+&lt;/project&gt;
</ins></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>