Call Preannouncement for Lync and Skype for Business

One of my customers wants to have direct incoming calls to some individual users’ numbers to have an announcement played to warn the caller that the call may be recorded.

Before I go any further, I’ll make it quite clear that I have not deployed this to their environment, nor have I told them that it’s technically possible. It’s much much simpler to convince the customer to require all inbound calls to filter through an IVR before being routed to a response group or contact centre application where the agents receive the calls.

But the question was raised and I was curious if I could make it work. I do love a good thought experiment.

These steps should be repeated for each individual number which needs this. In this example, let’s say the user’s LineURI is +61399991234. I’ll also be using +61355501234, which is within a fictitious range in south-east Australia.

Step 1: Make an announcement and point it at the user’s number.

New-CsAnnouncement -Identity ApplicationServer:fepool.customer.local `
-Name "Pre0399991234" `
-AudioFilePrompt "WelcomeMessage.wav" `
-TargetUri ";user=phone"

Step 2: Translate the user’s number when it enters from network

Option a: Translate just the one number

New-CsVoiceNormalizationRule -Parent Global `
-name 'Pre0399991234' `
-pattern '^0399991234$' `
-Translation '+61355501234' `
-Priority 0

Option b: Translate an entire number range, in this case 100

New-CsVoiceNormalizationRule -Parent Global `
-name 'Pre03999912xx' `
-pattern '^03999912(\d{2})$' `
-Translation '+613555012$1' `
-Priority 0

Step 3: Make an unassigned number range to tie the two together

New-CsUnassignedNumber -Identity 'Pre0399991234' `
-NumberRangeStart "+61355501234" `
-NumberRangeEnd "+61355501234" `
-AnnouncementService 'ApplicationServer:fepool.customer.local' `
-AnnouncementName "Pre0399991234"

On an incoming call, the number will be modified by the normalization rule, and the reverse number lookup will spot that it’s an unassigned number. It’ll play the announcement for that particular number, which will then change the target back to the user’s actual line URI.

Important notes

I’ve added the incoming number normalization rule to the Global dial plan – for my sites I tend to use User dial plans for the users, and leave the incoming normalization rules in the Global dial plan. If your environment uses Pool or Site dial plans, things will be slightly different due to the sequence the dial plans are checked on an incoming call.

When adding the normalization rules, I’ve set the priority as zero so that they’re added above all other entries. This means that further down the list I can have one which translates 03999912xx to +613999912xx for any users who don’t have this announcement system enabled.

While the normalization rule can encompass an entire range, I can’t see any way to compress the announcements or unassigned number ranges, as they must have a one-to-one mapping with the user’s real and fictitious numbers. This could be painful to set up, and even more painful to administer, so bear this in mind before agreeing to this admittedly out-of-the-norm solution.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s