示例#1
0
        static async void server_IncomingCall(object sender, Microsoft.Rtc.Collaboration.CallReceivedEventArgs <Microsoft.Rtc.Collaboration.AudioVideo.AudioVideoCall> e)
        {
            try
            {
                e.Call.AudioVideoFlowConfigurationRequested += Call_AudioVideoFlowConfigurationRequested;
                await e.Call.AcceptAsync();

                var imCallHandler = new IMCallHandler(_speech);
                imCallHandler.Init(e.Call.Conversation).Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Incoming Call Handler:" + ex.ToString());
            }
        }
示例#2
0
        private async static void _server_IncomingConference(object sender, Microsoft.Rtc.Collaboration.ConferenceInvitationReceivedEventArgs e)
        {
            try
            {
                await e.Invitation.AcceptAsync();

                await e.Invitation.Conversation.ConferenceSession.JoinAsync(new ConferenceJoinOptions());

                Console.WriteLine("joined");

                var audioCall = new AudioVideoCall(e.Invitation.Conversation);
                audioCall.AudioVideoFlowConfigurationRequested += Call_AudioVideoFlowConfigurationRequested;
                await audioCall.EstablishAsync();


                var imCallHandler = new IMCallHandler(_speech);
                await imCallHandler.Init(e.Invitation.Conversation);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }