Author Archives: Sems

Installing Asterisk 1.8.9 on Centos 6

It has been a while since I installed Asterisk from scratch and I like to keep my skills sharpened. So for this exercise, I grabbed a base Centos 6 Virtual Box image and installed Asterisk from sources. There might be a few steps not fully explained below, but this should get you going.

First step is to set static IP by edit /etc/sysconfig/network-scripts/ifcfg-eth0. Then get the latest updates via:

yum update

Get Asterisk Source:

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.9.0.tar.gz
tar xvzf asterisk-1.8.9.0.tar.gz

Install dependencies/libraries:

yum install unixODBC unixODBC-devel mysql-server mysql-devel nano ncurses-devel patch gcc gcc-c++ kernel-devel libtiff-devel libtermcap-devel bison flex curl-devel  libtool-ltdl-devel gmime-devel wget make svn libxml2-devel

ln -s /usr/src/kernels/<your kernel version> linux

Install iksemel libs for Google Talk/Jabber:

Install rpm-forge repo via:
rpm -Uhv http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

yum install iksemel-devel

Install Speex (required by Speex codec and RedHat/Centos rpms miss certain files):

cd /usr/src
wget http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz
tar xvzf speex-1.2rc1.tar.gz
cd speex-1.2rc1

./configure
make
make install

Install Cepstral Swift (this requires a license, if you don’t have one or don’t want to use Cepstral Text to Speech engine, you can skip it):

cd /usr/src
wget http://downloads.cepstral.com/cepstral/i386-linux/Cepstral_Allison_i386-linux_5.1.0.tar.gz
tar xvzf Cepstral_Allison_i386-linux_5.1.0.tar.gz
cd /usr/src/Cepstral_Allison_i386-linux_5.1.0

./install.sh
/opt/swift/bin/swift –reg-voice –customer-name “xxx” –company-name “xxx” –voice-name Allison –license-key “xxx”

Configure libs:

Edit /etc/ld.so.conf and insert:

/opt/swift/lib
/usr/local/lib
/usr/lib

Save the file, then run ldconfig

Install Dahdi:

Get and install latest dahdi-tools and dahdi-linux

* dahdi-linux: kernel modules
* dahdi-tools: userspace tools

cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.6.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.6.0.tar.gz
tar xvzf dahdi-linux-2.6.0.tar.gz
tar xvzf dahdi-tools-2.6.0.tar.gz

cd /usr/src/dahdi-linux-2.6.0
make
make install

cd /usr/src/dahdi-tools-2.6.0
./configure
make menuselect
make all
make install
make config

nano /etc/dahdi/modules (comment out hardware cards, unless you have them)
chkconfig dahdi on

Install Asterisk 1.8.9:

cd /usr/src/asterisk-1.8.9.0
contrib/scripts/get_ilbc_source.sh
contrib/scripts/get_mp3_source.sh
./bootstrap.sh
./configure
make menuselect (here select the options you want, you’ll be fine with defaults in most cases, I added couple of missing ones)
make
make install
make progdocs
make samples
make config

chkconfig asterisk on

Create Asterisk user/group and edit permissions:

groupadd -g 5060 asterisk
adduser -c “Asterisk Telephone Server” -d /var/lib/asterisk -g asterisk -u 5060 asterisk

chown –recursive asterisk:asterisk /var/lib/asterisk
chown –recursive asterisk:asterisk /var/log/asterisk
chown –recursive asterisk:asterisk /var/run/asterisk
chown –recursive asterisk:asterisk /var/spool/asterisk
chown –recursive asterisk:asterisk /usr/lib/asterisk

chmod –recursive u=rwX,g=rX,o= /var/lib/asterisk
chmod –recursive u=rwX,g=rX,o= /var/log/asterisk
chmod –recursive u=rwX,g=rX,o= /var/run/asterisk
chmod –recursive u=rwX,g=rX,o= /var/spool/asterisk
chmod –recursive u=rwX,g=rX,o= /usr/lib/asterisk

Edit /etc/asterisk/asterisk.conf:

astrundir => /var/run/asterisk
runuser = asterisk ; The user to run as
rungroup = asterisk ; The group to run as

Edit /etc/sysconfig/asterisk:

Remove comment out

AST_USER=”asterisk”
AST_GROUP=”asterisk”

Install app_swift:

Appswift is at http://76.164.171.235/gf/project/app_swift/frs/?action=FrsReleaseBrowse&frs_package_id=7, it adds app_swift, which integrates with Cepstral TTS and makes creating prompts in your dialplan easy.

cd /usr/src
wget http://76.164.171.235/gf/download/frsrelease/110/142/app_swift-2.0.1-ast1.8.tar.gz
tar -xvzf app_swift-2.0.1-ast1.8.tar.gz
cd app_swift-2.0.1-ast1.8
make
make install

Install php5 for scripting:

yum install php php-cli

Install g729 and g723 codecs:

cd /usr/src
wget http://asterisk.hosting.lv/bin/codec_g723-ast18-gcc4-glibc-pentium4.so
wget http://asterisk.hosting.lv/bin/codec_g729-ast18-gcc4-glibc-pentium4.so
cp codec_g729-ast18-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g729.so
cp codec_g723-ast18-gcc4-glibc-pentium4.so /usr/lib/asterisk/modules/codec_g723.so

Asterisk Fax:

