Sunday, April 29, 2007

Accessing Exchange 2007 Unified Messaging: Part 5 – Configure the SIP client

Now that we have configured the Exchange UM Services and the basic sipX services, we can test to see if our configuration is working. In fact, if all you need is soft phone (SIP) access to the Exchange Server, then you don't need to configure the Asterisk server. Forward the appropriate ports on your router to the sipX server instead. The next part of this guide, Configuring Asterisk, will allow us to dial into the Exchange Server from a PSTN or a SIP phone.

You can use any SIP compatible client, but for our testing, we will use X-Lite from CounterPath. X-Lite is the freeware version of CounterPath's EyeBeam soft phone. Both versions can be downloaded from http://www.counterpath.com/.

When you first start X-Lite, you are given the opportunity to setup a SIP account. Press the Add button and enter the information below.

Display Name: Your Name
User name: 300
Password: SIP Password you entered in sipX for the test extension
Authorization user name Leave Blank
Domain: sipX.lithnet.local


Click OK on the properties page, and Close on the accounts list page. The information display in the X-Lite main window will show the process of registering with the server, and if all goes well, the display should say Ready as per the image below.


Now in order to test that what we have setup so far is working, dial extension 300. This tests that we have correctly registered with sipX for incoming calls. You should see an incoming call on line 2.

In order to test the connection to the Exchange Server, dial 222, and the UM server should pick up and say "Welcome, you are connected to Microsoft Exchange". As long as you set your extension to 300 when you enabled your mailbox from UM, Exchange will detect that you are calling from 300, greet you by name, and simply prompt for your PIN. Now you can test the capabilities of Outlook Voice Access and navigate through the menus. This great guide is available for download from Microsoft and shows you all the commands available for Outlook Voice Access - http://go.microsoft.com/fwlink/?linkid=64645.

The sipX server passes the User ID of the connected user (in our case, '300') to the Exchange server by means of Caller ID. If Exchange can match the Caller ID of the incoming call to an extension specified on a UM enabled mailbox, then it will assume that user is calling, and just ask for the PIN. If it can't match the Caller ID, then it will ask you for your extension number, followed by PIN.

If you get a 404 Not Found error when trying to dial 222, go back and check that the gateway and dial plans are correctly configured in sipX. Just to be sure, activate your dial plans again. This error tells us that either the Exchange Server rejected the call because it could not find extension 222 on its system, or that sipX rejected the call because a dial plan could not be found to route the call through.

If you get a 408 Timeout error, try dialing again. This is actually a better error to get than the one above. Provided you get the message when attempting to make a call, it generally means the sipX server was able to find a dial rule through which to route the call, but the gateway did not respond in time. See the troubleshooting section for information on capturing packets using Wireshark, and have a look at where the packets are being directed to.

To confirm that we have setup the auto attendant correctly, dial 299, and the UM server should pick up and say "Welcome to the Microsoft Exchange Auto Attendant. To reach a specific person, just tell me their name". If you speak the name of someone in the directory, it will try to call them. As we have not completed our setup, it will divert to voicemail. If you leave a voicemail, it will appear in your Outlook inbox. If OVA and the AutoAttendant are working, our sipX and Exchange configuration is complete, and we can move onto configuring the Trixbox server.


19 comments:

Nuno Bexiga said...

Hi.
I need urgent help with this setting.
Our error was busy line, so we did not hear any welcome message. What could have gone wrong?? Do you have any phone number to call?? my email is nbexiga@netchage.pt

Thanks :)

Ryan said...

Hi Nuno,

Please see the troubleshooting section. I would recommend using Wireshark to watch the SIP packets and see where the problem is. I can then help you further when you have more specific information.

Ryan

Ben said...

Hi Ryan!

I´m following your step-by-step Unified Messaging Configuration. All was going just fine until step numer 5, Configure the SIP client. I can call to 300, but when I try to call to 222 to listen the Welcome from Microsoft Exchange I simply get the message: "Call Failed: Not found". What should I do? What should i check?

Thanks!

Ryan said...

Hi Ben,

