<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[FOP2 Separate Server]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I am trying to use FOP2 as a standalone server for multiple PIAF installations.  However, I cannot even get it to work for one PIAF installation.</p>
<p dir="auto">&lt;u&gt;This is the setup on my PIAF server:&lt;/u&gt;</p>
<pre><code>- I have exported the following directories via NFS share
        /var/spool/asterisk/voicemail
        /var/spool/asterisk/monitor
        /etc/asterisk
        /var/lib/asterisk
        /var/www/html/admin

- All of the relevant ports have been opened up on the firewall/made sure selinux was disabled
         3306
         5038

- Created the following manager in manager_custom.conf
          [fop2]
          secret = password
          deny = 0.0.0.0/0.0.0.0
          permit = 127.0.0.1/255.255.255.0
          permit = xxx.xxx.xxx.xxx/255.255.255.0
          read = all
          write = all
          writetimeout=1000
          eventfilter=!Event: RTCP*
          eventfilter=!Event: VarSet
          eventfilter=!Event: Cdr
          eventfilter=!Event: DTMF
          eventfilter=!Event: AGIExec
          eventfilter=!Event: ExtensionStatus
          eventfilter=!Event: ChannelUpdate
          eventfilter=!Event: ChallengeSent
          eventfilter=!Event: SuccessfulAuth

- Created an fop2 mysql user with all privileges on all tables with a command similar to this one
         GRANT ALL PRIVILEGES ON *.* TO "fop2"@"xxx.xxx.xxx.xxx" IDENTIFIED BY "password" WITH GRANT OPTION;
</code></pre>
<p dir="auto">&lt;u&gt;This is the setup on my FOP2 server (CentOS 6.4):&lt;/u&gt;</p>
<pre><code>- Installed LAMP
          Apache
          Mysql
          Php

- Mounted the NFS shares
          Shares work perfectly

- Installed FOP2 via Tarball
          Got error saying it couldn't ''chown asterisk:asterisk''
          Finished the install anyways

- Added this to fop2.cfg
          [general]
          ; AMI definitions
          manager_host=xxx.xxx.xxx.xxx (address of server)
          manager_port=5038
          manager_user=fop2
          manager_secret=password
</code></pre>
<ul>
<li>
<p dir="auto">Added this to config.php<br />
$DBHOST="<a href="http://xxx.xxx.xxx.xxx" rel="nofollow ugc">xxx.xxx.xxx.xxx</a>";<br />
$DBUSER="fop2";<br />
$DBPASS="password";<br />
$DBNAME="asterisk";</p>
<ul>
<li>
<p dir="auto">/usr/local/fop2/fop2_server --test is positive with no errors</p>
</li>
<li>
<p dir="auto">Registered Full White Label version</p>
</li>
</ul>
</li>
</ul>
<p dir="auto">&lt;u&gt;This is what does not work:&lt;/u&gt;</p>
<pre><code>- The autoconfig scripts do not work
           I therefore cannot login to myaddress/fop2 because no users/no buttons exist   

- I get 4 Php errors when loging in through the manager Web UI in the ''Users'' and ''Buttons'' section 
   mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given  
   /var/www/html/fop2/admin/asmanager.php (line 102)fsockopen():unable to connect to localhost:5038 (Connectionrefused)  
   /var/www/html/fop2/admin/asmanager.php (line 257) date(): It is not safe to rely on the system's timezone settings.      
   /var/www/html/fop2/admin/functions-custom.php (line 164) Undefined variable: astman
</code></pre>
<p dir="auto">I am sure we can get this to work, but I lack the necessary experience in regards to Php scripts so I am having a hard time trying to figure the, out on my own.  Any help would be greatly appreciated.</p>
<p dir="auto">Thank you very much for your time.</p>
<p dir="auto">Kevin Farrell-Pelletier</p>
]]></description><link>http://localhost:4567/topic/2034/fop2-separate-server</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 10:41:49 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/2034.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Sep 2015 12:39:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FOP2 Separate Server on Fri, 04 Sep 2015 18:26:24 GMT]]></title><description><![CDATA[<p dir="auto">For the FOP2 manager you need to also edit /var/www/html/fop2/admin/config.php and set the mysql credentials there.</p>
<p dir="auto">However, if your plan is to monitor multiple servers, that is not the way to do it as the manager is single server. In the case of multiple server you will need to install the manager in each asterisk box, and then modify the autoconfig scripts on the fop2/central server to run via passwordless ssh the autoconfig scripts on each Asterisk PBX. You will also need to modify the auto configs in each asterisk pbx so it also returns the server=x.x.x.x directive and possibly add a group=server directive also.</p>
<p dir="auto">If it is only for ONE server, then specifying the remote mysql on /var/www/html/fop2/admin/config.php should work. You can try that out, after that, login into the manager will retrieve config from the remote asterisk mysql database and populate the local tables. Also, the auto config scripts will read the settings for mysql on /var/www/html/fop2/admin/config.php and retrieve conf from there.</p>
<p dir="auto">Notice that the mysql user must have permissions to create tables, otherwise it will fail.</p>
<p dir="auto">The astman errors you see are not a problem, they won't prevent all of the above from happening.. the manager connection is used in order to get the park config only. In the current version the server/host is hardcoded, but in the next release it won't be.. You can look at the code and fix that part, or leave it as is and turn off debug as it is not a critical issue.</p>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/8942</link><guid isPermaLink="true">http://localhost:4567/post/8942</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 04 Sep 2015 18:26:24 GMT</pubDate></item></channel></rss>