<?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[Monitoring extensions on multiple servers]]></title><description><![CDATA[<p dir="auto">Hello all!</p>
<p dir="auto">This is a combination question / tutorial for how to monitor extensions on multiple servers (since the way we have it set up is almost certainly not ideal). My colleague and I set out today to try to get FOP2 to be able to monitor extensions on other FreePBX servers. Referring to the documentation at <a href="http://www.fop2.com/documentation-configuration-server.php#MonitoringMultiple" rel="nofollow ugc">http://www.fop2.com/documentation-confi ... ngMultiple</a> showed that it should be as simple as adding additional parameters in /usr/local/fop2/fop2.cfg, specifically:</p>
<pre><code>manager_host =
manager_port =
manager_user =
manager_secret =
</code></pre>
<p dir="auto">for each other server you want to monitor. However, it's not quite that easy. While that does connect you to the AMI of the other server (assuming you use remote_mgr as the manager_user; we couldn't get it to work with admin), it doesn't make any buttons for you to monitor. The script /usr/local/fop2/autoconfig-buttons-freepbx.sh won't make the buttons either, even if you define buttons in /usr/local/fop2/buttons_custom.cfg (which gets run at the end of /usr/local/fop2/autoconfig-buttons-freepbx.sh if it exists)... or rather, it will (maybe, still not sure on that), but you can't see it because it's not part of any groups, and since users see what they see on FOP2 based on what groups they're allowed to view, it will never show up for anyone. So you need to make it part of a group, which gets done in /usr/local/fop2/autoconfig-users-freepbx.sh.</p>
<p dir="auto">Basically, you can see what happens when you run /usr/local/fop2/autoconfig-users-freepbx.sh (or /usr/local/fop2/autoconfig-buttons-freepbx.sh for that matter); it just generates a bunch of text from God knows where (it's all detailed in the script itself but there was no way I could read it all). Presumably, when you restart FOP2 with</p>
<pre><code>service fop2 restart
</code></pre>
<p dir="auto">it runs /usr/local/fop2/fop2.cfg, which in turn runs /usr/local/fop2/autoconfig-users-freepbx.sh, which in turn runs /usr/local/fop2/autobuttons.cfg, which all that does is run /usr/local/fop2/autoconfig-buttons-freepbx.sh, which basically generates a ton of specially formatted text and sends it off <em>somewhere</em>, somehow. So at this point all we knew was that, based on the text output of /usr/local/fop2/autoconfig-users-freepbx.sh, groups were probably defined there. So in our case, what we did was defined a group manually at the end of that script and then manually defined a user at the end of that script that belonged to that group. Basically, in /usr/local/fop2/autoconfig-users-freepbx.sh:</p>
<pre><code>[original_script]
Lots of scripting
[/original_script]
group=allLocalAndRemote:[Put all the extensions you'd like to monitor here, both local and remote, in the format of SIP/1234]
user=[extension]:[password]:[FOP2permissions]:allLocalAndRemote
</code></pre>
<p dir="auto">So yours might look like:</p>
<pre><code>[original_script]
Lots of scripting
[/original_script]
group=allLocalAndRemote:SIP/1234, SIP1235, SIP/1236, SIP/2001
user=1235:5321:all:allLocalAndRemote
</code></pre>
<p dir="auto">where 1235 is your extention and 2001 is an extension on a remote server. So what this does is it makes the remote extension 2001 part of the allLocalAndRemote group (along with all those other extensions including yours) and then the next line specifically defines you as a user with the ability to view the allLocalAndRemote group. Now of course /usr/local/fop2/buttons_custom.cfg has to have your button(s) defined like so:</p>
<pre><code>[SIP/2001]
type=extension
extension=2001
context=from-internal
label=remote-extension-name
privacy=none
server=ip-of-remote-server
</code></pre>
<p dir="auto">and some of those fields are probably just wrong, like maybe context=from-internal, but it works well enough that the button actually shows up for whoever you defined as a user at the end of /usr/local/fop2/autoconfig-users-freepbx.sh (in the example, it was 1235).</p>
<p dir="auto">So that's how we got it done, and while we know that cannot possibly be the right way to do it, we couldn't find a better way (yet). If anyone knows of a better way, please <em>please</em> let us know here.</p>
]]></description><link>http://localhost:4567/topic/1410/monitoring-extensions-on-multiple-servers</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 12:30:12 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/1410.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Apr 2013 23:52:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Monitoring extensions on multiple servers on Tue, 22 Dec 2015 23:27:37 GMT]]></title><description><![CDATA[<p dir="auto">FOP2 auto configuration scripts read a local database, they won't query anything in a remote server. So the easiest way is to add buttons by hand in the file /usr/local/fop2/buttons_custom.cfg</p>
<p dir="auto">There is one caveat, as this buttons won't be part of any groups, you won't be able to use group filtering. So in order to see them you will have to edit any FOP2 user you have and uncheck all groups (that means it won't have any group filtering, and buttons defined in the above file will be shown).</p>
]]></description><link>http://localhost:4567/post/6190</link><guid isPermaLink="true">http://localhost:4567/post/6190</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 22 Dec 2015 23:27:37 GMT</pubDate></item><item><title><![CDATA[Reply to Monitoring extensions on multiple servers on Mon, 14 Dec 2015 16:52:29 GMT]]></title><description><![CDATA[<p dir="auto">I've just added the extension in freepbx gui and add the button in fop2-admin..<br />
is it necessary to grant passwordless root ssh login to the remote asterisk, or may I use another user for it?</p>
]]></description><link>http://localhost:4567/post/6189</link><guid isPermaLink="true">http://localhost:4567/post/6189</guid><dc:creator><![CDATA[stegfeld]]></dc:creator><pubDate>Mon, 14 Dec 2015 16:52:29 GMT</pubDate></item><item><title><![CDATA[Reply to Monitoring extensions on multiple servers on Mon, 14 Dec 2015 10:40:43 GMT]]></title><description><![CDATA[<p dir="auto">Ok, could you please provide the info where to add  the remote buttons?<br />
I've 3 extensions to get monitored remotely, I guess it would be the easiest way to add them manually, but where and how?</p>
]]></description><link>http://localhost:4567/post/6188</link><guid isPermaLink="true">http://localhost:4567/post/6188</guid><dc:creator><![CDATA[stegfeld]]></dc:creator><pubDate>Mon, 14 Dec 2015 10:40:43 GMT</pubDate></item><item><title><![CDATA[Reply to Monitoring extensions on multiple servers on Sat, 05 Dec 2015 02:34:37 GMT]]></title><description><![CDATA[<p dir="auto">Yes, simply add more manager_host,_user,_secret ... but that won't configure any buttons. You still need to create configuration files that includes buttons from the other server.</p>
]]></description><link>http://localhost:4567/post/6187</link><guid isPermaLink="true">http://localhost:4567/post/6187</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Sat, 05 Dec 2015 02:34:37 GMT</pubDate></item><item><title><![CDATA[Reply to Monitoring extensions on multiple servers on Thu, 03 Dec 2015 16:31:10 GMT]]></title><description><![CDATA[<p dir="auto">what is meant by "add the extra servers in fop2.cfg via manager_ entries"</p>
<p dir="auto">simply add</p>
<p dir="auto">manager_host=remote ip<br />
manager_port=5038<br />
manager_user=admin<br />
manager_secret=remote secret</p>
<p dir="auto">under the other manger_ entries?</p>
]]></description><link>http://localhost:4567/post/6186</link><guid isPermaLink="true">http://localhost:4567/post/6186</guid><dc:creator><![CDATA[stegfeld]]></dc:creator><pubDate>Thu, 03 Dec 2015 16:31:10 GMT</pubDate></item><item><title><![CDATA[Reply to Monitoring extensions on multiple servers on Tue, 02 Apr 2013 18:52:41 GMT]]></title><description><![CDATA[<p dir="auto">Having a multi server setup working is not simple as you've already find out. And having automatic configuration for all servers is even more complicated.</p>
<p dir="auto">I have suggested in several posts how to do it, but we cannot provide a set of ready made scripts as it depends on several factors outside of FOP2 itself. Basically we suggest to do:</p>
<ul>
<li>add the extra servers in fop2.cfg via manager_ entries.</li>
<li>passwordless ssh connection between the central fop2 server and remove asterisk servers</li>
<li>copy fop2admin to all remote asterisk servers</li>
<li>copy <a href="http://autoconfig-buttons-freepbx.sh" rel="nofollow ugc">autoconfig-buttons-freepbx.sh</a> and <a href="http://autoconfig-users-freepbx.sh" rel="nofollow ugc">autoconfig-users-freepbx.sh</a> to remote asterisks  servers</li>
<li>modify remote autoconfig scripts to exclude listing of park and dahdi trunks, and to add server=192.168.x.x</li>
<li>modify central autoconfig scripts to execute remote scripts via ssh (with some other modifications to update some of the default fop2 groups)</li>
</ul>
<p dir="auto">The above can be made much easier by configuring buttons and permissions manually, just add the additional manager entries and config buttons by hand, similar to your solution.</p>
<p dir="auto">Doing the former requires a fairly amount of work. Autoconfig scripts in fop 2.27 beta have some lines commented for this specific purpose, but you must uncomment them while commenting the original lines, and also modify some sql queries to add the server line, etc.</p>
]]></description><link>http://localhost:4567/post/6185</link><guid isPermaLink="true">http://localhost:4567/post/6185</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 02 Apr 2013 18:52:41 GMT</pubDate></item></channel></rss>