Bridge Communications

Saturday, July 1, 2017

Skype Web SDK - Part XIII

What is the Skype Web SDK?

The Skype Developer Platform for Web ("Skype Web SDK") is a set of JavaScript Web APIs and HTML controls that enable you to build web experiences that seamlessly integrate a wide variety of real-time collaboration models leveraging Skype for Business services and the larger Skype network. It provides support for multiple core collaboration services like presence, chat, audio, and video, enabling web experiences across a broad spectrum of users, platforms, and devices.



Today's Topic : Call Transfer

Transferring a call is a vitally important function for some users.  Today we'll look at a simple example of how to transfer a call using the Skype Web SDK.

Remember that each of our conversations, whether they be IM, audio, or video are stored in a conversation object.  Before attempting to transfer a call it's important to know whether the conversation has either the audio or video modality active, because if it doesn't it is not something you can transfer.


Let's first review how we would accept an incoming audio call.

application.conversationsManager.conversations.added(function (conversation) { // ... });

conversation.audioService.accept.enabled.when(true, function () { // .... })

if (confirm('Accept incoming Audio invitation?')) { conversation.audioService.accept(); } else { conversation.audioService.reject(); }


Once we have our call accepted and there is audio doing a call transfer requires only the destination we intent to sent the call to.  This can be another internal user with a sip uri, or a pstn endpoint with a tel uri.

conv.audioService.transfer("sip:johndoe@contoso.com").then(() => { console.log("done"); });


conv.audioService.transfer("tel:+12223334444");


Be sure when transferring a call you setup a handler on the promise to catch whether the call transfer was successful, so you don't give the user the false impression that the call transferred when in fact it failed for some reason.

On a side not, the call is not put on hold by the invoking of the transfer call, so I would suggest you handle that yourself prior to attempting the transfer.


Doug Routledge, C# Lync, Skype for Business, SQL, Exchange, UC, 
Full Stack Developer  BridgeOC Bridge Operator Console
Twitter - @droutledge @ndbridge

















No comments:

Post a Comment

Any spam comments will be deleted and your user account will be disabled.