Calling an Exchange UM voicemail box directly
Posted: January 22nd, 2012 | Author: Michael | Filed under: Lync Development, UCMA 2.0, UCMA 3.0 | Tags: Exchange UM, voicemail | 4 Comments »A few posts ago I explained how you can determine whether a call placed by your UCMA application has been answered by an Exchange voicemail box. In this post I want to share another quick tip on UCMA and voicemail: how to place a call directly to a voicemail box.
If you use the Lync client much you’re probably aware that you can call a contact’s Exchange voicemail box directly by selecting one of the options in the “call” menu next to the person’s name. This comes in handy from time to time when you want to leave someone a message without actually calling them and waiting for the phone to ring or possibly disturbing them.
What if you want to do the same thing — call someone’s voicemail box directly — from a UCMA application? If you’ve ever looked for a built-in way to do this in UCMA, you were probably disappointed. There is no BeginCallVoicemail method, and no DirectToVoicemail flag on AudioVideoCallEstablishOptions. So how do you do it?
As it turns out, you can call an Exchange UM voicemail box directly by tacking on ;opaque=app:voicemail to the end of the corresponding Lync user’s SIP URI. So, for example, to call the voicemail box of sip:user@domain.local, you would do something like this:
Conversation conversation = new Conversation(_endpoint); AudioVideoCall avCall = new AudioVideoCall(conversation); avCall.BeginEstablish("sip:user@domain.local;opaque=app:voicemail", OnCallEstablished, null);
That’s all there is to it. Instead of ringing to the user’s various active endpoints, it will go straight to the voicemail box. You can use the same SIP URI format for other operations, like transfers.
Cool trick Michael, thanks.
Is there a way to use the same SIP URI directly in Lync client? When I try it i just calls the user, it doesn’t go straight to their voicemail.
No, entering it in the Lync client UI doesn’t work. You can call someone’s voicemail directly from the client though by going to the “call” menu next to someone’s name in the contact list and selecting “Voice Mail.”
hi I have been playing around with MSPL (still very new) scripts but haven’t had any luck so far. I am looking for a way to route pstn calls to list of users that will go directly to voice mail. Thanks for your help.