private void UnregisterSIPEPEventHandlers(IInteractionVoice interactionVoice)
        {
            if (JabraOptions.Default.IsUsingGenesysSIPEndpoint())
            {
                try
                {
                    SIPEndpoint sipEndpoint = container.Resolve <ISIPEndpointCommunication>().FindSIPEndpoint(interactionVoice);

                    if (sipEndpoint != null)
                    {
                        // this.sipEP.EndpointStatusChanged += new System.EventHandler<EventArgs<bool>>(SIPEP_StatusChanged);
                        if (startedSipEndpoints.ContainsKey(sipEndpoint))
                        {
                            sipEndpoint.PropertyChanged       -= new PropertyChangedEventHandler(SIPEP_PropertyChanged);
                            sipEndpoint.EndpointStatusChanged -= new System.EventHandler <EventArgs <bool> >(SIPEP_StatusChanged);

                            startedSipEndpoints.Remove(sipEndpoint);
                        }
                    }
                }
                catch (Exception exp)
                {
                    log.Error("Exception in UnregisterSIPEPEventHandlers", exp);
                }
            }
        }
 public void RequestUnmuteCallViaSIPEndpoint(IInteractionVoice ixnVoice)
 {
     // To go to the main thread
     if (Application.Current.Dispatcher != null && !Application.Current.Dispatcher.CheckAccess())
     {
         object result = Application.Current.Dispatcher.Invoke(DispatcherPriority.Send,
                                                               new RequestUnmuteCallViaSIPEndpointDelegate(RequestUnmuteCallViaSIPEndpoint), ixnVoice);
     }
     else
     {
         log.Info("Execute RequestUnmuteCallViaSIPEndpoint");
         if (JabraOptions.Default.IsUsingGenesysSIPEndpoint())
         {
             try
             {
                 if (ixnVoice != null)
                 {
                     SIPEndpoint sipEndpoint = container.Resolve <ISIPEndpointCommunication>().FindSIPEndpoint(ixnVoice);
                     if (sipEndpoint != null)
                     {
                         sipEndpoint.IsMicrophoneMuted = false;
                     }
                 }
             }
             catch (Exception exp)
             {
                 log.Error("Exception in RequestMuteCallViaSIPEndpoint", exp);
             }
         }
     }
 }
        private void SIPEP_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "IsMicrophoneMuted")
            {
                SIPEndpoint sipEndpoint     = sender as SIPEndpoint;
                bool        microphoneMuted = sipEndpoint.IsMicrophoneMuted;

                /* Mic mute change */

                SetMicrophoneMuted(microphoneMuted);
            }
            // Should also work with IsSpeakerMuted, MicrophoneVolume, SpeakerVolume
        }