SME 8.0 + Asterisk 1.8 + SAIL 3.1.1
Contents
Download ISO
The combined SME 8 / Asterisk 1.8.0.7 / SAIL 3.1.1-16 ISO is available for download at:
http://sailpbx.com/iso/SME8FA18V311-16.iso
Install normally as outlined in the Wiki. A normal whitebox generic i386 (32 bit) install is envisaged here.
Update SME
yum update
This will break DAHDI and possibly Asterisk as the kernel will get updated. Not to worry. Operations in the following sections will fix it.
Update Asterisk 1.8
Update DAHDI
Update SAIL
List of unused files in SAIL
- /opt/sark/db/DBSQL
- /opt/sark/db/lineIOdump
- /opt/sark/db/startDBSQL
List of files not used for generic SAIL
DB Upgrade Logic
- SAIL uses a clean SQLite3 database - /opt/sark/db/sarkstart.db - to start with.
- During an install or upgrade, the installer looks to see if /opt/sark/db/sark.db exists.
- If it does not exist, then it copies /opt/sark/db/sarkstart.db to /opt/sark/db/sark.db.
- Whether install or upgrade, a script is run tha applies all of the sql fragments in /opt/sark/amacs folder in name sequence. The name is made up of a letter plus the svn commit number, so it's effectively applied in ascending time order (datetime, then revision number).
Note from the SARk Devs
There is redundancy in the fragments but by and large it does not matter. The process relies on the natural entity integrity of the database for its idempotency. In other words pretty much everything it does is additive so a re-run will simply cause a lot of harmless errors because the row(s) will already exist. It's not pretty but it's not bad and in theory it allows upgrade over any jump in release although it can't categorically rule out any corner cases.
Preferred way for new installs
On testing it was found that a few sql statements get skipped when an earlier one fails. Hence to obviate such occurrences in new installs, it is advisable (take a leap of faith in me) to follow the code here before any SAIL configuration is done:
service sark stop mv /opt/sark/db/sark.db /opt/sark/db/sark.db.bak mv /opt/sark/db/sarkstart.db /opt/sark/db/sarkstart.db.bak wget http://www.apmuthu.com/bugfixes/sarknew311.db -O /opt/sark/db/sarkstart.db chown www:www /opt/sark/db/sarkstart.db cp /opt/sark/db/sarkstart.db /opt/sark/db/sark.db service sark start
If all goes well, then remove the *.bak files with:
rm -rf /opt/sark/db/sarkstart.db.bak rm -rf /opt/sark/db/sark.db.bak
If something wen wrong, then revert back with:
service sark stop rm -rf /opt/sark/db/sark.db mv /opt/sark/db/sark.db.bak /opt/sark/db/sark.db rm -rf /opt/sark/db/sarkstart.db mv /opt/sark/db/sarkstart.db,bak /opt/sark/db/sarkstart.db service sark start
Unreleased fixes
A list of forum postings of interest to the avid SAIL developre / consultant is available here.
SAIL Reference File Locations
- SAIL Install Date: /opt/sark/db/.sail-install-date
- SAIL Version: /opt/sark/.sail-release
- Asterisk Version: /opt/sark/.astrelease
- SAIL Serial Number is used for SARK Customers is hardcoded in globals['SNO']
- SAIL Serial Number for others is a random number computed in line 297 of /opt/sark/www/cgi-bin/sarkglobals.pl and stored in globals['SNO']
$sno = ($global{'SNO'}) || int(rand(1000000));