none
Send IM :to list of users

    Общие обсуждения

  • using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Configuration;
    using System.Security.Principal;
    using System.Security.Cryptography.X509Certificates;
    using System.Net;
    using System.Threading;
    using System.Diagnostics;
    using Microsoft.Rtc.Collaboration;
    using Microsoft.Rtc.Signaling;
    using System.Runtime.InteropServices;
    //using Microsoft.Rtc.Collaboration.Sample.Common;
    namespace UserPresence
    {
        class UCMASampleInstantMessagingCall
        {
            #region Locals
            // The information for the conversation and the far end participant.        
            // Subject of the conversation; will appear in the center of the title bar of the 
            // conversation window if Microsoft Lync is the far end client.
            private static String _conversationSubject = "The Microsoft Lync Server!";
            // Priority of the conversation will appear in the left corner of the title bar of the
            // conversation window if Microsoft Lync is the far end client.
            private static String _conversationPriority = ConversationPriority.Urgent;
            // The Instant Message that will be sent to the far end.
            private static String _messageToSend = "Hello World! I am a bot, and will echo whatever you type. " +
                "Please send 'bye' to end this application.";
            private InstantMessagingCall _instantMessaging;
            private InstantMessagingFlow _instantMessagingFlow;
            //private ApplicationEndpoint _applicationEndpoint;
            private UserEndpoint _userendpoint;
            private UCMASampleHelper _helper;
            // Event to notify application main thread on completion of the sample.
            private AutoResetEvent _sampleCompletedEvent = new AutoResetEvent(false);
            #endregion
            #region Methods
            /// <summary>
            /// Instantiate and run the InstantMessagingCall quickstart.
            /// </summary>
            /// <param name="args">unused</param>
            //private string _helper;
            //UCMASampleHelper _helper = new UCMASampleHelper();
            public static void Main(string[] args)
            {
                
                UCMASampleInstantMessagingCall ucmaSampleInstantMessagingCall =
                                                                            new UCMASampleInstantMessagingCall();
                ucmaSampleInstantMessagingCall.Run();
            }
            private void Run()
            {
                // Initialize and startup the platform.
                Exception ex = null;
                try
                {
                    // Create the UserEndpoint
                    _helper = new UCMASampleHelper();
                    _userendpoint = _helper.CreateEstablishedUserEndpoint();
                    Console.Write("The User Endpoint owned by URI: ");
                    Console.Write(_userendpoint.OwnerUri);
                    Console.WriteLine(" is now established and registered.");
                    List<string> _Users = new List<string>();
                    _Users.Add("sip:demouser@lync.abc.com");
                    _Users.Add("sip:demouser1@lync.abc.com");
                    foreach (string useruri in _Users)
                    {
                    // Setup the conversation and place the call.
                    ConversationSettings convSettings = new ConversationSettings();
                    convSettings.Priority = _conversationPriority;
                    convSettings.Subject = _conversationSubject;
                    // Conversation represents a collection of modes of communication
                    // (media types)in the context of a dialog with one or multiple 
                    // callees.
                    //Convers conver =new ConversationParticipant
                    Conversation conversation = new Conversation(_userendpoint, convSettings);
                    InstantMessagingCall _instantMessaging = new InstantMessagingCall(conversation);
                    // Call: StateChanged: Only hooked up for logging. Generally, 
                    // this can be used to surface changes in Call state to the UI
                    _instantMessaging.StateChanged += this.InstantMessagingCall_StateChanged;
                    // Subscribe for the flow created event; the flow will be used to
                    // send the media (here, IM).
                    // Ultimately, as a part of the callback, the messages will be 
                    // sent/received.
                    _instantMessaging.InstantMessagingFlowConfigurationRequested +=
                        this.InstantMessagingCall_FlowConfigurationRequested;
                    // Get the sip address of the far end user to communicate with.
                    
                    //String _calledParty = "sip:" +
                    //    UCMASampleHelper.PromptUser(
                    //    "Enter the URI of the user logged onto Microsoft Lync, in the User@Host format => ",
                    //    "RemoteUserURI");
                    // Place the call to the remote party, without specifying any 
                    // custom options. Please note that the conversation subject 
                    // overrides the toast message, so if you want to see the toast 
                    // message, please set the conversation subject to null.
                   
                        // _instantMessaging.Conversation()
                        _instantMessaging.BeginEstablish(useruri, new ToastMessage("Hello Toast"), null,
                            CallEstablishCompleted, _instantMessaging);
                    }
                }
                catch (InvalidOperationException iOpEx)
                {
                    // Invalid Operation Exception may be thrown if the data provided
                    // to the BeginXXX methods was invalid/malformed.
                    // TODO (Left to the reader): Write actual handling code here.
                    ex = iOpEx;
                }
                finally
                {
                    if (ex != null)
                    {
                        // If the action threw an exception, terminate the sample, 
                        // and print the exception to the console.
                        // TODO (Left to the reader): Write actual handling code here.
                        Console.WriteLine(ex.ToString());
                        Console.WriteLine("Shutting down platform due to error");
                        _helper.ShutdownPlatform();
                    }
                }
                // Wait for sample to complete
                _sampleCompletedEvent.WaitOne();
            }
            // Just to record the state transitions in the console.
            void InstantMessagingCall_StateChanged(object sender, CallStateChangedEventArgs e)
             {
                Console.WriteLine("Call has changed state. The previous call state was: " + e.PreviousState +
                    "and the current state is: " + e.State);
            }
            // Flow created indicates that there is a flow present to begin media 
            // operations with, and that it is no longer null.
            public void InstantMessagingCall_FlowConfigurationRequested(object sender,
                InstantMessagingFlowConfigurationRequestedEventArgs e)
            {
                Console.WriteLine("Flow Created.");
                _instantMessagingFlow = e.Flow;
                // Now that the flow is non-null, bind the event handlers for State 
                // Changed and Message Received. When the flow goes active, 
                // (as indicated by the state changed event) the program will send 
                // the IM in the event handler.
                _instantMessagingFlow.StateChanged += this.InstantMessagingFlow_StateChanged;
                // Message Received is the event used to indicate that a message has
                // been received from the far end.
                _instantMessagingFlow.MessageReceived += this.InstantMessagingFlow_MessageReceived;
                // Also, here is a good place to bind to the 
                // InstantMessagingFlow.RemoteComposingStateChanged event to receive
                // typing notifications of the far end user.
                _instantMessagingFlow.RemoteComposingStateChanged +=
                                                        this.InstantMessagingFlow_RemoteComposingStateChanged;
            }
            private void InstantMessagingFlow_StateChanged(object sender, MediaFlowStateChangedEventArgs e)
            {
                Console.WriteLine("Flow state changed from " + e.PreviousState + " to " + e.State);
                // When flow is active, media operations (here, sending an IM) 
                // may begin.
                if (e.State == MediaFlowState.Active)
                {
                    // Send the message on the InstantMessagingFlow.
                    _instantMessagingFlow.BeginSendInstantMessage(_messageToSend, SendMessageCompleted,
                        _instantMessagingFlow);
                }
            }
            private void InstantMessagingFlow_RemoteComposingStateChanged(object sender,
                                                                            ComposingStateChangedEventArgs e)
            {
                // Prints the typing notifications of the far end user.
                Console.WriteLine("Participant "
                                    + e.Participant.Uri.ToString()
                                    + " is "
                                    + e.ComposingState.ToString()
                                    );
            }
            private void InstantMessagingFlow_MessageReceived(object sender, InstantMessageReceivedEventArgs e)
            {
                // On an incoming Instant Message, print the contents to the console.
                Console.WriteLine(e.Sender.Uri + " said: " + e.TextBody);
                // Shutdown if the far end tells us to.
                if (e.TextBody.Equals("bye", StringComparison.OrdinalIgnoreCase))
                {
                    // Shutting down the platform will terminate all attached objects.
                    // If this was a production application, it would tear down the 
                    // Call/Conversation, rather than terminating the entire platform.
                    _instantMessagingFlow.BeginSendInstantMessage("Shutting Down...", SendMessageCompleted,
                        _instantMessagingFlow);
                    _helper.ShutdownPlatform();
                    _sampleCompletedEvent.Set();
                }
                else
                {
                    // Echo the instant message back to the far end (the sender of 
                    // the instant message).
                    // Change the composing state of the local end user while sending messages to the far end.
                    // A delay is introduced purposely to demonstrate the typing notification displayed by the 
                    // far end client; otherwise the notification will not last long enough to notice.
                    _instantMessagingFlow.LocalComposingState = ComposingState.Composing;
                    Thread.Sleep(2000);
                    //Echo the message with an "Echo" prefix.
                    _instantMessagingFlow.BeginSendInstantMessage("Echo: " + e.TextBody, SendMessageCompleted,
                        _instantMessagingFlow);
                }
            }
            private void CallEstablishCompleted(IAsyncResult result)
            {
                InstantMessagingCall instantMessagingCall = result.AsyncState as InstantMessagingCall;
                Exception ex = null;
                try
                {
                    instantMessagingCall.EndEstablish(result);
                    Console.WriteLine("The call is now in the established state.");
                }
                catch (OperationFailureException opFailEx)
                {
                    // OperationFailureException: Indicates failure to connect the 
                    // call to the remote party.
                    // TODO (Left to the reader): Write real error handling code.
                    ex = opFailEx;
                }
                catch (RealTimeException rte)
                {
                    // Other errors may cause other RealTimeExceptions to be thrown.
                    // TODO (Left to the reader): Write real error handling code.
                    ex = rte;
                }
                finally
                {
                    if (ex != null)
                    {
                        // If the action threw an exception, terminate the sample, 
                        // and print the exception to the console.
                        // TODO (Left to the reader): Write real error handling code.
                        Console.WriteLine(ex.ToString());
                        Console.WriteLine("Shutting down platform due to error");
                        _helper.ShutdownPlatform();
                    }
                }
            }
            private void SendMessageCompleted(IAsyncResult result)
            {
                InstantMessagingFlow instantMessagingFlow = result.AsyncState as InstantMessagingFlow;
                Exception ex = null;
                try
                {
                    instantMessagingFlow.EndSendInstantMessage(result);
                    Console.WriteLine("The message has been sent.");
                }
                catch (OperationTimeoutException opTimeEx)
                {
                    // OperationFailureException: Indicates failure to connect the 
                    // IM to the remote party due to timeout (called party failed to
                    // respond within the expected time).
                    // TODO (Left to the reader): Write real error handling code.
                    ex = opTimeEx;
                }
                catch (RealTimeException rte)
                {
                    // Other errors may cause other RealTimeExceptions to be thrown.
                    // TODO (Left to the reader): Write real error handling code.
                    ex = rte;
                }
                finally
                {
                    // Reset the composing state of the local end user so that the typing notifcation as seen 
                    // by the far end client disappears.
                    _instantMessagingFlow.LocalComposingState = ComposingState.Idle;
                    if (ex != null)
                    {
                        // If the action threw an exception, terminate the sample, 
                        // and print the exception to the console.
                        // TODO (Left to the reader): Write real error handling code.
                        Console.WriteLine(ex.ToString());
                        Console.WriteLine("Shutting down platform due to error");
                        _helper.ShutdownPlatform();
                    }
                }
            }
            #endregion
        }
    }
    Above is the code to send IM to list of users . 
    But my userendpoint "lyncuser@lycn.abc.com" is able to ping users added in the list (demouser@lync.abc.com, demouser1@lync.abc.com)
    But message is sent to demouer1 only twice .
    So may be there is problem in my fro loop . I tried different combinations , but result is same 
    18 августа 2011 г. 11:42

