Cookie CSS

Saturday, June 3, 2017

Skype Web SDK - Part VIIII


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 : Escalating a call.

First it's important to know what escalating a call means.  It sounds complicated, but it's simply the process of turning a 2 party call into a conference call.  The good news is Skype for Business does it on it's own, and you can easily see it by adding a 3rd person to any 2 person call.  The call switches to a conference call all on it's own.  The same is true when using UCWA, since it is all handled by the server.

So let's look at a code sample.


var conversation = application.conversationsManager.getConversation('sip:xxx'); conversation.selfParticipant.audio.state.when('Connected', function () { console.log('Connected to audio call'); }); conversation.state.changed(function (newValue, reason, oldValue) { console.log('Conversation state changed from', oldValue, 'to', newValue); if (newValue === 'Connected') { // once the P2P conversation was established, we can add another participant // to escalate to a group call conversation.participants.add('sip:yyy').then(function() { // participant added }, function (error) { // error }); } }); conversation.participants.added(function (participant) { console.log('Participant:', participant.displayName(), 'has been added to the conversation'); }); conversation.audioService.start().then(function() { console.log('The call has been started successfully'); }, function (error) { console.log('An error occured starting the call', error); });


First we make any 2 party call to either a sip uri or a telephone number.

From there all we need to do is add another participant with the participant.add() function.

That's it, again when you want to leave this escalated conversation you do it the same way you would a normal 2 party conversation.


conversation.leave().then(function () { // conversation ended }, function (error) { // handle error }).then(function () { // clean up operations });


Next week we'll look at how to start a group conversation.

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.