We're in the early stages of installing CUCM to replace Avaya (over time). We've been using 5 digit extensions in Avaya and Microsoft Exchange 2010 Unified Messaging (5 digit dial plans in UM). If I send a call from a 5 digit CUCM ext to MS UM, the call is answered correctly in UM and my greeting plays. However, if I send a call to MS UM that was diverted from an E164 ext number in CUCM, it always shows the call is for that E164 number (format being +12223334444, just as an example) in MS UM rather than a 5 digit number MS UM wants to see and I can't figure out how or IF I can change that so it ONLY sends the 5 digit number as the called party. There's no way to change what number shows up in the diversion info on the route parttern that goes to MS UM, from what I can tell. Sure, you can change the calling party info (caller-id of who's calling) and the called party info (chane the originally called MS UM pilot number to something else), but I see no way to alter the info in the diversion header that gets sent to MS UM and that's what tells MS UM what mailbox the message is for. Here's an example of what MS UM complains about when this type of call arrives. In this example, I had forwarded my test phone to the MS UM pilot number so my calls would go to voice mail.
IP addresses and phone numbers changed to protect the innocent ;-) ....
The Unified Messaging server rejected an incoming call with the ID "firstname.lastname@example.org". Reason: "The Unified Messaging server has received an incoming call with a diversion header with format ""JON - TEST PHONE"<sip:+email@example.com>;privacy=off;reason=unconditional;screen=yes" that is not valid."
Again, MS UM works perfectly fine as long as I use 5 digit ext numbers in CUCM, but if I use E164 numbers, I can't figure out how to make sure ONLY the last 5 digits is presented to MS UM from CUCM as the diversion info for whatever ext we're sending to UM.
Let me know if you need more of an explanation about the exact scenario and config.
This is the Microsoft document we used to configure the CUCM SIP trunk link to MS UM. This is a SIP trunk directly between MS UM and CUCM. No other gateway or mediation device in between.
I altered one of the applyNumberMask examples I found in the Cisco docs and used that to create a new SIP Normalization Script and then applied that to the SIP trunk that goes to MS Unified Messaging. Now, any call that is sent from CUCM to MS UM that is sent there because of 'Diversion' is modified to strip out or only allow 5 digits, which is what we use for the mailbox ID in MS UM. For example, if +15552223333 is sent to MS UM because of diversion, the +155522 is stripped off and only 23333 remains, which is what I want.