Все ответы

  • What happens if you create two separate calls, one after the other, instead of using the foreach loop? You could try that to confirm that you can get an IM to each user independently.

    Also, you seem to have _instantMessaging declared as both a local variable and an instance variable.


    Michael Greenlee | linkedin: http://www.linkedin.com/in/michaelgreenlee | blog: http://blog.greenl.ee
    18 августа 2011 г. 12:46
  • Hi michael,

    I am using sample code available in ucma sdk,so the methods are from that code, i have modified it for my application

    The list of users will increase , so i was passing the list of user in for each loop. because i am going to integrate it with sharepoint

    If i dnt use for each loop do i need to write same code again for each user?

    can u please make changes in my code, to understand better 

    18 августа 2011 г. 17:30
  • Can u please tell me how to create two separate calls one after another? I tried different combinations . But not working :(
    19 августа 2011 г. 9:51
  • Here is your code with a couple changes to do one call after the other. My approach here isn't very elegant, but it should work for debugging. I wrote this up quickly, so sorry if there are any typos.

    Let me know if this works when you try it.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Configuration;
    using System.Security.Principal;
    using System.Security.Cryptography.X509Certificates;
    using System.Net;
    using System.Threading;
    using System.Diagnostics;
    using Microsoft.Rtc.Collaboration;
    using Microsoft.Rtc.Signaling;
    using System.Runtime.InteropServices;
    //using Microsoft.Rtc.Collaboration.Sample.Common;
    namespace UserPresence
    {
      class UCMASampleInstantMessagingCall
      {
        #region Locals
        // The information for the conversation and the far end participant.    
        // Subject of the conversation; will appear in the center of the title bar of the 
        // conversation window if Microsoft Lync is the far end client.
        private static String _conversationSubject = "The Microsoft Lync Server!";
        // Priority of the conversation will appear in the left corner of the title bar of the
        // conversation window if Microsoft Lync is the far end client.
        private static String _conversationPriority = ConversationPriority.Urgent;
        // The Instant Message that will be sent to the far end.
        private static String _messageToSend = "Hello World! I am a bot, and will echo whatever you type. " +
          "Please send 'bye' to end this application.";
        private InstantMessagingCall _instantMessagingCall1;
    		private InstantMessagingCall _instantMessagingCall2;
        //private ApplicationEndpoint _applicationEndpoint;
        private UserEndpoint _userendpoint;
        private UCMASampleHelper _helper;
        // Event to notify application main thread on completion of the sample.
        private AutoResetEvent _sampleCompletedEvent = new AutoResetEvent(false);
        #endregion
        #region Methods
        /// <summary>
        /// Instantiate and run the InstantMessagingCall quickstart.
        /// </summary>
        /// <param name="args">unused</param>
        //private string _helper;
        //UCMASampleHelper _helper = new UCMASampleHelper();
        public static void Main(string[] args)
        {
          
          UCMASampleInstantMessagingCall ucmaSampleInstantMessagingCall =
                                        new UCMASampleInstantMessagingCall();
          ucmaSampleInstantMessagingCall.Run();
        }
        private void Run()
        {
          // Initialize and startup the platform.
          Exception ex = null;
          try
          {
            // Create the UserEndpoint
            _helper = new UCMASampleHelper();
            _userendpoint = _helper.CreateEstablishedUserEndpoint();
            Console.Write("The User Endpoint owned by URI: ");
            Console.Write(_userendpoint.OwnerUri);
            Console.WriteLine(" is now established and registered.");
    
            // Set up the conversation and place the call.
            ConversationSettings convSettings = new ConversationSettings();
            convSettings.Priority = _conversationPriority;
            convSettings.Subject = _conversationSubject;
            
            // Conversation represents a collection of modes of communication
            // (media types)in the context of a dialog with one or multiple 
            // callees.
            Conversation conversation1 = new Conversation(_userendpoint, convSettings);
            _instantMessagingCall1 = new InstantMessagingCall(conversation1);
            
            // Call: StateChanged: Only hooked up for logging. Generally, 
            // this can be used to surface changes in Call state to the UI
            _instantMessagingCall1.StateChanged += this.InstantMessagingCall_StateChanged;
            
            // Subscribe for the flow created event; the flow will be used to
            // send the media (here, IM).
            // Ultimately, as a part of the callback, the messages will be 
            // sent/received.
            _instantMessagingCall1.InstantMessagingFlowConfigurationRequested +=
              this.InstantMessagingCall_FlowConfigurationRequested;
              
            // Place the call to the remote party, without specifying any 
            // custom options. Please note that the conversation subject 
            // overrides the toast message, so if you want to see the toast 
            // message, please set the conversation subject to null.
            
    				_instantMessagingCall1.BeginEstablish("sip:demouser@lync.abc.com", new ToastMessage("Hello Toast"), null,
    					CallEstablishCompleted, _instantMessagingCall1);
    					
    				// Conversation represents a collection of modes of communication
            // (media types)in the context of a dialog with one or multiple 
            // callees.
            Conversation conversation2 = new Conversation(_userendpoint, convSettings);
            _instantMessagingCall2 = new InstantMessagingCall(conversation2);
            
            // Call: StateChanged: Only hooked up for logging. Generally, 
            // this can be used to surface changes in Call state to the UI
            _instantMessagingCall2.StateChanged += this.InstantMessagingCall_StateChanged;
            
            // Subscribe for the flow created event; the flow will be used to
            // send the media (here, IM).
            // Ultimately, as a part of the callback, the messages will be 
            // sent/received.
            _instantMessagingCall2.InstantMessagingFlowConfigurationRequested +=
              this.InstantMessagingCall_FlowConfigurationRequested;
              
            // Place the call to the remote party, without specifying any 
            // custom options. Please note that the conversation subject 
            // overrides the toast message, so if you want to see the toast 
            // message, please set the conversation subject to null.
            
    				_instantMessagingCall2.BeginEstablish("sip:demouser1@lync.abc.com", new ToastMessage("Hello Toast"), null,
    					CallEstablishCompleted, _instantMessagingCall2);
          }
          catch (InvalidOperationException iOpEx)
          {
            // Invalid Operation Exception may be thrown if the data provided
            // to the BeginXXX methods was invalid/malformed.
            // TODO (Left to the reader): Write actual handling code here.
            ex = iOpEx;
          }
          finally
          {
            if (ex != null)
            {
              // If the action threw an exception, terminate the sample, 
              // and print the exception to the console.
              // TODO (Left to the reader): Write actual handling code here.
              Console.WriteLine(ex.ToString());
              Console.WriteLine("Shutting down platform due to error");
              _helper.ShutdownPlatform();
            }
          }
          // Wait for sample to complete
          _sampleCompletedEvent.WaitOne();
        }
        // Just to record the state transitions in the console.
        void InstantMessagingCall_StateChanged(object sender, CallStateChangedEventArgs e)
         {
          Console.WriteLine("Call has changed state. The previous call state was: " + e.PreviousState +
            "and the current state is: " + e.State);
        }
        // Flow created indicates that there is a flow present to begin media 
        // operations with, and that it is no longer null.
        public void InstantMessagingCall_FlowConfigurationRequested(object sender,
          InstantMessagingFlowConfigurationRequestedEventArgs e)
        {
          Console.WriteLine("Flow Created.");
          
          InstantMessagingFlow instantMessagingFlow = (InstantMessagingFlow)sender;
    
          // Now that the flow is non-null, bind the event handlers for State 
          // Changed and Message Received. When the flow goes active, 
          // (as indicated by the state changed event) the program will send 
          // the IM in the event handler.
          instantMessagingFlow.StateChanged += this.InstantMessagingFlow_StateChanged;
          // Message Received is the event used to indicate that a message has
          // been received from the far end.
          instantMessagingFlow.MessageReceived += this.InstantMessagingFlow_MessageReceived;
          // Also, here is a good place to bind to the 
          // InstantMessagingFlow.RemoteComposingStateChanged event to receive
          // typing notifications of the far end user.
          instantMessagingFlow.RemoteComposingStateChanged +=
                              this.InstantMessagingFlow_RemoteComposingStateChanged;
        }
        private void InstantMessagingFlow_StateChanged(object sender, MediaFlowStateChangedEventArgs e)
        {
          InstantMessagingFlow instantMessagingFlow = (InstantMessagingFlow)sender;
    
          Console.WriteLine("Flow state changed from " + e.PreviousState + " to " + e.State);
          // When flow is active, media operations (here, sending an IM) 
          // may begin.
          if (e.State == MediaFlowState.Active)
          {
            // Send the message on the InstantMessagingFlow.
            instantMessagingFlow.BeginSendInstantMessage(_messageToSend, SendMessageCompleted,
              instantMessagingFlow);
          }
        }
        private void InstantMessagingFlow_RemoteComposingStateChanged(object sender,
                                        ComposingStateChangedEventArgs e)
        {
          // Prints the typing notifications of the far end user.
          Console.WriteLine("Participant "
                    + e.Participant.Uri.ToString()
                    + " is "
                    + e.ComposingState.ToString()
                    );
        }
        private void InstantMessagingFlow_MessageReceived(object sender, InstantMessageReceivedEventArgs e)
        {
          InstantMessagingFlow instantMessagingFlow = (InstantMessagingFlow)sender;
    
          // On an incoming Instant Message, print the contents to the console.
          Console.WriteLine(e.Sender.Uri + " said: " + e.TextBody);
          // Shutdown if the far end tells us to.
          if (e.TextBody.Equals("bye", StringComparison.OrdinalIgnoreCase))
          {
            // Shutting down the platform will terminate all attached objects.
            // If this was a production application, it would tear down the 
            // Call/Conversation, rather than terminating the entire platform.
            instantMessagingFlow.BeginSendInstantMessage("Shutting Down...", SendMessageCompleted,
              instantMessagingFlow);
            _helper.ShutdownPlatform();
            _sampleCompletedEvent.Set();
          }
          else
          {
            // Echo the instant message back to the far end (the sender of 
            // the instant message).
            // Change the composing state of the local end user while sending messages to the far end.
            // A delay is introduced purposely to demonstrate the typing notification displayed by the 
            // far end client; otherwise the notification will not last long enough to notice.
            instantMessagingFlow.LocalComposingState = ComposingState.Composing;
            Thread.Sleep(2000);
            //Echo the message with an "Echo" prefix.
            instantMessagingFlow.BeginSendInstantMessage("Echo: " + e.TextBody, SendMessageCompleted,
              instantMessagingFlow);
          }
        }
        private void CallEstablishCompleted(IAsyncResult result)
        {
          InstantMessagingCall instantMessagingCall = result.AsyncState as InstantMessagingCall;
          Exception ex = null;
          try
          {
            instantMessagingCall.EndEstablish(result);
            Console.WriteLine("The call is now in the established state.");
          }
          catch (OperationFailureException opFailEx)
          {
            // OperationFailureException: Indicates failure to connect the 
            // call to the remote party.
            // TODO (Left to the reader): Write real error handling code.
            ex = opFailEx;
          }
          catch (RealTimeException rte)
          {
            // Other errors may cause other RealTimeExceptions to be thrown.
            // TODO (Left to the reader): Write real error handling code.
            ex = rte;
          }
          finally
          {
            if (ex != null)
            {
              // If the action threw an exception, terminate the sample, 
              // and print the exception to the console.
              // TODO (Left to the reader): Write real error handling code.
              Console.WriteLine(ex.ToString());
              Console.WriteLine("Shutting down platform due to error");
              _helper.ShutdownPlatform();
            }
          }
        }
        private void SendMessageCompleted(IAsyncResult result)
        {
          InstantMessagingFlow instantMessagingFlow = result.AsyncState as InstantMessagingFlow;
          Exception ex = null;
          try
          {
            instantMessagingFlow.EndSendInstantMessage(result);
            Console.WriteLine("The message has been sent.");
          }
          catch (OperationTimeoutException opTimeEx)
          {
            // OperationFailureException: Indicates failure to connect the 
            // IM to the remote party due to timeout (called party failed to
            // respond within the expected time).
            // TODO (Left to the reader): Write real error handling code.
            ex = opTimeEx;
          }
          catch (RealTimeException rte)
          {
            // Other errors may cause other RealTimeExceptions to be thrown.
            // TODO (Left to the reader): Write real error handling code.
            ex = rte;
          }
          finally
          {
            // Reset the composing state of the local end user so that the typing notifcation as seen 
            // by the far end client disappears.
            instantMessagingFlow.LocalComposingState = ComposingState.Idle;
            if (ex != null)
            {
              // If the action threw an exception, terminate the sample, 
              // and print the exception to the console.
              // TODO (Left to the reader): Write real error handling code.
              Console.WriteLine(ex.ToString());
              Console.WriteLine("Shutting down platform due to error");
              _helper.ShutdownPlatform();
            }
          }
        }
        #endregion
      }
    }
    



    Michael Greenlee | linkedin: http://www.linkedin.com/in/michaelgreenlee | blog: http://blog.greenl.ee
    19 августа 2011 г. 11:39
  • Hi ,

     

    I tried the above code . (to send IM to user A and B)

    I have two machine on which lync client is installed . Machine A(user A) and Machine B(user B)

    I am running ucma on Machine B. 

    After running this code , I observed weird behaviour.

    Sometimes user A gets messages twice , Sometime user B gets messages twice (most of the time this happens)  , sometime code does not work . Is UCMA reliable ? 

    So what to do now? 

    I f you have any sample code to sent IM to multiple users please share it with me 

    19 августа 2011 г. 13:35
  • Thanks a lot .. I t is working now . Issues with waitone event 

    I made changes as follows :

     _instantMessagingCall.BeginEstablish("sip:demouser1@lync.abc.com", new ToastMessage("Hello Toast"), null,

    CallEstablishCompleted, _instantMessagingCall).AsyncWaitHandle.WaitOne();

    So it is working in a loop also

    20 августа 2011 г. 7:46
  • hi lyncBegineer

       am trying to develop the same functionality

    can u give me some idea how to send IM to multiple users using loop

    16 апреля 2013 г. 4:48
  • hi lyncBegineer

       am trying to develop the same functionality

    can u give me some idea how to send IM to multiple users using loop

    lucky charm,

    I replied in another thread that you started - http://social.msdn.microsoft.com/Forums/en-US/ucmanagedsdk/thread/d326527d-ebc4-471b-9b66-a9800c01fb44.

    Mark