Building An Exchange Unified Messaging Lab (Part 2)


This series of blog posts started with Part 1 where we discussed the requirements of the lab and what you would need from any PBX that you might have to hand. Part 2 (and the next few parts) will look at installing AsteriskNOW to provide a software PBX to support the Exchange Server unified messaging environment.

Installing AsteriskNOW Software IP PBX

Start by downloading the latest version of AsteriskNOW from http://www.asterisk.org/downloads. This is a easy to install version of the open source Asterisk IP PBX. AsteriskNOW installs the underlying Linux OS it needs with very little initial configuration and is especially easy for non Linux people like myself! This blog is based on AsteriskNOW 2.0.2

While AsteriskNOW is downloading create yourself a new virtual machine with the following configuration:

  • 512Mb RAM (dynamic memory not required)
  • 1 Processor
  • 1 Legacy Network Card (that is, remove the standard NIC that Hyper-V adds to new virtual machines and add a legacy network adapter). AsteriskNOW runs on CentOS and this does not have an easy to install Hyper-V Integration Services that would provide support for the standard network card.
  • Connect this network card to a physical network with internet access.
  • 1 new virtual hard disk, dynamically expanding is fine. 15GB should be plenty, though no harm is making its maximum size larger if you need to.
  • Once the AsteriskNOW iso is downloaded attach this to the virtual machine.

The settings for the virtual machine should similar to the below screenshot:

image_thumb1

Start the virtual machine and then connect to it to see the installation proceed.

First, select option 1 to install Asterisk 1.8 and the FreePBX web interface for the PBX:

image_thumb2

CentOS (a Linux distribution) will install automatically followed by an installation of AsteriskNOW and FreePBX. You will be asked to create the disk partition, wiping all data – and your answer will be Yes:

image_thumb3

Then you will need to partition the hard disk. Choose the option to Use free space on selected drives and create default layout and click Next.

image_thumb4

Select your timezone and check the box System clock uses UTC and click Next.

image_thumb5

Enter the password that you want to use for the root account. Click Next and go and get a coffee. A long coffee! And come back in about 30 minutes.

image_thumb7

Finally, and before you reboot the server at the end of the installation, change the virtual machine settings so that the ISO is not mounted as a DVD.

The Initial Configuration of AsteriskNOW

After the installation has completed and the new software PBX has been restarted you can complete the initial configuration of the server. This includes network and other settings such as NTP time sync and keyboard changes is you are not based in the US.

To make some of these changes you will need to either have experience of using Linux text editors or install WinSCP and use this to edit the config files from Windows. WinSCP can be downloaded from www.winscp.net

First change is the network settings. The Setup Agent screen appears, and you can exit from this (or wait and it will disappear shortly). You will be presented with the login screen:

image_thumb8

Enter root and the password you choose during setup. Make a note of the IP address that is currently assigned to the server. This is shown above the login prompt. If you forget the IP address you can type ifconfig at the prompt in the console to be reminded of it.

Type system-config-network to allow you to change the IP address and DNS on the server. Note that DNS changes will not work until after the network is restarted (or the server rebooted).

image_thumb9

Tab until Edit Devices is selected and press Enter.

Your current network card will be highlighted. Press Enter to let you make changes. If this virtual server is clustered you will need to change the IP address and reboot, then switch the virtual server over to the other node(s) and configure an identical set of network settings and reboot on each node. If you don’t then the server will have different IP addresses per node that it runs on.

image_thumb10

image_thumb11

Tab to change fields, use space to deselect the * under Use DHCP and then enter a valid fixed IP for your network, and valid mask and gateway settings. Tab to OK and space to action this.

Tab to select Save and then select Edit DNS Configuration. This DNS configuration will only take effect after you restart the network upon changing the IP address (or use /etc/init.d/network restart to restart the network). So after reboot run system-config-network to make these changes. Do not set the primary DNS IP as 127.0.0.1 as a DNS server is not installed on the AsteriskNOW box.

image_thumb12

Reboot your server with shutdown –r now and upon restart connect to the server’s fixed IP address with WinSCP to do some other initial configuration.

Start WinSCP and click New to create a new session. Enter the IP address (or DNS name if you have made one) for the server. Enter root and your password where needed and set the File Protocol to SCP:

image_thumb14

Click Save and then Login. Accept the prompt about the server’s key and then you will see the local file system and server’s file system:

image_thumb15

Edit the file /etc/sysconfig/keyboard so that KEYTABLE=”xx” where xx is the name of the keytable file located in /lib/kbd/keymaps/i386 not including the .map.gz bit of the filename. For example my value would be uk.

Navigate to /usr/share/zoneinfo and find the folder names that match your timezone. Mine is Europe/London.

In the AsteriskNOW server console login and type the following where Europe/London matches the folder and filenames you located.

ln -sf ../usr/share/zoneinfo/Europe/London /etc/localtime

Then enter the following to see the time on the hardware clock and change it if needed. The last command set the hardware clock to the value of the system clock:

hwclock
date mmddhhmm
/sbin/hwclock --systohc

Finally to set automatic updating of time to an NTP clock (port UDP 123 outbound is needed if going to the internet, or just enter the IP of a domain controller) you need to enter the following commands:

yum install ntp 
chkconfig ntpd on
ntpdate pool.ntp.org
/etc/init.d/ntpd start

Update CentOS to the latest updates

Get the latest updates for CentOS and Asterisk with the command yum update.

On completion of the updates reboot the server with:

shutdown –r now

After the reboot check that the DNS values have been set correctly. To avoid a reboot use:

/etc/init.d/network restart

Install the Hyper-V Integration Tools

To allow for time sync and other integration with Hyper-V download the Linux Integration Services Version 3.4 for Hyper-V from http://www.microsoft.com/en-GB/download/details.aspx?id=34603.

This download is an ISO file. Attach the ISO to the Asterisk virtual machine.

In the Linux console type the following:

mount /dev/cdrom /media
cd /media/RHEL58
./install-rhel58.sh

Allow the installation to complete and reboot with shutdown –r now.

Initial Configuration of FreePBX

Login to http://your_IP and use admin and admin as the username and password.

If the webpage looks like it is broken and the following links don’t work (it keeps logging you out) then from the server console type the following command to fix the issue.

amportal restart

Once you are logged into the FreePBX console without issue, if there is a retrieve_conf error towards the top left the run the following commands from the console

rm -rf /etc/asterisk/logger.conf
ln -s /var/www/html/admin/modules/core/etc/logger.conf /etc/asterisk/logger.conf #ln to here is one entire line
amportal reload

Click Admin menu > Administrators and select admin user on the right. Change the admin user password and click Submit Changes button. Don’t click the Apply Config button that has just appeared on the toolbar. You have other changes to make first.

Click Admin menu > Module Admin > Check Online > Click the Upgrade All link to the right and the click Process > Confirm and finally the Return link once you scroll all the way down the update popup screen.

Click the red Apply Config and after the configuration has reloaded, logout and back in again with your new password.

Change the default ARI Admin password from Advanced Settings menu. To do this click Display Readonly Settings and Override Readonly Settings to True. Click the Green save icon and then Apply Changes. Find the User Portal Admin Password field and change it. Click Save and then Apply Config. Change the two Readonly settings back to False, Save and Apply Config.

The next part of this blog series will look at further configuration of Asterisk PBX to support Exchange Server (TCP needs to be enabled amongst other settings) and to configure the firewall to allow external calls to and from the PBX.


Posted

in

, , , , , ,

by

Tags:

Comments

One response to “Building An Exchange Unified Messaging Lab (Part 2)”

  1. Greg Finlayson avatar

    Very helpful thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.