Install and Set-Up for FOP2 On Wazo 17.04

Install and Set-Up for FOP2 On Wazo 17.04
Install and Set-Up
for FOP2
On Wazo 17.04
All instructions for applications current as of:
28 March 2017
Install and Set-Up of Soft-IP-PBX
Page 1
Introduction .................................................................................................................................................................................................................... 3
1)
Disclaimer ..................................................................................................................................................................................................... 3
2)
Credits........................................................................................................................................................................................................... 3
3)
Installing and configuring FOP2 ................................................................................................................................................................... 3
Install and Set-Up of Soft-IP-PBX
Page 2
Introduction
1) Disclaimer
a) If this document gets distributed (which is fine by me, so long as it is distributed for free) it should
be done on the basis of trying to help as opposed to presenting as if this is the ultimate authority.
b) And in this litigious world, allow me now to clearly state that:
•
In its basic form, all that I have outlined worked for me but it may contain many errors,
typographical, omissions and even misguidance that may require a lot of extra corrections.
•
While I have taken due care, however, it may not necessarily be suitable for your individual
configuration.
•
I do not assume, neither will I accept any responsibility for any losses incurred due to actions or
inaction conducted as a result of methods or advice found in this document.
2) Credits
a) Thank you to the entire open source community, including (but not limited to) the developers of:
•
Linux
•
Linux applications like PostgreSQL, Nginx, Python, …
•
Asterisk
•
Wazo <= Xivo
•
IPtables
•
fail2ban
•
Webmin
•
ASTTapi
b) This is a fun way to learn and to create something truly valuable. The spirit of innovation for the
sake of innovation, and collaboration for all the right reasons, tells me the spirit of curiosity and
adventure is still alive and well.
3) Installing and configuring FOP2
a) FOP2 (www.fop2.com) adds a graphical representation to Wazo allowing the administrator to
visually determine which (of the configured) connections are active at any point in time.
b) FOP2 is the evolution of the Panel tab in earlier versions of FreePBX (I think FOP originally stood
for FreePBX Operator Panel) and is still optimized for installations like FreePBX but can be
manually configured, following these instructions, to provide full monitoring of the Wazo
connections. These instructions only show how to use the monitoring capability of FOP2; FOP2 can
do much more but the additional functionality was not needed for my installation so is not
configured and not documented here.
c) FOP2 is Freemium software. It is free to users with small installations and is fully functional for
them. Small installations are those using no more than 15 items being monitored. Items include
•
Incoming trunks
Install and Set-Up of Soft-IP-PBX
Page 3
•
Outgoing trunks
•
Extensions/lines
•
Devices (with extensions/lines)
•
Parking Spots
•
Conferences
d) For larger installations, the price to license FOP2 is $40 one-time with an optional annual fee for
upgrades and support.
e) To download and install FOP2
cd /usr/src
wget http://www.fop2.com/download/debian64 -O fop2.tgz
tar zxvf fop2.tgz
cd fop2
make install
The default (minimal) Debian installation on which Wazo is installed does not
include the make applications. This is required to install FOP2. You could either
install just the make packages with
apt-get install make
or install the full developer set with
apt-get install build-essential
I installed the full developer set.
You may want to remove the developer set with
apt-get remove build-essential
once the FOP2 installation has been completed for security reasons, but I left it
installed and used the firewall setup to protect the server.
•
The installation will copy the server files under /usr/local/fop2
◊
•
These you can leave as is; they are in the correct location for Wazo to use them
The installation will copy the web files under /var/www/html/fop2
◊
These you need to move since Wazo has reconfigured the Webroot directory from
/var/www/html/fop2 to /usr/share/xivo-web-interface/www/fop2
mv –avr /var/www/html/fop2 /usr/share/xivo-web-interface/www/fop2
f) To configure FOP2
•
See https://www.fop2.com/docs/installation.php#ConfigurationServer for details
•
Tell FOP2 that this is NOT a FreePBX installation
◊
Edit /usr/share/xivo-web-interface/www/fop2/admin/config.php
Install and Set-Up of Soft-IP-PBX
Page 4
cd /usr/share/xivo-web-interface/www/fop2
nano config.php
change define('USE_FREEPBX_AUTH',true);
to
define('USE_FREEPBX_AUTH',false);
comment out the following two lines to prevent access by the FOP2Manager (which
would need some configuration to have it work cleanly with WazoPBX)
// $ADMINUSER = "fop2admin";
// $ADMINPWD = " fop2admin ";
Save the file and exit the editor
<Ctl>-o
(letter o)
<Enter>
<Ctrl>-x
•
Establish an asterisk user that allows FOP2 to connect to and interact with asterisk
◊
In /etc/asterisk/manager.d/ add a file named fop2user.conf (name it what you want as long as
it ends in .conf) to create a new user for asterisk
cd /etc/asterisk/manager.d
touch fop2user.conf
♦ Change permissions of the file
chmod 660 fop2user.conf
chown asterisk:www-data fop2user.conf
♦ Add to the file (replace <fop2secret> with your password)
nano fop2user.conf
[fop2]
secret = <fop2secret>
deny = 0.0.0.0/0.0.0.0
permit = 127.0.0.1/255.255.255.0
read = all
write = all
writetimeout = 1000
eventfilter=!Event: RTCP*
eventfilter=!Event: VarSet
eventfilter=!Event: Cdr
eventfilter=!Event: DTMF
Install and Set-Up of Soft-IP-PBX
Page 5
eventfilter=!Event: AGIExec
eventfilter=!Event: ExtensionStatus
eventfilter=!Event: ChannelUpdate
eventfilter=!Event: ChallengeSent
eventfilter=!Event: SuccessfulAuth
eventfilter=!Event: DeviceStateChange
eventfilter=!Event: RequestBadFormat
eventfilter=!Event: MusicOnHoldStart
eventfilter=!Event: MusicOnHoldStop
eventfilter=!Event: NewAccountCode
eventfilter=!Event: DeviceStateChange
<Ctl>-o
(letter o)
<Enter>
<Ctrl>-x
◊
Edit /usr/local/fop2/fop2.cfg to tell FOP2 what to use for asterisk user credentials and to
setup FOP2 for manual configuration
♦ Do NOT delete any entries from fop2.cfg; add new ones only
cd /usr/local/fop2
cp fop2.cfg fop2.cfg.orig
nano fop2.cfg
add, in the [general] section, under the ; Ami definitions (replace <fop2secret>):
; FOP2 definitions
manager_host = 127.0.0.1 (or localhost)
manager_port = 5038
manager_user = fop2
manager_secret = <fop2secret>
Add a user for the administrator to use when logging in to the FOP2 panel with the
browser.
Immediately after the
; --- SAMPLE USER LIST --section, which ends with
; ------ END SAMPLE ------
Install and Set-Up of Soft-IP-PBX
Page 6
add the user (replace <fop2_admin_user_name> and <fop2_admin_password>)
user=<fop2_admin_user_name>:<fop2_admin_password>:all
Immediately below the new user line (above), add the setting that tells FOP2 where to
look for the manual button configuration file (use whatever name you want as long as
it ends in .cfg):
buttonfile=fop2buttons.cfg
Comment out the last line in the file
; #exec autoconfig-users.sh
Save the file and close the editor
<Ctrl>-o
(letter 0)
<Enter>
<Ctrl>-x
◊
Edit /usr/local/fop2/autobuttons.cfg to comment out (add ; in front of) first line with auto
exex to prevent fop2 from trying to pull its button configuration from the database
nano autobuttons.cfg
;#exec autoconfig-buttons.sh $1
<Ctrl>-o
(letter 0)
<Enter>
<Ctrl>-x
•
Create a file which will allow you to customize the css for the panel
◊
Technically, this is not required if you like the css used for the display panel, but if you do
not at least create the file that would allow the customization, you will get an error added to
your log each time you log into the panel saying the custom template file is missing. Doing
this step will create a custom file that, with no changes made, duplicates the look of the
original FOP2 panel.
cp /usr/share/xivo-web-interface/www/fop2/css/theme.css /usr/share/xivo-webinterface/www/fop2/css/custom_theme/theme.css
♦ If you do want to customize the css, edit the file at /usr/share/xivo-webinterface/www/fop2/css/custom_theme/theme.css
•
Add the file which is used by FOP2 to determine what appears on the display panel
◊
Read the FOP2 documentation for specifics; this will get you started
♦ This example assumes all SIP connections
♦ Replace all entries enclosed in < > (including deleting < >)
touch fop2buttons.cfg
chown root:www-data fop2buttons.cfg
chmod 640 fop2buttons.cfg
nano fop2buttons.cfg
Install and Set-Up of Soft-IP-PBX
Page 7
for each trunk
[SIP/<trunk1-in-identifier>]
type=trunk
label=<trunk1-in-identifier>
[SIP/<trunk1-out-identifier>]
type=trunk
label=<trunk1-out-identifier>
for each extension
[SIP/<line1-identifier-from-Wazo-line-name>]
type=extension
extension=<line1-extension-from-Wazo>
context=default
label=<line1-label-for-use-in-fop2-panel>
group=<group1-name>
(optional and only used if you want to cluster lines)
for each conference
[CONFERENCE/<conference1-extension-from-Wazo]
type=conference
label=<conference1-label-for-use-in-fop2-panel>
extension=<conference1-extension-from-Wazo>
context=default
for the Park line
[PARK/default]
label=Park
type=park
extension=700
context=parkedcalls
Save the file and exit the editor
<Ctrl>-o
(letter 0)
<Enter>
<Ctrl>-x
•
Restart asterisk
/etc/init.d/asterisk restart
Install and Set-Up of Soft-IP-PBX
Page 8
•
Reload the FOP daemon
service fop2 restart
•
Access the FOP2 display using a browser pointed to (replace <Server_IP_Address>)
◊
https:/<Server_IP_Address>/fop2/index.html
♦ User: <fop2_admin_user_name>
♦ Password: <fop2_admin_password>
g) This will get you up and running with a free system using less than 15 items / buttons.
•
To get a license for larger systems, go to the FOP2 web site at www.fop2.com
Install and Set-Up of Soft-IP-PBX
Page 9
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising