Monday, 27 January 2014

Adding Extensions to a free PBX / Asterisk server

Logon to your server
http://172.17.0.11/freepbx/admin



From the applications menu select extensions




Select generic sip device as the type and continue




Enter the user extension eg 110

enter the display name eg Gareth Westwood

from the "This device uses sip technology" section either note down or create a new secret (password) to use when you configure the phone handset
click submit from the bottom of the page
The extension should now appear with any others you have created in the top right of the screen

Configuring a Linksys SPA941 on Freepbx (Asterisk)

For this post I am going to assume you have the phone plugged into your network and that something is giving out dhcp address. I'm also assuming you have already configured your extensions on the server and have the extension password to hand.

I have seen some talk of this phone being either a 2 line or 4 line version depending on the firmware. I don't know how to do that bit and for my install I only need 1 line so am not really fussed.

First job (just to be safe) is to reset the phone to factory defaults.
Press the menu button
Use the up/down arrows to select option 14 "Facroy Reset"  and press select (or key in 14)
Confirm by pressing ok
The phone will then restart and get a dhcp address from the dhcp server.

Check the current IP
Press the menu button
use the up/down arrows to select option 9 "Network" and press select (or key in 9)
The phones current IP should be listed in item 2 on the screen. For my example it is  172.17.0.152

Enter the settings for your asterisk/Freepbx server
goto the phones ip address in your browser (I used chrome)
click on the admin login link from the top of the page
select regional tab
clear all "Vertical Service Activation Codes"
change timezone to GMT
select the Phone Tab
under line key 2, 3 and 4 change extension from 1 to disabled
select the Ext 1 tab
Enter the ip address of the asterisk server in the proxy box (172.17.0.20)
Under Subscriber information put;
the users name in display name
the extension number in user ID
The secret key from the asterisk extension config in the password box
(as long as this is the same on both ends it doesn't really matter what it is)
Click the Submit all changes button and wait for the phone to restart (which sometimes takes a while)

Monday, 13 January 2014

Installing the Unifi wireless AP controller as a service

I have recently started using the Ubiquity wireless access points. They have come very highly recommended by the engineers I work with at Quietly Confident Technology Ltd. The only issue I have is that by default installation of the controller goes to the users profile directory and therefore needs that user to be logged on for it to work.

I needed a way to get it running as a service so it could be auto started on reboot and not require a user to be logged in. I did all of this on a new windows 7 64 bit machine accepting all defaults unless otherwise mentioned. This is all provided as is, I am not saying this will work seamlessly on all machines, use at your own risk...

Most of the info here is stolen from the unifi FAQ HERE but there are a couple of extra bits.

Install Java
The first thing to do is download and install the latest version of Java. The unifi software will do this automatically for you but I had issues starting the service if I used the version of Java that was auto installed.
download from: http://www.java.com/en/download/windows_offline.jsp
Follow the prompts onscreen. Be aware that some java installers try to sneak crap ware onto your PC so make sure to keep your eyes open for "Yes, please install xx, yy and zz" for me.

Install Unifi AP
Once Java is on install the unifi AP controller software
download from: http://www.ubnt.com/download#UniFi:AP
Again, follow the onscreen instructions, it's another next, next, ok, next thing. Do not bother to run the controller when the install finishes. We want to move it around first.

Move it all around
The default install for the unifi software is into the user profile. This helps when doing updates but seems a little none standard to me so to prevent issues at a later date move the folder "c:\users\admin\Ubiquiti UniFi" to "c:\program files".

Install the service
Make sure that the java bin directory to the PATH (Computer > Properties > Advanced > Environment Variables > in the System Variables bit) as by default is isn't in there. On my install "C:\Program Files\Java\jre7\bin" needed adding (is't a ";" separated list).
run cmd as an Administrator, (right click 'Run as administrator')
cd to the location you moved Ubiquiti UniF to earlier ("c:\program files\Ubiquiti UniF")
run the following command "java -jar lib\ace.jar installsvc"
Start the service either by running 'net start "Unifi Controller"' or by going to the services control panel (run > services.msc)

Checkout your skills
Browse to https://<your ip here>:8443 and go through the setup.
This should auto run when the computer is restarted.

I hope someone somewhere finds that handy.