Saturday, May 12, 2007

Diverting calls for sipX extensions to Exchange 2007 Unified Messaging voicemail

The guys on the sipX-users mailing list have once again been very helpful in working out how to use Exchange UM's voicemail services rather than the sipX internal system. There is currently a known issue where calls originating external to sipX get diverted, but are missing some important information required to allow Exchange to identify a diverted call. This is being worked on, and I'll provide an update as soon as I have more information. In the mean time, internal calls and diversions work fine. Instructions on how to get Exchange UM voicemail going with Asterisk and Trixbox are available here.

You will want to follow my previous documentation, regarding creating the external_mappingrules.xml file, and modify it to include the following information.

<userMatch>
<!--ExchangeVoicemailRule-->
<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.1</fieldparams>
</transform>
</permissionMatch>
</userMatch>


This will divert all calls to 3xx to our subscriber access number (222). If successful Exchange will answer with a prompt to leave a message for the user of the extension you called.

Obviously, this will only work if you are using sipX as your primary PBX that hosts your internal extensions. If you are using Asterisk as the primary, you will need to wait for my Asterisk instructions.

Below is my entire external_mappingrules.xml file, including the Exchange dial rules.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>
<!--ExchangeVoicemailRule-->
<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.1</fieldparams>
</transform>
</permissionMatch>
</userMatch>
<userMatch>
<!--ExchangeDialRule-->
<userPattern>2xx</userPattern>
<permissionMatch>
<transform>
<host>dc1
.lithnet.local</host>
<urlparams>transport=tcp</urlparams>
<fieldparams>q=0.9</fieldparams>
</transform>
</permissionMatch>
</userMatch>
</hostMatch>
</mappings>


4 comments:

Anonymous said...

Ryan,

Great work! I'm patiently waiting to see your solution for Asterisk working with Exchange Voicemail. I'm sure work has you very busy.

While searching for solutions I can across this page at Microsoft's TechNet Forums.

It seems as if one of the users has figured out a way to properly inject the necessary information for Exchange to grab the call. I haven't tried it yet so I can't confirm it works.

Also, what issue are you referring to when calls external to sipX aren't being identified properly?

Thanks

Anonymous said...

Hi,
in the modified external_mappingrules.xml file I see the settings for
'ExchangeDialRule'
now, do I still need the external_authrules.xml file and the corresponding modifications in sipconfig.properties.in
I don't think so, but please correct me...
greetingz, Kees-Jan

Ryan said...

Hi Kees-Jan,

The information posted here was provided by members of the sipX development team and community enthusiasts. I assume you need to include the external_authrules.xml file, and you definitely need the modifications in sipconfig.properties.in, otherwise external_mappingrules.xml file will not be loaded at all.

Ryan

Ryan said...

Hi,

The issue I am referring to is when a call that originates external to sipX (ie a call from an asterix extension) gets diverted to the exchange server for voicemail, the "Diversion Header" is missing from the SIP packet. Exchange then treats the call as a normal incoming call, and does not prompt to leave a voicemail.

I apologise for the delays in getting the Asterix instructions up, but due to some family issues, I have not had the time to continue my research. The information you came across on the TechNet forum is correct, I just need to determine where in the trixbox configuration that information needs to be placed. The preconfigured trixbox files are a little different to the example provided. If anyone has any info on this, drop me a line, and ill post it for all to see.

Ryan