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>