Saturday, 19 October 2013

My Build of Raspbx, asterisk and freepbx on the Raspberry Pi

I just received my Raspberry Pi kit which i bought from amazon

I am buliding an asterisk pbx systems on to it, the Raspberry Pi is a revision 2 512mb Ram.

Having read up before i build the system raspbx comes with i hope the fail2ban service, which i will find out as i write this post.

My Main intention for this is simply to make it into a voicemail server as an addon for a panasonic pabx which has the sip utility.

Although is should be fine for VoIP calls.

The First thing i need to do is download the raspbx image from here

I then need to write the image onto the sd card, which has come with Noobs pre installed, i am going to overwrite this.

My PC is ubuntu so to write the image i am following this video from YouTube, this particular channel the guy is great to follow for all sorts of howto's on ubuntu, this video is explaining howto write the raspberry pi image but i'm going to try writing raspbx instead.


Opened the disk utility and unmounted, now to do the dd write commad
my sd card is /dev/sdb1.
I have download my image to Desktop and created a folder call raspbx which i am going to extract the image in.
Opening a terminal i am going to change directory #cd Desktop/raspbx/raspbx-12-08-2013/
I am now in the folder with the image next the write command
# sudo dd bs=4M if=raspbx-12-08-2013.img of=/dev/sdb
 press enter and type password this can now take a few minutes.

My SD Card Is 8GB so the initial image is 4GB and i will be looking to extend the space to 8Gb later.

Its Now built 2 minute job



Plugged in watching a boot screen could see on the boot up it has an ip of 192.168.0.122, that may help in a bit.

Logging in from ssh in ubuntu is going to be
ssh root@192.168.0.122 for me user root password = raspberry to start

Now presented with this terminal screen

At this stage is have typed raspi-config which now presents this screen



I selected expand_rootfs and now it has asked to reboot lets do it finish and then select reboot.

Thats killed my install so going to start process again,

This time to extend the partition i am going to plug the SD Card back into my pc and use gparted. No im not
Update the raspberry pi from the raspi-config, do all the updates now works fine.

Thats it my raspbx is now running configured with voicemail
just follow the official website for raspbx for any other info.

Buy your own raspberry pi kit the same as i bought here

Interested in a raspbx for your telephone systems call Union Telecom for further info for business telephones systems in the UK 

Check out my video on youtube for the raspbx asterisk freepbx voicemail server.

Tuesday, 8 October 2013

Google has become boring and safe.

A long time ago before Google was the main search engine, life was so fun using multiple search engines to try and find the answer to an internet query. All these search engines then started to disappear as we all hopped on the google bandwagon.

For a while google was fun serving up interesting results, websites that you never had seen before and finding new business enterprises selling interesting products or products that you had never seen before.

Then came the Google panda and penguin updates, what a bore.

Have you ever noticed recently that everytime you search for products that its the same old same ole being presented on the 1st page of results. Go on i dare you go to page 2 on google, well nobody ever does.

No matter what you are searching for it s the same, a product? Amazon then Tesco then bla bla bla, a Holdiday? well TripAdvisor of course the so called experts with millions of followers with grudges to bare because low and behold we dont give perfect service to every customer, we are after all only human.

Then you will see a wiki page in every top ten results, even when searching for maybe a specialist product, there it is the most inaccurate Wiki result with a paragraph of rubbish.

Google it seems is now playing safe with high street brands and large online stores like Amazon or Ebay.

Am i forced to use it well of course not but there is no alternative, Bing at a push yes maybe i will give it a chance but Microsoft hardly known for their own success recently does not gain my confidence.

Please Please Apple make yourself known on the search engine front. you have a captive audience with your own products, bring us competition, after all a search engine monopoly is just not good.

Google please return some of the old value of promoting unheard of small businesses, i hate the big brands dominating life.

There must be a way to do it, after all any old Joe Smoe could serve up results like you are thats not intelligent thats playing safe.

Well that’s my rant over, this of course will never be read by anyone as this page will just dwindle into the black hole of the internet to age over time.

Ps a note to Goolge
Maybe try an algorithm  that actually looks at the speciality of the website, takes into consideration the personal touch of the website owner that a big business does not offer.
EG yes large companies with support not local to us here in blighty who actually are interested in profit only and not customer service which is the bedrock of any small business.

I dare you Google support the small business man!!!!!



Sunday, 28 October 2012

Mikrotik routerboard rb750up as a switch

If like me you need to setup your rb750up as a switch, i have managed to bridge ports 1,2,3,4 so you can use port 1 as a poe power source and then use ports 2,3,4 to power your ubiquiti devices. Port 5 is only used for access to the router board with winbox etc. I have left the default dhcp on port 5 so you can access via 192.168.88.1 but port 5 is not bridged.

download the config Routerboard RB750UP switch config
just use winbox to connect to routerboard then drag the backup file to files in winbox, highlight and restore.

Sunday, 17 June 2012

coova-chilli build on ubuntu