Order free license key from digium at store.digium.com first.

Then:

cd /usr/src/
mkdir astfax
cd astfax
wget http://downloads.digium.com/pub/register/x86-32/register
wget http://downloads.digium.com/pub/telephony/fax/benchfax/x86-32/benchfax-1.1.0-x86_32

chmod 500 register
chmod 500 benchfax-1.1.0-x86_32

./benchfax-1.1.0-x86_32

This will tell you which version of Asterisk Fax to use. Then go to the fax selector at   http://www.digium.com/en/docs/FAX/faa-download.php

Pick the one suggested by bench fax, in our case (a 32 bit i686 Linux):

wget http://downloads.digium.com/pub/telephony/fax/res_fax_digium/asterisk-1.8.4/x86-32/res_fax_digium-1.8.4_1.3.0-i686_32.tar.gz

tar xvzf res_fax_digium-1.8.4_1.3.0-i686_32.tar.gz

cd /usr/src/astfax/res_fax_digium-1.8.4_1.3.0-i686_32
cp res_fax_digium.so /usr/lib/asterisk/modules/
cp res_fax_digium.conf /etc/asterisk/

Now you can test your basic installation via

asterisk -vvv -c

If all is well, you can run

service asterisk start

to run it as a service. I have my config files from previous installs, so I first copied them back to /etc/asterisk and I was good to go.

Sugarsync Crash on Mac OS X 10.7 – Lion

Yesterday, Sugarsync prompted me to install an update. After installation, it complained parts of it was installed separately and refused to run. I uninstalled it via /Applications/SugarSync\ Manager.app/Contents/Resources/SugarSyncUninstaller.command

Then I did a fresh install. Still no luck, it kept crashing. I fired up the Console to see if I can find any errors. I found some errors related to xfsmond, particularly:

10/11/11 5:43:46.788 PM [0x0-0x57057].com.SugarSync.Manager: launchctl: Error unloading: com.sharpcast.xfsmond

I fixed the permissions of the Launch Daemon for it via

sudo chmod 644 /Library/LaunchDaemons/com.sharpcast.xfsmond.plist

And loaded it via

launchctl load /Library/LaunchDaemons/com.sharpcast.xfsmond.plist

Voila, now SugarSync Manager runs fine, no more crashes. Hope this post helps someone…

ICANN Registrants Rights and Responsibilities

Recently, ICANN finalized and published a new document titled “Registrants Rights and Responsibilities.” The 2009 RAA included a provision that would require both registrars and their resellers to link to this new document from their website as a way both educate and protect domain registrants by ensuring they understand their rights and responsibilities when it comes to their domain names.

So here is the link to the document for those who are interested.

WordPress plugin updates and IIS 7 errors

Whenever you upgrade a plugin in WordPress or WordPress itself while running under IIS 7, you get an error. This usually happens as the process was unable to delete the folder for the plugin or such. This issue is related to WinCache plugin for PHP and latest version fixes the issue.

Install the latest one at: https://sourceforge.net/projects/wincache/files/development/

Happy blogging :)

Making Mac OS X Terminal Behave Like DOS/Linux

I was going through my bookmarks and such and I remembered an old gem. The default key settings in Mac OS X terminal will drive you nuts, if you are used to DOS or Linux terminal. Especially Home, End, Page Up and Page Down keys.

Fire up your Terminal, go to Preferences -> Settings – Keyboard and modify the following keys, so that their action matches the value shown. You can edit the keystroke for an item by double clicking on it, selecting “send string to shell”, and typing the indicated keys.

Key Action Keystrokes
control cursor left \033b ESC b
control cursor right \033f ESC f
end \005 CTRL+e
home \001 CTRL+a
page down \026 CTRL+v
page up \033v ESC v

That will be give you back the settings you are used to :) , kudos goes to Brian Duff

How to start a Blackberry in Safe Mode

There are times some third party applications starting automatically can cause havoc on your Blackberry device. If you are using a device with OS 4.6 or higher, you are in luck. You can simply start the device in safe mode, similar to Windows. This disables the automatically starting apps and allow you to troubleshoot.

The steps are really simple.

1. Remove and reinsert battery.
2. Wait for the red light go off.
3. As soon as red light is off, press and hold Escape key as the OS continues to load.
4. Shortly you´ll see a dialog box stating you are in safe mode, click OK to continue.

And to exit, you can simply reset the phone again.

See the details at Blackberry KB Article 17877.

Happy New Year

Happy New Year everyone, may the new year bring all the best for all of you…

Happy Thanksgiving everyone…

Happy Thanksgiving from sems.org to all of my family, friends and visitors. It has been a tough year for me but I have many blessings that I am thankful for.

Don’t overstuff yourselves with Turkey and don’t miss tomorrow’s great deals…

Handango – Early Black Friday Sale

Very nice, if you are looking to buy some apps/games for your mobile device, Handango has 20% off site wide. Just use the BLKFRI20 coupon code :)

PS. This Black Friday offer expires at midnight C.S.T. 11.26.2010 and is only available on Handango.com

Revamping the site

It was about time to change from old blog system, which is no longer supported. So, welcome to new software and design. I am keeping the old links up, but eventually will remove them. If for some reason you need to view the old site, the link is:

http://sems.org/index.asp

So excuse the mess while I clean up. Feel free to post about any errors and I’ll fix them asap :)