STOP! This page has been replaced by a new version based on sipX 3.8 and Centos 5. This page will no longer be updated, and is kept for reference only. Please see the replacement page for updated instructions.
Start your sipX VMWare virtual machine. During start up, the OS will detect that a network card has been removed. Select Remove Config to remove this card. You will then be prompted with a message that a new network card has been detected. Select Configure and assign a fixed manual IP address to this PC.
Log in as root, with the password voipjots and change the root password by typing passwd at the command line. Remember this password, as you will not be able to log into the server without it. First thing we need to do is install operating system updates, then we will download the updated sipX repositories, and upgrade sipX to the latest version (I had lots of issues getting version 3.0 – the installation in the VM – to work, but 3.6 (the latest stable release at the time I wrote this works much better). 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).
yum –y update wget -P /etc/yum.repos.d/ http://sipxecs.sipfoundry.org/pub/sipXecs/sipxecs-stable-centos.repo yum –y update sipxpbx
This may take some time depending on how many updates are needed. There seems to be a lot of packages installed, that I'm sure could be removed. However, being an MCSE who spends very little time using Linux, I have no idea what's what. If someone who knows what they are talking about wants to suggest the packages that can be removed, I'll include them in this documentation.
Once the packages have been updated, 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.
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.
cd $HOME/sslkeys rm –f * /usr/bin/ssl-cert/gen-ssl-keys.sh
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/ https://lithnet.io/s/external_mappingrules.xml
to download the preconfigured mappingrules file needed to force TCP communication with Exchange. Type
to modify the file and replace the hostname values with your own. If for some reason you cannot download the file with wget, you can type it out manually as it appears below.
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 independant of the procedure to setup Trixbox/Asterisk to divert to voicemail. The sipX and Asterisk diversion configurations are completely independant 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/ https://lithnet.io/s/external_authrules.xml
to download the preconfigured authrules file. Type
to modify the hostname in this file.
In order for sipX to use these files we created, we need to add some lines into the config file. Type
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. If all goes well, you should be presented with the screen below
Click Configuration, and accept the SSL certificate warning.
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.
Login with the username superadmin, no password is required. First things first, let's set the superadmin password. Click on Users on the top menu, the Users submenu, then on superadmin. Change the value for PIN to something secure. We won't be using the superadmin account to connect to the sipX server over the phone, so it's ok to use an alphanumeric password. Press OK when you are done.
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 Unmanaged Gateway from the Add New Gateway drop down list. Type the following information and press OK.
Serial Number: Leave Blank – not used for unmanaged gateways
If you want to make calls out of Exchange then we need to add another unmanaged gateway back to the Asterisk server. Type the following information and press OK.
Serial Number: Leave Blank – not used for unmanaged gateways
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-8xx 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
Dialed Number, prefix: 6, and select 2 digits from the drop down list
Dialed Number, prefix: 7, and select 2 digits from the drop down list
Dialed Number, prefix: 8, and select 2 digits from the drop down list
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.
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 for the gateway on the Exchange Server. When Exchange sends a request to the gateway, it appends the given hostname or IP address to form a SIP address. I'll use the example of the Exchange Server making an outbound call to extension 400. If you have the sipX server's IP of 192.168.0.50 configured in the Exchange Server as the gateway address, then Exchange will address the SIP packets to
If you have the hostname configured, it will address the SIP packets to
If sipX is configured with the domain name sipX.lithnet.local, but the packet is addressed to firstname.lastname@example.org, sipX will NOT recognize that it should process the packet. Your Exchange Server's event log will contain "483 Too Many Hops" error events logged by the Unified Messaging Service, and calls to the Exchange Server will fail.
This took me DAYS to work out what was going on here, so please, save your sanity by going back now and double-checking this.
We have now completed the configuration of the sipX server.