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.