Showing posts with label NodePhone. Show all posts
Showing posts with label NodePhone. Show all posts

Thursday, June 23, 2011

Synology NAsterisk: Stage One Installing Ipkg and Asterisk

Alrighty, so as you may have guessed it has been a little hectic over here but I am finally getting a chance to start on the glorious plan that I hatched in Synology NAS hosted home Asterisk Server: The plan.

Actually I should probably say I started doing this 3 months ago, before the wedding and all that and have almost zero spare time since then as I am now studying and travelling a lot for work at the same time.

I am basically following the instructions given on the Overview of modifying the Synology Server.

Enabling the CLI
The first step to getting ipkg installed is setting up the command line interface (check out this CLI overview from Synology for more info). There is a handy guide to Enabling the CLI on the Synology forums which has instructions for much older versions of DSM than I have, but no worries it is just as simple in DSM 3. Simply open up the Control Panel and select terminal from the second row. I'd always pick SSH for my systems but if you feel like using Telnet then go for it. Once enabled reboot.

Downloading IPKG
Once you're in via terminal you'll need to download the correct ipkg bootstrap for your Synology system, go to What kind of CPU does my NAS have to figure out which one you need, you can double check your NAS version on the System info page. In my case for the DS211J its the Marvell Kirkwood mv6281 1.2Ghz ARM Processor. This means I need to use http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh. Once it was downloaded I executed the script using the instructions provided and rebooted the system, then updated as instructed, unsurprisingly there was nothing new to install.

BackupCentre> ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/cross
Successfully terminated.
BackupCentre> ipkg upgrade
Nothing to be done
Successfully terminated.
BackupCentre>
Installing Asterisk
After ipkg is installed and upgraded it is time to install Asterisk, outputting the list of available packages gives.

BackupCentre> ipkg list | grep asterisk
asterisk - 1.2.24-1 - Open Source VoIP PBX System
asterisk-gui - 2.0.4-1 - Asterisk-GUI is a framework for the creation of graphical interfaces for configuring Asterisk.
asterisk-sounds - 1.2.1-1 - Supplementary asterisk-sounds.
asterisk14 - 1.4.22.1-1 - Asterisk is an Open Source PBX and telephony toolkit.
asterisk14-chan-capi - 1.0.1-1 - capi module for asterisk
asterisk14-core-sounds-en-alaw - 1.4.19-1 - asterisk-core-sounds-en-alaw
asterisk14-core-sounds-en-g729 - 1.4.19-1 - asterisk-core-sounds-en-g729
asterisk14-core-sounds-en-gsm - 1.4.19-1 - asterisk-core-sounds-en-gsm
asterisk14-core-sounds-en-ulaw - 1.4.19-1 - asterisk-core-sounds-en-ulaw
asterisk14-extra-sounds-en-alaw - 1.4.11-1 - asterisk-extra-sounds-en-alaw
asterisk14-extra-sounds-en-g729 - 1.4.11-1 - asterisk-extra-sounds-en-g729
asterisk14-extra-sounds-en-gsm - 1.4.11-1 - asterisk-extra-sounds-en-gsm
asterisk14-extra-sounds-en-ulaw - 1.4.11-1 - asterisk-extra-sounds-en-ulaw
asterisk14-moh-freeplay-alaw - 0.0.0-1 - asterisk-moh-freeplay-alaw
asterisk14-moh-freeplay-g729 - 0.0.0-1 - asterisk-moh-freeplay-g729
asterisk14-moh-freeplay-gsm - 0.0.0-1 - asterisk-moh-freeplay-gsm
asterisk14-moh-freeplay-ulaw - 0.0.0-1 - asterisk-moh-freeplay-ulaw
asterisk14-moh-opsound-alaw - 2.03-1 - asterisk-moh-opsound-alaw
asterisk14-moh-opsound-g729 - 2.03-1 - asterisk-moh-opsound-g729
asterisk14-moh-opsound-gsm - 2.03-1 - asterisk-moh-opsound-gsm
asterisk14-moh-opsound-ulaw - 2.03-1 - asterisk-moh-opsound-ulaw
asterisk16 - 1.6.2.13-1 - Asterisk is an Open Source PBX and telephony toolkit.
asterisk16-addons - 1.6.2.2-2 - Asterisk extras
asterisk18 - 1.8.4-1 - Asterisk is an Open Source PBX and telephony toolkit.
BackupCentre>
I'm going to install version 1.6 and the GUI, I chose 1.6 because some people are having issues with getting the GUI working with 1.8.

Installation was as easy as ipkg install asterisk16 and ipkg install asterisk-gui.

Following that I attempted to start asterisk and was presented with the following error.

BackupCentre> cd /opt/etc/asterisk/
BackupCentre> asterisk -vvvvr
Asterisk 1.8.4, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/opt/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/opt/etc/asterisk/extconfig.conf':   == Found
Unable to connect to remote asterisk (does /opt/var/run/asterisk/asterisk.ctl exist?)
BackupCentre>
I had to start it with asterisk first and then I can reconnect to it... duh!

Following that I made the changes suggested in this awesomely timely post  from the Synology IPKG Forum and now, after a quick reboot, I can connect to the webpage front end.

Now all I have to do is determine the correct password..... :)

Until next time when I configure some extensions and start making test calls.

Thursday, February 10, 2011

Synology NAS hosted home Asterisk Server: The plan

Readers of this blog will be aware that I purchased and setup a Synology DS211J a few months back, if not you can check out the series of posts starting with "Finally getting a backup solution". Readers will also be aware that I have started a new job that involves equal parts sitting at home turning into a slob and travelling around meeting clients and working on site. So what I am currently trying to do is optimize my home office and communication solutions.

At home I've got a NodePhone account and it is currently connected to a base station and linked into a few wireless handsets. This works pretty well for a home phone, but none of the handsets have headsets or speaker phone so conference calls are going to be a killer. Unfortunately NodePhone doesn't support multiple registrations in its current guise so simply logging in on the laptop with a headset or something similar isn't going to work.... or is it!

The plan then is to have an Asterisk server log into the NodePhone account and then let my current router and it's inbuilt ATA log into the Asterisk server, plus also I will be able to have other computers and phones logging into the Asterisk server and sharing the line out and also allowing me to register to the Asterisk server remotely and call the home phone as well as make cheap international and other calls. Now the beauty of the plan is that I should be able to install Asterisk on my NAS creating a NAStrisk solution (terribly imaginative name) that means I don't need to have another server on the network and the associated upkeep.

So the stages for this (as far as I can tell are):
  1. Install ipkg package manager on the DS211J
  2. Install the Asterisk ipkg and its dependencies.
  3. Configure Asterisk and make some local test calls.
  4. Configure router to let SIP traffic through to the NAStrisk
  5. Get NAStrisk connected to NodePhone account and forwarding calls to other sip accounts locally.
  6. Connect routers ATA to the NAStrisk so that the WAF isn't affected.
  7. ....
  8. Profit
Hopefully I'll have the time to get this going in the next week or two, of course I will be posting here as I go, so you can all feel my pain bask in my success!