Go back and double check your dial plans are setup correctly. Are you calling through the sipx server or the asterix server at this stage?

A wireshark capture of the SIP traffic is your first step in trying to find out what is going wrong. The troubleshooting section of my site shows you what packet sequence to look for.

Let me know how you go

Ryan

Benjamin said...

I'm not able to connect the Xlite to the SIPX server. I get the Registration error:401 - Unauthorized. As I look at the Debugging Log files for Xlite, I see that all the connection attempts are UDP. Is this correct? I double checked that all my DOMAIN names are listed as IP addresses. No luck. Any help would be great!

Ryan said...

Hi Ben,

Double check your extension number and password/secret in both sipx and x-lite. Also make sure you have activated your dial plans in sipX. Run a wireshark capture to see where your SIP packets are going. All the traffic going to the sipX server will be in SIP/UDP, only traffic that sipX sends to Exchange needs to be SIP/TCP.

Ryan

Benjamin said...

Thanks for your quick reply. I checked the SIP Extension and Password/Secret, and hey are all correct.

The Dial Plan is correct, and Activated in SIPX

I used Wireshark, and the packets are being sent to the correct extension and IP on the SIPX server.

In the X-Lite debugging I notice there is a WWW-Authenticate: Digest realm. This seems incorrect, and Idea where this information is stored?

I'd sent you the entire XLITE debugging log, but it is too large for this blog (even for a single connection failure).

Thanks in Advance.

Ryan said...

Hi Ben,

Send it to me via email ryan@lithiumblue.com

ryan

J.vandenHeuvel said...

Hi ryan,

any news on the last message (401 error) Because I'm having the same issue. (had it working a month ago, but had to reïnstall everything and now it's not working anymore) /XLITE is giving me also the unauthorised message as mentioned by benjamin

Ryan said...

Hi j,

Benjamin is still investigating his issue. He was using IP addresses throughout his sipx configuration, and is now trying it with hostnames/dns instead.

I am happy to look at a wireshark capture if you want to send it over.

ryan

J.vandenHeuvel said...

Found the problem,

In domain name box in sipx webbased config, I typed in only the domain name and not the fully qualified host name.

Ryan said...

Great work! glad its all working.

ryan

Anonymous said...

Hey,
Thank you for this fantastic guide.
I have followed your instructions, however, my Soft Phone is not able to connect to my SipX Server.
Ping and all other forms of Comms appear to be working correctly.

I have also run wiretap over the network, and recieved inaccessable port, however, I am not aware of any port / configurations being denied on the CentOS machine.

Could you please shed some light on where to look for this issue

Thank you.
Regards,
Anthony Moore

Ryan said...

Hi Anthony,

There was a typo in the sipx post that would have stopped the sipxregistry service from being installed.

type

yum -y install sipxproxy sipxregistry

to install the missing services.

sorry...

ryan

Matt said...

Aloha,

I have set up Exchange, sipX and X-Lite. If try to call Exchange I see all the invites via Wireshark. Exchange does not respond. This is in the Exchange event log:
Event ID - 1088
The IP gateway or IP-PBX did not respond to a PING request from the Unified Messaging server. The error code that was returned is "0" and the error text is ":This operation has timed out.".

Anyone else seen that error? sipX is running on the same box as Exchange & I can manually ping from one server to the other.

Aloha,
Matt

Anonymous said...

hi..!
Thank for the information.
I have got everthing working according to you post.
when i dial "222" the Exchange server answers "Welcome to exchange ...bala"

but the voice mail part is not working. i have a mailbox with the ext 300. the event viwer show, the diverstion hedder as null. pls advice..

Ryan Newington said...

Hi,

There might be a typo in your rules file somewhere. Double, then triple check your config files.

Ryan

Lothar said...

Hi,

thanks for this great documentation! Is there any way to let a SIP client (software) directly connect to the Exchange UM server? Or is sipx always required?

Lothar

Ryan Newington said...

Hi Lothar,

hmm... its been a while since I have done this, but from memory, pointing the SIP client to the exchange server should work. just make sure the client is not set to register with the server to recieve calls.

ryan