Initial Configuration

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 Configureand 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.

nano /etc/sysconfig/network

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).

(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.

/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: SelfSignedSIP domain name: lithnet.local - The domain name of your installationFull DNS name for the server: sipx.lithnet.local - Enter fully qualified hostname of your sipX serverType the following to install the certificate.

/usr/bin/ssl-cert/install-cert.sh sipx.lithnet.local

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.

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"?><mappings xmlns="http://www.sipfoundry.org/sipX/schema/xml/urlmap-00-00"><hostMatch><hostPattern>${SIPXCHANGE_DOMAIN_NAME}</hostPattern><hostPattern>${MY_FULL_HOSTNAME}</hostPattern><hostPattern>${MY_HOSTNAME}</hostPattern><hostPattern>${MY_IP_ADDR}</hostPattern><userMatch><!--ExchangeDialRule--><userPattern>2xx</userPattern><permissionMatch><transform><host>dc1.lithnet.local</host><urlparams>transport=tcp</urlparams><fieldparams>q=0.9</fieldparams></transform></permissionMatch></userMatch><userMatch><!--ExchangeVoicemailRule--><!--Note this is only to handle diversions for local sipX 3xx extentions--><userPattern>3xx</userPattern><permissionMatch><permission>Voicemail</permission><transform><user>222</user><host>dc1.lithnet.local</host><urlparams>transport=tcp</urlparams><headerparams>Diversion=&lt;tel:{digits}&gt;;reason=no-answer;screen=no;privacy=off</headerparams><fieldparams>q=0.9</fieldparams></transform></permissionMatch></userMatch></hostMatch></mappings>

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

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.mappingRules.externalRulesFileName=/etc/sipxpbx/external_mappingrules.xml authRules.externalRulesFileName=/etc/sipxpbx/external_authrules.xmlRestart the server using the following command

reboot

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.

Gateway Configuration

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 Trunkfrom the Add New Gateway drop down list. Type the following information and press OK.

Name: ExchangeUMServer Address: dc1.lithnet.local

Now we need to add another SIP trunk for the Asterisk server. Type the following information and press OK.

Name: AsteriskServerAddress: asterisk.lithnet.local

Dial Plans

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 boxName: AsteriskDialRuleDescription: Forward calls for 4xx-5xx to the Asterisk ServerDialed 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 listIn the More Actionsdrop 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.

Can you help me with my problem, i installed the sipx server on centos5 and the latest sipx. on reboot no errors, but when i enter in the browser sipx.domain.local i get the ssl warning but the i get the 404 error.

I had the same exact problem you had, and determined the issue to be that I had a typo in my sipxconfig.properties.in file (from where I added the mappingRules.externalRulesFileName). Once I correct that typo and reboot, all was well

I have been reading through your step by step articles. Great work! Thanks! Out of curiousity... for a standalone SipX server used for SIP-UDP to SIP-TCP conversion between asterisk and Microsoft Unified Messaging, what am I looking at as far as hardware as requirements? I was looking at making a standardized reliable box for Unified Messaging / Asterisk deployments.

Very little as far as hardware requirements go. I have it running in a VM with 256MB RAM running along side 4 other VMs that do a lot more work, and it runs perfectly. As it is only used as a SIP translation service, it is basically forwarding packets. There is very little processing work done as it does not get involved with the audio stream at all.

Hey This is nice. Thank you for the time spent in doing this doc. Gr8 work.Does anyone have a VMware image with SIPx installed. I tried this many times, but it does not install properly and lot of services failed in start.I can give remote access to any one if they can install it on my vm mechine, then we can host a copy for everyone to download.

How can we configure TLS, i mean to say that where all in the sipx server we need to do configuration to enable TLS. Actually i wanted to make a call between two TLS enabled phones, but it's not working.

see my post on troubleshooting (http://blog.lithiumblue.com/2007/04/accessing-exchange-2007-unified_8286.html). I recommend taking a packet capture and see what is going on. If codec negotiation was failing, the call would not connect, so that should not be the problem in this case.

Isn't it possible to leave the Asterisk out completely, and use sipXpbx/sipXecs as the PBX instead? Has anyone done this? As far as I understand, sipX will do about everything Asterisk will on the PBX functionality front. I'm looking for resources on how to accomplish this.

Hi Ryan,I have very wierd problem, I am following your steps but I dont have the "sipxconfig.properties.in" file in my environment. Did I missed something? Plus what will happend if we dont install the SSL.

If you followed the steps of the guide, then you have already configured sipX to use Exchange for voicemail. This is done through the external_mappingrules.xml file. Just skip over the Asterisk parts of the guide.

You can use sipX on its own, but there is a lot that Asterisk can do that sipx cannot. Remember that Asterisk is a back-to-back user agent (B2BUA), while sipx is a SIP proxy.

Hi Ryan, I think I got a very minor trouble but I don't have any other idea ! Each time my call get through my SipX server, it stuck there. When I catch packet from my network, the reponse for the SIP first packet is "100 trying" ... Indefinitely. And what is weird, is that I receive a reponse from my exchange server, after I hang up the phone ... But SipX never send a packet to my Exchange server ...

I just ran across your site, & I think it is wonderful. Exactly, what us Exchange Guys need to help us understand how UM works, on a shoe string budget.

Anyway, my question is this.....As of this post, the ISO's that are available are v3.10.1, v3.10.0. I'm assuming these will work as well. But these are "turnkey" systems, "An Appliance" if you will. All the network config is done during install.

Can I use the ISO's (v3.10.1) and apply your instructions with out having to mess with the Command-Line?