This is my install of coova-chilli on ubuntu 8.04 server
I already have a radius server with wireless orbit
so install ubuntu with no extras (ftp apache mysql) and setup the eth0 interface network
set up a user account as asked and password
once built
sudo apt-get update
sudo apt-get upgrade
apt-get ssh
log into ssh with host username and port (22) and password
sudo wget http://ap.coova.org/chilli/coova-chilli_1.0.12-1_i386.deb
sudo dpkg -i coova-chilli_1.0.12-1_i386.deb
sudo nano -w /etc/default/chilli
change
START_CHILLI=0
CONFFILE=”/etc/chilli.conf”
to
START_CHILLI=1
CONFFILE=”/etc/chilli.conf”
ctrl x – yes – enter
now at this point i have a chilli.conf already made with the lines
include /usr/local/etc/chilli/main.conf
include /usr/local/etc/chilli/hs.conf
include /usr/local/etc/chilli/local.conf
deleted
here is my chilli conf
________________________________________________________________________________
#
# Chilli Configuration
#
# To configure chilli, see /usr/local/etc/chilli/default
# and then create your own /usr/local/etc/chilli/config
# start / stop chilli with /chilli
#
# For help with coova-chilli,
# visit http://coova.org/wiki/index.php/CoovaChilli
#
# This file can either contain all your chilli configurations, or include
# other files, as shown per default below. The idea here is that main.conf
# contains your main configurations, hs.conf is for your configurations
# delivered by RADIUS (using the Administrative-User login), and local.conf
cmdsocket /usr/local/var/run/chilli.sock
pidfile /usr/local/var/run/chilli.pid
net 192.168.180.0/255.255.255.0
uamlisten 192.168.180.1
uamport 3990
dhcpif eth1
uamallowed 69.36.234.20,www.paypal.com,
www.wirelessorbit.com,paypal.112.207.net,www.paypalobjects.com,portal.wirelessorbit.com
uamanydns
domain lan
dns1 192.168.180.1
uamhomepage http://192.168.182.1:3990/www/coova.html
wisprlogin https://coova.org/app/uam/auth
wwwdir /etc/chilli/www
wwwbin /etc/chilli/wwwsh
locationname “HotSpot”
radiuslocationname HotSpot
radiuslocationid isocc=,cc=,ac=,network=Coova,
radiusserver1 69.36.234.20
radiusserver2 (leave blank for wireless orbit)
radiussecret *********
radiusauthport 1812
radiusacctport 1813
uamserver https://portal.wirelessorbit.com/portal/index.php?portal_id=**********,
radiusnasid nas01
papalwaysok
uamsecret *********
ipup=/etc/chilli/up.sh
ipdown=/etc/chilli/down.sh
___________________________________________________________________________
before i do anything with my chilli.conf i start chilli
sudo /etc/init.d/chilli start
then stop it again
sudo /etc/init.d/chilli stop
this writes the defaults
then i transfer with a ssh file transer window
i use ssh secure shell but winscp will do
transfer into /home/username
then
sudo cp chilli.conf /etc/chilli.conf
finally
sudo nano /etc/rc.local
add the line
iptables -I POSTROUTING -t nat -o eth0 -j MASQUERADE
to turn on nat
ctrl +x answer y and enter
you might also want a second dns server for you wan eth0
i use opendns
so
sudo nano /etc/resolv.conf
nameservers 208.67.222.222
nameservers 208.67.220.220
ctrl +x answer y and enter
sudo reboot and if radius configured correctly you should have a coova redirect page
then your login page with your radius server
i also fiddle with the index.html in /etc/chilli/www to put a company logo and name for the small redirect page before it goes to the main login page

Freepbx PIAF Atcom AX-100P install

I decided to purchase an atcom ax-100p for my home pbx as it was only £20.00 on ebay.
I decided on using Pbx in a Flash or PIAF. I inserted the card before i built the PIAF system.
AFter installing PIAF i ran the suggested genzaptelconf command which recognised the card.
I now went about configuring parameters for the card. Upon my first attempt i was able to get it working on incoming calls but not for outgoing it was coming up with stange results for the ztcfg -vvvv command saying i had 100 channels to configure so i new something was wrong.
So i decided to run the genzaptelconf command with options -s -d -v this then reconfigured the card but still it had an extra span in the zaptel.conf so i deleted that section and also the extra in zapata-channels.conf so there was only 1 span.
Rebooted made sure the zap channels DIDs was created in freepbx, and that i had a freephone number to dial using zap/go
and i was able to use my zap card.
Heres my working confs
Zaptel.conf
# Autogenerated by /usr/local/sbin/genzaptelconf — do not hand edit
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg
#
# It must be in the module loading order
# Span 1: WCFXO/0 “Wildcard X100P Board 1″ (MASTER)
fxsks=1
# Global data
loadzone    = uk
defaultzone    = uk
Zapata.conf
;
; Zapata telephony interface
;
; Configuration file
[trunkgroups]
[channels]
language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300        ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
usedistinctiveringdetection=yes
cidsignalling=v23 ; Added for UK CLI detection
cidstart=polarity ; Added for UK CLI detection
;callerid=asreceived ; propagate the CID received from BT
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=800
rxgain=6.0
txgain=4.0
group=0
callgroup=1
pickupgroup=1
immediate=no
;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no
;Include genzaptelconf configs
#include zapata-channels.conf
;Include AMP configs
#include zapata_additional.conf
Zapata-channels.conf
; Autogenerated by /usr/local/sbin/genzaptelconf — do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
; Span 1: WCFXO/0 “Wildcard X100P Board 1″ (MASTER)
;;; line=”1 WCFXO/0/0 FXSKS (In use)”
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 1
context=default
After this i decided to have a bit of fun
so i created a dialout rule so if i dial 1471 it then passes to BT to get the last caller id
1472 as a feture code on freepbx for call trace for voip numbers.