Update: 22/10/2007 - Replaced the old post with instructions for a new Centos 5 VM and sipX 3.8
Download the Centos 5 Minimal Installation VMware Appliance from the VMWare Appliance Marketplace.
Start your sipX VMWare virtual machine. Log in as root, with the password password and change the password by typing passwd at the command line. Type netconfig, and select Configure and assign a fixed manual IP address to this PC.
Now we need to set the hostname for this server. Use the nano editor to edit the network configuration file, and change HOSTNAME to sipX.lithnet.local. When done, press Ctrl-X, then Y, then enter to save the file.
In order for sipX to install, we need to disable SELinux. Edit the SELinux config file by typing nano /etc/selinux/config and change SELINUX=ENABLED to SELINUX=DISABLED.
Run the following commands in this order, and to all the Windows kids like me, remember that Linux is case sensitive, so take note of the uppercase X in the URL below (yes I stuffed it up myself and it took me about 20 minutes to work out why it was failing – silly muppet).
wget -P /etc/yum.repos.d/ http://sipxecs.sipfoundry.org/pub/sipXecs/sipxecs-stable-centos.repo
yum -y install sipxpbx sipxconfig sipxproxy sipxregistry
(If you want to use sipx as the main PBX (without using Asterisk - not recommended), then install additional modules as required as specified on the sipfoundry web site)
Now we need to fix the SSL certificates. If you have a CA on your network, you can have it generate a certificate for these purposes. Otherwise, we can just generate a self signed certificate using the following commands.
This will prompt you for several pieces of information. Enter the appropriate information, and the following values when prompted.
CA Common Name: SelfSigned
SIP domain name: lithnet.local - The domain name of your installation
Full DNS name for the server: sipx.lithnet.local - Enter fully qualified hostname of your sipX server
Type the following to install the certificate.
Now we need to configure the Exchange gateway and rules. Normally, this XML is generated automatically by the web interface as we modify the gateway and dial plan options. We have to do this manually, because the web interface doesn't provide us a way to force sipX to use TCP for a particular gateway. If we configure our dial plans through the web interface, sipX tries to contact Exchange first using UDP, which more often than not results in a timed-out call. The sipX team is working to more natively support Exchange configuration through the web interface in the future. I will keep you posted.
At the sipx command prompt, type
wget -P /etc/sipxpbx/ http://lithiumblue.com/config/external_mappingrules.xml
to download the preconfigured mappingrules file needed to force TCP communication with Exchange. Type nano /etc/sipxpbx/external_mappingrules.xml to modify the file and replace the hostname values as shown below with your own. If for some reason you cannot download the file with wget, you can type it out manually as it appears below.
<?xml version="1.0" encoding="UTF-8"?>
<!--Note this is only to handle diversions for local sipX 3xx extentions-->
The above rule ensures that calls for 2xx are sent to the Exchange server, and that sipX only communicates with it using SIP/TCP. It also enables diversion to Voicemail for calls to the sipX extensions (3xx). This is independent of the procedure to setup Trixbox/Asterisk to divert to voicemail. The sipX and Asterisk diversion configurations are completely independent of each other.
Now we need to tell sipX that it is responsible for routing calls to 2xx. Without this the calls would be rejected. At the sipx command prompt, type
wget -P /etc/sipxpbx/ http://lithiumblue.com/config/external_authrules.xml
to download the preconfigured authrules file. Type nano /etc/sipxpbx/external_authrules.xml to modify the hostname in this file.
<?xml version="1.0" encoding="UTF-8"?>
In order for sipX to use these files we created, we need to add some lines into the config file. Type nano /etc/sipxpbx/sipxconfig.properties.in, scroll through the file, and locate the following lines or add them to the end of the file.
Restart the server using the following command
After the server reboots, open your browser and navigate to the sipX server i.e. http://sipx.lithnet.local.NOTE: There is approximately a 2 minute delay between the sipX services starting and being available. If you get an error message when loading the page, wait 2 minutes and try again.
If all goes well, you should be presented with an SSL certificate warning (if you used a self signed certificate). Accept this warning, and when prompted, enter a new PIN for the superadmin account. You will use this to log into sipXconfig on the next screen.
Now we need to add a gateway to allow sipX to communicate with the Exchange Server. Click Devices on the top menu, Gateways, and select SIP Trunk from the Add New Gateway drop down list. Type the following information and press OK.
Now we need to add another SIP trunk for the Asterisk server. Type the following information and press OK.
Now we need to configure the dial plan. Dial rules are used to route incoming calls to the appropriate gateway. Click System on the top menu, followed by Dial Plans. In the Add New Rule drop down box, select Custom as our dialing rule type. Enter the following information and press OK.
Tick the Enabled box
Description: Forward calls for 4xx-5xx to the Asterisk Server
Dialed Number, prefix: 4, and select 2 digits from the drop down list. Click Add to add new lines.
Dialed Number, prefix: 5, and select 2 digits from the drop down list. Add as many extension ranges as you require for your setup.
Resulting Call, Prefix: Leave the prefix blank, and select Entire Dialed Number from the drop down list
In the More Actions drop down box, select AsteriskServer under Existing Gateways.
Press OK to save and return to the dial plans list. Move the new dial plan to the top of the list, by ticking the box next to the new plan, and pressing Move up repeatedly. Order does matter, so it is at the top. If you don't plan on using the sipX server for any other SIP traffic, you can delete the other dial plans.
Activate the new plans by clicking the Activate button, and pressing OK when prompted for confirmation. Remember that whenever you make any changes to your dial plan, or modify your mapping and auth rule XML files, you must reactivate your dial plan for the change to take effect.
Add an Extension
We will now add an extension for testing purposes. This will help in your troubleshooting efforts should something not work. Click on Users on the top menu, click the Users menu item, and click Add User. Click Show Advanced Settings at the top of the page. Change the user ID to 300, assign a first name, last name, PIN, and SIP password to the account. Take note of the SIP password or change it to something you are going to remember. Press OK when you are done.
Configure the Fully Qualified Domain Name
Click the System menu and the Domain menu item, and enter the fully qualified domain name that the sipX server will use. When prompted, ensure you activate the new dial plans for our configuration changes to take effect.
Please note that the FQDN must be the same as the value you configured as the UM IP Gateway address on the Exchange UM Server.
We have now completed the configuration of the sipX server.