Windows 7 Explorer as Administrator

This entry is mostly just out of spite. I wanted to open explorer as administrator to copy some files between hard drives. (It turns out I didn't really need to do that, but I digress.)
Shouldn't be too difficult right? I googled "windows explorer administrator" and came up with this site as the first hit. The description seemed very promising, but when I got to the site, I found you had to register/pay to see the solution.

Here is the extremely easy process to open Windows Explorer as Administrator in Windows 7:
1. Search for "explorer" in the windows menu search box.
2. Right-click "Windows Explorer" and select "Run as administrator"
3. Enter password if needed and enjoy.

That's it. Hope it helps someone.

Quick, Easy, Cheap PBX Setup using Skype

Looking to implement a phone and collaboration system for a small to medium sized organization? Open source software provides a proven, reliable solution for a fraction of the price of a standard enterprise level system. (Cisco...). You will need a working knowledge of Linux (or Google) for best results, as I won't be covering standard tasks such as changing an IP on Linux, etc.This post is meant as a proof-of-concept or for quick reference. The following instructions will provide an operational system able to make outgoing calls to standard landlines, however it is not a complete solution. Average user needs will call for something quite a bit more complex.

If you have an old box that can be used as a dedicated system, you can have a working voip (outgoing calls) and an IM communication system for less than $10 a month in fees. A very basic system (a few extensions and one SIP channel) can be set up in about 2-3 hours.
There are many good uses for such a system, not least of which is using SIP software on a mobile phone with 3G data access. The SIP client connects to your server over the internet, which then forwards the call though Skype.

In this walkthrough I will be focusing on creating a system very quickly with minimal configuration.

Materials
Hardware:
I used a virtual machine with 512MB Ram, 10GB HDD, and 3Ghz CPU for my setup. For a production system a physical machine would be preferable so that FXO or other interfaces can be easily added. Generally you need:
512MB RAM
Pentium III 1.2Ghz or higher
20GB+ Hard Drive

Software:
trixbox CE - trixbox CE is the free, fully open source version of the commercial version of trixbox. It utilizes Asterisk for PBX functionality and FreePBX for the web manager. After downloading and installing the ISO, (based on CentOS 5.5) the system is basically ready to go.

Openfire - Openfire is a comprehensive, scalable collaboration system. It has excellent integration features with Asterisk. I'm using Spark and it's SIP Phone plugin for a centralized IM and VoIP application.

Spark - The Java client for Openfire, developed by the same company (ignite realtime). Any XMPP client will work for the IM portion, however Spark has a SIP phone plugin allowing calls to be make directly from the app.

X-Lite - A nice softphone that is free and simple to configure and use. A drawback is it shows an ad everytime it's opened. Useful for testing extensions. Check sourceforge.net for free open source softphones.

Skype  for SIP - Very cheap service allowing incoming and outgoing calls to the outside world. Each channel (equivalent to a phone line) costs 6.95/month. An online number (phone number regular phones can call) costs an additional $6.30 a month per number.

Got it? Ok, lets start!

Install trixbox
Installing trixbox is about as straight forward as a Linux installation gets. Simply burn the ISO to a cd, boot, and let the installer do the rest of the work. Keep things simple and don't try to add it on to an existing installation. The default install will wipe your hard drive! The only input required is the root password. Reboot the system and it should be ready to go. The network will be configured with a DHCP address, so you will need to log in and check it with "ifconfig" or configure a static address as necessary.

Configure an Extension
Once installed, log into the web interface (http://ipaddress). The default admin login is:
User: maint 
Password: password
Check the top right corner to make sure the system is in admin mode. If not, click "switch." 
After successfully logging in, create a new extension. Click on the "PBX" menu and select "PBX Settings".

Click on "Extensions"

Keep the pull down menu on "Generic SIP Device" and click "Submit". The only required fields for the scope of this walkthrough are "User Extension", "Display Name", and "Secret".
Use a 3 digit number for the extension (200), and a name and password for the other fields.
After entering the proper information, click "Submit" on the bottom of the page.
You would think after clicking submit the process would be finished, but Asterisk still needs to be reloaded. Click the "Apply Configuration Changes" button on the top of the page:

Click "Continue with reload" and the extension should be ready to go.
Repeat the process with a second extension so a test call can be made.

Install a Softphone
On a Windows computer (XP, Vista, 7), install X-Lite. Right-click anywhere on the phone and select "SIP Account Settings" from the menu. If there is already an account in the list that comes up, click properties.
"Display Name" can be anything.
"User name" and "Authorization user name" should be the extension.
"Domain" should be the IP address of the trixbox machine.
The defaults for the rest of the fields will work for now.
When two extensions are configured on separate computers, dial an extension and verify everything is working.

Configure Skype for SIP
Configuring the Skype SIP connection is the most complicated part of the installation, mostly because it is still in "beta" and there is currently no documentation (that I could find).

  • Log onto skype.com and create an account if you don't already have one. 
  • Click on the "Business" link on the far right of the skype homepage and create a business account. You can associate it with an existing regular account if desired. 
  • Once in the "Skype Manager Dashboard" purchase some credit. $10 will be enough for our purposes. 
  • Click on the "Features" button near the top left of the page, and then click "Skype for SIP". Click "Create new profile" and give it a name. Take note of the username, password, and address that is generated.
  • Click on "Profile Settings" on the left, and then click on "Setup outgoing calls". The system will not let outgoing calls through unless there is credit on the line (even free local calls). Add the amount of credit desired. I allocated the remaining credit from the original $10 ($3.04).
An online number for incoming calls can be setup for additional $$$.

Configure the SIP Trunk in trixbox
Now that Skype is configured, the trunk on the trixbox machine can be configured. This is another part that has very little documentation available.

In the trixbox web interface, click on "Trunks" on the left, and then click "Add SIP trunk".

Under "General Settings" type the assigned skype username in the Outbound Caller ID field.

In "Outgoing Dialing Rules", input "NXXNXXXXXX". (area code plus 7 digit number)

Under "Outgoing Settings", give the trunk a name.
Use the following under "PEER Settings":
username=xxxxxx ; This is the Skype SIP User found in the authentication  area
secret=xxxxxxxx ; Skype SIP password
type=peer
qualify=yes
insecure=invite
host=sip.skype.com
fromdomain=sip.skype.com
disallow=all
allow=ulaw&gsm&alaw
context=from-trunk
fromuser=xxxxxx ; Skype SIP Username
Under "Registration" use:
username:password@sip.skype.com/username

Leave the "User Context" and "User Details" blank.

Configure an Outbound Route
This is the last step needed to place outgoing calls.
  • Click "Outbound Routes" on the left panel.
  • Give the route a name (skypeout or similar)
  • Enter "99|." in the "Dial Patterns" box. (Users will dial "99" to reach an outside line.)
  • Select the Skype SIP trunk that was created earlier in the "Trunk Sequence" area.
  • Submit the changes and then apply the configuration changes.
After the configuration has been applied to Asterisk, the system should be working. Try reaching an outside line from a softphone by dialing "99 1 xxx xxxx"
If it dosen't go through, make sure credit is applied in skype.
Check the output by running "asterisk -r -vvvv" on the server
At this point the phone system should be working correctly. Continue reading for Openfire setup.

Set up the Openfire Collaboration Server (Instant Messaging)
Now that the PBX is working with outgoing calls, the IM server can be configured.
  • Download Openfire to the server and start the installation (rpm -ivh openfire_*.rpm).
  • When the install is finished, log onto the admin console. (http://ipaddress:9090)
  • Complete the setup wizard. When asked for a database use the internal database.
After the setup wizard is up and running, create some new users.
  • Click the "Users/Groups" button on the menubar and then "Create New User" on the left.
  • Install Spark on a client computer. For the server enter the IP address of the trixbox/Openfire machine. Click connect the client should log on normally.
Install the SIP Phone Plugin for Openfire and Spark.
  • Open the Openfire web admin page and click the "Plugins" button on the top menubar.
  • Click "Available Plugins" on the Plugins page.
  • Locate "SIP Phone Plugin" and click the green install button on the right.
  • After the plugin is installed successfully, click the "Server" button on the menubar, and then click the "Phone" button on the sub-menubar.
  • Click "Add new phone mapping"
Enter the following:
XMPP username: openfire username
SIP username: asterisk extension
Authorization username: asterisk extension
Display Phone Number: Desired number
Password: password setup on trixbox
Server: IP address of trixbox machine
 Once all the data is in, hit create. The extension will be registered when the client installs the plugin and logs on. (next step)

Install the SIP Phone Plugin in Spark.
  • Open Spark, login with the user that has the mapped extension.
  • Click the "Spark" menu on the top left and select "Plugins"
  • Click the "Available Plugins" tab. Select the SIP Phone Plugin and click the green install button on the right. After it is finished installing, restart Spark.
When Spark starts back up, a new toolbar will be displayed with phone dialing tools. Assuming the extension mapping was configured correctly, the Spark client can now place calls in the same way the X-Lite client can.

That concludes the setup. Please post any problems or suggestions. Thanks!