For complete installation instructions, please 
go to http://www.fop2.com/documentation.php


UPGRADING FROM A PREVIOUS INSTALL
---------------------------------

Just untar the package and run "make". The installation will copy the 
new files over, and it will preserve config files in place. It will also
make a backup of every replaced file, appending a suffix like ~ (depends 
on your distro)

After updating the software, you will have to do some manual tweaking to 
enable new features:


Visual Phonebook:
-----------------

If upgrading from FOP 2.00, you need to alter the visual phonebook DB
schema as it has new features. The table layout changed, you will 
need to issue the following commands to mysql in order to update the table. 
They are also listedin the file /var/www/html/fop2/mysql-upgrade.db :

USE `fop2`;
ALTER TABLE `visual_phonebook` add `owner` varchar(50) default '';
ALTER TABLE `visual_phonebook` add `private` enum('yes','no') default 'no';
ALTER TABLE `visual_phonebook` add `context` varchar(150) default '';

or by using the db file directly:

mysql -u root -p fop2 < /var/www/html/fop2/mysql-upgrade.db


FreePBX:
--------

If using FreePBX, we supply the file 'extensions_override_freepbx.conf' 
that should be placed inside /etc/asterisk. It will include all the 
contexts needed for a seamless integration between FOP2 features and 
FreePBX. The install script will not attempt to copy the file, as you 
might be using it already. So first check that your installed file in
/etc/asterisk is empty or not used. If so, you have to copy the file
manually. Example:

#> cp /usr/local/fop2/extensions_override_freepbx.conf /etc/asterisk

If your /etc/asterisk/extensions_override_freepbx.conf is not empty
inspect the contents to determine if you already have the fop2 version
or if you have some other custom configurations for freepbx. In that 
case you will want to append the context of the supplied file inside 
yours, making sure you do not have same name contexts already in use.

#> cat /usr/local/fop2/extensions_override_freepbx.conf >> /etc/asterisk/extensions_override_freepbx.conf

There is also a file named FOP2Callbacks.pm in /usr/local/fop2 that 
completes the integration. If you are NOT using FreePBX, you might 
want to rename or remove FOP2Callbacks.pm or modify it to your needs.

FreePBX Plugin:

There is available a new FreePBX plugin that makes configuring FOP2 
easier. The plugin is named fop2admin and can be downloaded from
http://www.fop2.com/download.php . You have to install it like any other
FreePBX Plugin.


Non FreePBX:
------------

Call Parking:

In order to park calls you have to add a special context to your dialplan:

[fop2-park]
exten => _X.,1,Set(ARRAY(RETURN_EXTENSION,RETURN_CONTEXT)=${CUT(EXTEN,:,1)}\,${CUT(EXTEN,:,2)})
exten => _X.,n,ParkAndAnnounce(PARKED,,Console/dsp,${RETURN_CONTEXT},${RETURN_EXTENSION},1)
exten => _X.,n,Goto(${RETURN_CONTEXT},${RETURN_EXTENSION},1)
exten => _X.,n,Hangup

This context is already included in the extensiosn_override_freepbx.conf 
file, so if you use FreePBX follow the below directions to enable Parking 
from FOP2.

There is an alternative context if you have problems with the above one,
that can be used if you use more than one parking lot on recent asterisk
versions, you might need to tweak the parkinglot variable to suit your
environment:

[fop2-park]
; Alternative fop2-park for asterisk 1.6 and up, using parkinglots and Park application
exten => _X.,1,Set(ARRAY(RETURN_EXTENSION,RETURN_CONTEXT)=${CUT(EXTEN,:,1)},${CUT(EXTEN,:,2)})
exten => _X.,n,Set(PARKINGLOT=parkinglot_${RETURN_CONTEXT})
exten => _X.,n,Park(,${RETURN_CONTEXT},${RETURN_EXTENSION},1,s)


Park Button Definition:

The autoconfiguration script will create the parking buttons itself. If 
you do not use FreePBX, the correct PARK definition in buttons.cfg looks 
like this:

[PARK/default]
type=park
extension=700
label=Parking 
context=parkedcalls

Where default is the parkinglot.

---

Some Icons were taken from:

Fugue Icon Set      - http://www.pinvoke.com/
Silk Icon Set       - http://www.famfamfam.com/lab/icons/silk/
Old School Icon Set - http://freebiesdock.com/oldschool-icon-set/

Sounds: http://www.narfstuff.co.uk/2009/09/13/royalty-free-ui-sound-pack-now-free/
