ToneController.ToneReceived Event

Raised when a ToneController receives a tone.

Namespace:  Microsoft.Rtc.Collaboration.AudioVideo
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Event ToneReceived As EventHandler(Of ToneControllerEventArgs)
'Usage
Dim instance As ToneController
Dim handler As EventHandler(Of ToneControllerEventArgs)

AddHandler instance.ToneReceived, handler
public event EventHandler<ToneControllerEventArgs> ToneReceived

Remarks

Tones will be received only when all three of the following conditions are true: An active AudioVideoFlow is attached.AudioVideoFlow.ToneEnabled is equal to true.AudioVideoFlow.HoldType is None or RemoteEndpointAllowTones.

Examples

The following example shows how to subscribe to the ToneReceived event.

C# Subscribing to ToneReceived event.

 

            toneController.ToneReceived += delegate(object sender, ToneControllerEventArgs args)
            {
                ToneId tone = (ToneId)args.Tone;
                float volume = args.Volume;

                // Do whatever it needs.
            };


See Also

Reference

ToneController Class

ToneController Members

Microsoft.Rtc.Collaboration.AudioVideo Namespace