SARK V5.0.0 Debian install
Contents
- 1 SARK V5.0.0 Debian Install
- 2 LDAP install
- 3 Set up your phones to use LDAP
- 4 Post Install Fixes
- 5 Known bugs/issues in V5 as at 11/2016
SARK V5.0.0 Debian Install
V5 can be installed onto X86, either wheezy or jessie, 32 or 64 bit, ARMEL (32 bit wheezy) or ARMHF (64 bit Jessie) . It will happily install on a bare-metal Debian, a Debian VM/KVM, or a Debian LXC. It was alpha tested with the following browsers (in alphabetical order);
- Chrome 48/49
- Firefox 45
- Opera 36
- Safari 9
- Windows Explorer 11
It may work on other browsers but they have not been tested so YMMV. It will NOT work on any browser that doesn't support jquery or has it disabled.
Before you begin
Upgrading from a previous release
- N.B!! - IMPORTANT! - V5 uses HTTPS so, before you begin an upgrade you must ensure your SARK 4.x firewall has a rule for HTTPS (TCP 443). Otherwise you will lock yourself out and you will need to manually add a rule using SSH or a glass screen attached to the server.
- If you are upgrading from V4.0 or V3.x, the SARK browser application will force you to change your password. This will change BOTH the browser AND root passwords.
- If you are upgrading from 4.1 and you are still using the default browser password, the SARK browser application will force you to change your password. This will change BOTH the browser AND root passwords.
New install
- V5 is designed to run as an appliance, it must not be installed onto a multi-purpose system that has other software already installed on it. If you try you will likely break both the existing systems and SARK. You must begin with a Debian minimal install which contains nothing but an SSH server.
- The first time you log in, the SARK browser application will force you to change your password. This will change BOTH the browser AND root passwords.
SARK/SAIL Installation
Proceed as follows;
Log in to the linux console on your box and Install the GPG key for the 5.0 repo
wget http://sailpbx.com/sail/sail-5.0/debs/sail.gpg.key apt-key add sail.gpg.key apt-get update
Now run ONE of the following depending upon whether you have wheezy or jessie installed
EITHER (wheezy)
echo deb http://sailpbx.com/sail/sail-5.0/debs/repo/ wheezy main >> /etc/apt/sources.list apt-get update
OR (jessie)
echo deb http://sailpbx.com/sail/sail-5.0/debs/repo/ jessie main >> /etc/apt/sources.list apt-get update
OR (stretch)
echo deb http://sailpbx.com/sail/sail-5.0/debs/repo/ stretch main >> /etc/apt/sources.list apt-get update
Installing a Mail agent
If this is a new install, you should install a mail agent. SARK has on-board support for a lightweight mail agent called ssmtp. If you install it then SARK will provide a tab in the networking section for you to configure it. Install it now (so that SARK can set the correct perms) with...
apt-get install ssmtp
There is a setup guide for Asterisk vmail to email HERE
Installing/upgrading the SARK/SAIL deb
apt-get install sail
The install will take a good few minutes depending upon the speed of the donor box and your internet link. During the install you will be asked to enter root passwords for both MySQL and LDAP (make a note of them, you'll need them later). You may also be asked to enter the international dial code (IDD) for your country. For example, if you are in the UK, this would be 44. It will also ask about dumpcap but just take the default (No).
Let the install run to its conclusion.
upgrading the SARK HPE deb
If you are upgrading from an older release then should also upgrade the HPE
apt-get install sailhpe
Seed the CDR database
If this is a new install then now is a good time to seed the Asterisk MySQL CDR database with the following command. When it asks, enter the password you gave for MySQL admin during the SARK/Sail install.
mysql -u root --password < /opt/sark/stat/asterisk-stat-v2/cdr-mysql-setup.sql
Install Asterisk extra sounds package
If this is a new install then SARK requires the Asterisk extra sounds package.
If you want UK English, there is a deb on the repo
apt-get install ast-en-gb-gpl-gsm-sounds
If you want "Alison" (US American), there is no deb available for this but it's pretty easy to install. At the linux CLI do the following
cd /usr/share/asterisk/sounds wget http://downloads.asterisk.org/pub/telephony/sounds/asterisk-extra-sounds-en-gsm-current.tar.gz tar xvfz asterisk-extra-sounds-en-gsm-current.tar.gz rm asterisk-extra-sounds-en-gsm-current.tar.gz
Upgrade wheezy systems to Asterisk 11
V5 can run with Asterisk 1.8 or Asterisk 11 . If you want to upgrade from Asterisk 1.8 to Asterisk 11 - proceed as follows
echo deb http://http.debian.net/debian wheezy-backports main >> /etc/apt/sources.list apt-get update apt-get install -t wheezy-backports asterisk
The Asterisk installer will repeatedly ask you if you want to overwrite existing copies of the asterisk config files. Just take the defaults (press return)
Clean up
You're done - reboot it
reboot
your sail app will be at https://your.server.ip.address but you can just type the bare address (e.g. 172.16.5.123) and Apache will figure it out.
- UID - admin
- PWD - sarkadmin
Close your browser and re-open it if you were previously running an earlier version of SARK. If you don't, you'll get odd looking output as the cached jquery code fights with the new V5 output.
Unless you are upgrading from 4.1, AND you have changed the default browser password, then the first time you login, the SARK browser application will force you to change your password. This will change BOTH the browser AND root passwords.
OK, you're done; unless of course you'd like to run the ldap directory feature, in which case read on...
LDAP install
Assuming LDAP is already installed on your SARK/SAIL box (it will have been installed by the SARK install), proceed as follows;
Check the LDAP Base Name (Base DN)
You can check by running slapcat as follows:-
root@deb8ct-test2:~# slapcat dn: dc=nodomain objectClass: top objectClass: dcObject objectClass: organization o: nodomain dc: nodomain
The base name appears in the first line of output. In the above example it is "dc=nodomain". We've used "nodomain" as an example because you'll likely see it a lot, particularly when you are spinning up LXC instances and the like. It just means that LDAP couldn't find the FQDN, probably because it wasn't set. It's no big deal, you can just go ahead and use dc=nodomain if you like. In any event, you should enter whatever YOUR base name is into the Globals=>LDAP panel along with the LDAP password you chose during the install.
If "dc=nodomain" bothers you then you'll need to enter a domain name in SARK, issue a commit and then do a reconfigure for slapd (the LDAP daemon).
dpkg-reconfigure slapd
This will allow it to have another look.
Adding the contacts OU
Now we need to add an organizationalUnit(ou) for the address book. If you are already a whiz with ldap then just go ahead and do it, using the base name. If you don't know ldap then proceed as follows...
You will find a file on your SARK box at /opt/sark/cache/ldapcontactou.ldif
dn: ou=contacts,dc=sark,dc=aelintra,dc=com objectClass: organizationalUnit objectClass: top ou: contacts
Without getting into the details (you can read about ldap elsewhere); in the first line of the file is the name of the organizationalUnit we want to create. In our example it is "contacts". The remainder of the line (dc=sark,dc=aelintra,dc=com) is the base name we discussed earlier. You must edit the file to make the file match your base name from the slapcat you did a couple of steps back. If, for example, you have a base name of dc=splodge,dc=soap,dc=com then you should make your file look like this
dn: ou=contacts,dc=splodge,dc=soap,dc=com objectClass: organizationalUnit objectClass: top ou: contacts
Ok, lets add it, we are going to use the LDAP slapadd utility, which is old fashioned nowadays, but easy to use.
service slapd stop slapadd -l /opt/sark/cache/ldapcontactou.ldif service slapd start
Refresh your browser and navigate to SARK. You should see a "Directory" option when you click on the "Settings" drop-down. In this page you can add and modify your telephone book entries or upload a vcard file you have exported from Google contacts or whatever. You can also have your phones browse your contacts if you have SIP phones which are LDAP aware (many are). You'll need to add a couple of entries to your SARK firewall for TCP ports 389 and 686 (restrict them to net:$LAN) to allow the phones to query the database - don't forget to restart the firewall.
Set up your phones to use LDAP
Most major SIP Phone types can use LDAP however, the implementation varies from type to type.
Snom, Panasonic (KX-HDV) and Yealink all support LDAP and have on-board provisioning already set-up for openLDAP on SARK V5.
Cisco small business phones (SPA) support LDAP and Provu have a section on their website showing how to set them up http://blog.provu.co.uk/item/234
Polycom phone set-up is more complex (isn't it always?), however there is good documentation provided by Polycom so you should be able to get it running with a little work although we don't show it here.
Aastra's do not natively support LDAP. However, it is possible to program it in using their XML capabilities and a php server stub. There is documentation elsewhere on the web detailing how to do it.
Gigaset professional (N series) phones support LDAP and there is documentation on their website
Post Install Fixes
- Some old fixes may be needed as they have not been incorporated here as yet.
- Set the mode=new in line 6 of /etc/asterisk/say.conf
- If you are installing SAIL on any OpenVZ (or other virtual) container, when the Stop PBX button in Settings -> Global page, the icon does not become a play button. A second press is needed. To mitigate this, insert a sleep(1); line in /opt/sark/php/sarkglobal/view.php as in the lines below:
private function sark_stop () { if ( $this->distro['debian'] ) { `/usr/bin/sudo /etc/init.d/asterisk stop`; } else { $ret = ($this->helper->request_syscmd ('/usr/bin/sv d sark')); $ret = ($this->helper->request_syscmd ('/usr/bin/sv k sark')); } sleep(1); return ("Stop signal sent"); }
Known bugs/issues in V5 as at 11/2016
There are a few known bugs which we are working on at the moment. In no particular order they are
V5 extension key change corrupts COS entries. Fixed in 5.0.0-20
If you change an extension number in the extension edit panel and it has CoS (Class of Service) rules associated with it then they may not be moved correctly.
The obvious symptom will be that some or all extensions will not display in the extensions panel.
The solution is to revert to the snapshot taken just before the key change
V5 Backup download bug. Fixed in 5.0.0-20
V5 backups and snapshots work correctly but if you issue a download to your desktop, the download will not unzip.
This is caused by an invalid header.
workaround - You can download/export a backup directly from /opt/sark/bkup using winscp or scp.
InterIAX (interSARK) trunks incorrectly formed user tag - fixed in 5.0.0-22
The user tag on interSARK trunks is incorrectly formed causing interSARK trunks to fail to come up.
V5 asterisk log fills too early.
We have seen one instance of an asterisk log consuming too much space on disk on S200.
This is due to the log params setting weekily rotates and the fact that the new Asterisk security log generates a lot of entries.
You can change the logrotate parameters for Asterisk (in logrotate.d) to work more frequently (e.g. daily) or set a maximum logfile size.
factory reset of the database leaves user unable to login to the browser. Fixed in 5.0.0-25
This is due to a bug in the reset function. If you experience the issue you will find that you can still log into the Linux CLI using the password you had before the reset. Run the following commands at the console
rm -rf /opt/sark/oncedone/* sh /opt/sark/scripts/srkV4reloader.sh
At the browser run
your.sark.ip.address/php/srksessions/logout.php
V5 restore of backup zip returns port 7601 connect error
This is caused by a buffer overflow when there are many files (usually voicemails) in the backup set. Fixed in 5.0.0-27
Workaround: unzip the backup set locally on your desktop and manually upload the files to the PBX.
CDR stats graphs do not render
This is caused by a missing php module on some releases/platforms. It is easily fixed by adding php gd support. Run the following command at the Linux CLI:-
apt-get install php5-gd
uploaded greetings do not play
This is caused by incorrect permissions being assigned to the file when it is moved into place. Fixed in 5.0.0-31
*61* does not playback mp3 greetings
Fixed in 5.0.0-31