Pages Menu
TwitterRssFacebook

Posted by on Jun 1, 2015 in Learn Skype Web SDK

Learn Skype Web SDK Day 23 : Mute, Hold and DTMF Tones

Learn Skype Web SDK Day 23 : Mute, Hold and DTMF Tones

[contemplate-1]
View Demo
So, last time we looked at how to receive incoming audio calls, meaning you can make and receive audio calls using Skype Web SDK in your browser. Whilst that pretty much is the definition of nirvana, there is in fact even more you can do with audio.

Looking to the standard Skype for Business client for a moment, you’ll notice some features that you probably use every day without even thinking about it. Muting your microphone, for example. Or putting the call on hold. Or sending DTMF tones to navigate through IVR systems.

The great news is that the Skype Web SDK supports all three of these scenarios, and that’s the focus of today’s lesson. Why three new features in one lesson? Because they’re super-easy to pick up!

DTMF (Dual-Tone Multi Frequency) is the noise you hear when you press a keypad on a phone whilst in a call, and is used to navigate IVR systems, vote in phone surveys, and even by Skype for Business when dialling in to join a meeting. According to Wikipedia, DTMF is “an in-band telecommunication signaling system using the voice-frequency band over telephone lines between telephone equipment and other communications devices and switching centers. DTMF was first developed in the Bell System in the United States, and became known under the trademark Touch-Tone for use in push-button telephones supplied to telephone customers, starting in 1963.” So, now you know.

Muting

To provide a mute button for your users so they can sound off about their customers in private, simply set the isMuted property of the selfParticipant‘s audio object:

[code language=”javascript”]
conversation.selfParticipant.audio.isMuted.set(!conversation.selfParticipant.audio.isMuted());
[/code]

On Hold

For longer breaks, or to make another call, you can place the current call on hold by setting the onHold property of the selfParticipant‘s audio:

[code language=”javascript”]
conversation.selfParticipant.audio.isOnHold.set(!conversation.selfParticipant.audio.isOnHold());
[/code]

DTMF

To send DTMF tones, there’s a special method, sendDTMF, which takes the number you want to send:

[code language=”javascript”]
conversation.audioService.sendDtmf(“1″);
[/code]

[code language=”javascript”]








[/code]

Demo Online

You can try this code out against your own Skype for Business environment by going to the demo page. From here you can also download the code from GitHub if you want to host it locally, or take it and use it in your next project.
[contemplate-2]

Post a Reply

Your email address will not be published. Required fields are marked *