Ejemplo n.º 1
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                {
                    Entstatus(this, "InProgress");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_INCOMING:
                {
                    oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                    osession = sessionevent.Session;
                    Entstatus(this, "Incoming");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_ANSWERING:
                {
                    Entstatus(this, "Answering");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_CONNECTED:
                {
                    Entstatus(this, "Connected");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                {
                    osession = null;
                    Entstatus(this, "Disconnected");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_HOLD:
                {
                    Entstatus(this, "Hold");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_REFER:
                {
                    break;
                }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "OnIRTCSessionStateChangeEvent()", "RTCAudio.cs");
            }
        }
Ejemplo n.º 2
0
 void oclient_IRTCEventNotification_Event_Event(RTC_EVENT RTCEvent, object pEvent)
 {
     switch (RTCEvent)
     {
     case RTC_EVENT.RTCE_SESSION_STATE_CHANGE:
     {
         IRTCSessionStateChangeEvent sessionevent = null;
         sessionevent = (IRTCSessionStateChangeEvent)pEvent;
         OnIRTCSessionStateChangeEvent(sessionevent);
         break;
     }
     }
 }
Ejemplo n.º 3
0
 void oclient_IRTCEventNotification_Event_Event(RTC_EVENT RTCEvent, object pEvent)
 {
     try
     {
         switch (RTCEvent)
         {
         case RTC_EVENT.RTCE_SESSION_STATE_CHANGE:
         {
             IRTCSessionStateChangeEvent sessionevent = null;
             sessionevent = (IRTCSessionStateChangeEvent)pEvent;
             OnIRTCSessionStateChangeEvent(sessionevent);
             break;
         }
         }
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "oclient_IRTCEventNotification_Event_Event()", "RTCAudio.cs");
     }
 }
Ejemplo n.º 4
0
        void oclient_IRTCEventNotification_Event_Event(RTC_EVENT RTCEvent, object pEvent)
        {
            switch (RTCEvent)
            {
            case RTC_EVENT.RTCE_REGISTRATION_STATE_CHANGE:
            {
                IRTCRegistrationStateChangeEvent registrationstatechangevent = null;
                registrationstatechangevent = (IRTCRegistrationStateChangeEvent)(pEvent);
                OnRTCRegistrationStateChangeEvent(registrationstatechangevent);
                break;
            }

            case RTC_EVENT.RTCE_SESSION_STATE_CHANGE:
            {
                IRTCSessionStateChangeEvent sessionevent = null;
                sessionevent = (IRTCSessionStateChangeEvent)pEvent;
                OnIRTCSessionStateChangeEvent(sessionevent);
                break;
            }
            }
        }
Ejemplo n.º 5
0
 void oclient_IRTCEventNotification_Event_Event(RTC_EVENT RTCEvent, object pEvent)
 {
     try
     {
         switch (RTCEvent)
         {
         case RTC_EVENT.RTCE_SESSION_STATE_CHANGE:
         {
             IRTCSessionStateChangeEvent sessionevent = null;
             sessionevent = (IRTCSessionStateChangeEvent)pEvent;
             OnIRTCSessionStateChangeEvent(sessionevent);
             break;
         }
         }
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCAudio.cs--:--OnIRTCSessionStateChangeEvent()--");
         ClsException.LogError(ex);
         ClsException.WriteToErrorLogFile(ex);
     }
 }
Ejemplo n.º 6
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                {
                    if (_IPGCounter == -1)
                    {
                        entstatus(this, "InPorgress");
                        _IPGCounter = 1;
                    }
                    else if (_IPGCounter == 2)
                    {
                        _IPGCounter = -1;
                    }
                    else
                    {
                        _IPGCounter += 1;
                    }
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_INCOMING:
                {
                    oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                    osession = sessionevent.Session;
                    entstatus(this, "Incoming");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_ANSWERING:
                {
                    //oclient.SendDTMF
                    entstatus(this, "Answering");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_CONNECTED:
                {
                    entstatus(this, "Connected");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                {
                    //int i = this.oclient.SessionCapabilities;
                    //string ss = this.oclient.SessionCapabilities.ToString();
                    //int str1 = this.profile.SessionCapabilities.GetHashCode();
                    osession = null;
                    entstatus(this, "Disconnected");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_HOLD:
                {
                    entstatus(this, "Hold");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_REFER:
                {
                    break;
                }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCAudio.cs--:--OnIRTCSessionStateChangeEvent()--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
            }
        }
Ejemplo n.º 7
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                    case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                        {
                            if (_IPGCounter == -1)
                            {
                                entstatus(this, "InPorgress");
                                _IPGCounter = 1;
                            }
                            else if (_IPGCounter == 2)
                            { _IPGCounter = -1; }
                            else
                            { _IPGCounter += 1; }
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_INCOMING:
                        {
                            oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                            osession = sessionevent.Session;
                            entstatus(this, "Incoming");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_ANSWERING:
                        {
                            //oclient.SendDTMF
                            entstatus(this, "Answering");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_CONNECTED:
                        {
                            entstatus(this, "Connected");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                        {
                            //int i = this.oclient.SessionCapabilities;
                            //string ss = this.oclient.SessionCapabilities.ToString();
                            //int str1 = this.profile.SessionCapabilities.GetHashCode();
                            osession = null;
                            entstatus(this, "Disconnected");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_HOLD:
                        {
                            entstatus(this, "Hold");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_REFER:
                        {
                            break;
                        }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "OnIRTCSEssionStateChangeEvent()", "VMuktiAudio.VistaService\\RTCAudio.cs");
            }
        }
Ejemplo n.º 8
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                {
                    if (_IPGCounter == -1)
                    {
                        entstatus(this, "InPorgress");
                        _IPGCounter = 1;
                    }
                    else if (_IPGCounter == 2)
                    {
                        _IPGCounter = -1;
                    }
                    else
                    {
                        _IPGCounter += 1;
                    }
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_INCOMING:
                {
                    oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                    osession = sessionevent.Session;
                    entstatus(this, "Incoming");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_ANSWERING:
                {
                    //oclient.SendDTMF
                    entstatus(this, "Answering");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_CONNECTED:
                {
                    entstatus(this, "Connected");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                {
                    //int i = this.oclient.SessionCapabilities;
                    //string ss = this.oclient.SessionCapabilities.ToString();
                    //int str1 = this.profile.SessionCapabilities.GetHashCode();
                    osession = null;
                    entstatus(this, "Disconnected");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_HOLD:
                {
                    entstatus(this, "Hold");
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_REFER:
                {
                    break;
                }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "OnIRTCSessionStateChangeEvent()", "Audio\\Audio.Business\\RTCAudio.cs");
            }
        }
Ejemplo n.º 9
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                    case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                        {
                            if (_IPGCounter == -1)
                            {
                                entstatus(this, "InPorgress");
                                _IPGCounter = 1;
                            }
                            else if (_IPGCounter == 2)
                            { _IPGCounter = -1; }
                            else
                            { _IPGCounter += 1; }
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_INCOMING:
                        {
                            oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                            osession = sessionevent.Session;
                            entstatus(this, "Incoming");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_ANSWERING:
                        {
                            //oclient.SendDTMF
                            entstatus(this, "Answering");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_CONNECTED:
                        {
                            entstatus(this, "Connected");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                        {
                            //int i = this.oclient.SessionCapabilities;
                            //string ss = this.oclient.SessionCapabilities.ToString();
                            //int str1 = this.profile.SessionCapabilities.GetHashCode();
                            osession = null;
                            entstatus(this, "Disconnected");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_HOLD:
                        {
                            entstatus(this, "Hold");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_REFER:
                        {
                            break;
                        }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Business--:--RTCAudio.cs--:--OnIRTCSessionStateChangeEvent()--");
                ClsException.LogError(ex);
                ClsException.WriteToErrorLogFile(ex);
            }
        }
Ejemplo n.º 10
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                {
                    if (_IPGCounter == -1)
                    {
                        entstatus(this, "InPorgress", this.strNumber, this.strHangUpModule);
                        _IPGCounter = 1;
                    }
                    else if (_IPGCounter == 2)
                    {
                        _IPGCounter = -1;
                    }
                    else
                    {
                        _IPGCounter += 1;
                    }
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_INCOMING:
                {
                    oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                    osession = sessionevent.Session;
                    entstatus(this, "Incoming", this.strNumber, this.strHangUpModule);
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_ANSWERING:
                {
                    entstatus(this, "Answering", this.strNumber, this.strHangUpModule);
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_CONNECTED:
                {
                    entstatus(this, "Connected", this.strNumber, this.strHangUpModule);
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                {
                    osession = null;
                    entstatus(this, "Disconnected", this.strNumber, this.strHangUpModule);
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_HOLD:
                {
                    entstatus(this, "Hold", this.strNumber, this.strHangUpModule);
                    break;
                }

                case RTC_SESSION_STATE.RTCSS_REFER:
                {
                    break;
                }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "OnIRTCSessionStateChangeEvent()", "RTCAudio.cs");
            }
        }
Ejemplo n.º 11
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                    case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                        {
                            Entstatus(this, "InProgress");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_INCOMING:
                        {
                            oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                            osession = sessionevent.Session;
                            Entstatus(this, "Incoming");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_ANSWERING:
                        {
                           
                            Entstatus(this, "Answering");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_CONNECTED:
                        {
                            Entstatus(this, "Connected");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                        {
                            osession = null;
                            Entstatus(this, "Disconnected");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_HOLD:
                        {
                            Entstatus(this, "Hold");
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_REFER:
                        {
                            break;
                        }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "OnIRTCSessionStateChangeEvent()", "RTCAudio.cs");               
            }
        }
Ejemplo n.º 12
0
        private void OnIRTCSessionStateChangeEvent(IRTCSessionStateChangeEvent sessionevent)
        {
            try
            {
                RTC_SESSION_STATE sessionstate;
                sessionstate = sessionevent.State;

                switch (sessionstate)
                {
                    case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                        {
                            if (_IPGCounter == -1)
                            {
                                entstatus(this, "InPorgress", this.strNumber, this.strHangUpModule);
                                _IPGCounter = 1;
                            }
                            else if (_IPGCounter == 2)
                            { _IPGCounter = -1; }
                            else
                            { _IPGCounter += 1; }
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_INCOMING:
                        {
                            oclient.PlayRing(RTC_RING_TYPE.RTCRT_PHONE, true);
                            osession = sessionevent.Session;
                            entstatus(this, "Incoming", this.strNumber, this.strHangUpModule);
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_ANSWERING:
                        {
                            entstatus(this, "Answering", this.strNumber, this.strHangUpModule);
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_CONNECTED:
                        {
                            entstatus(this, "Connected", this.strNumber, this.strHangUpModule);
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                        {
                            osession = null;
                            entstatus(this, "Disconnected", this.strNumber, this.strHangUpModule);
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_HOLD:
                        {
                            entstatus(this, "Hold", this.strNumber, this.strHangUpModule);
                            break;
                        }

                    case RTC_SESSION_STATE.RTCSS_REFER:
                        {
                            break;
                        }
                }
                sessionevent = null;
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "OnIRTCSessionStateChangeEvent()", "RTCAudio.cs");
            }
        }
Ejemplo n.º 13
0
        private void SessionStateChangeEvent(IRTCSessionStateChangeEvent sessionEvent)
        {
            RTC_SESSION_STATE oturumDurumu        = sessionEvent.State;
            IRTCCollection    oturumKatilimcilari = sessionEvent.Session.Participants;

            string ad  = String.Empty;
            string uri = String.Empty;

            // Uzaktan oturum açýlýnca oturumu baþlatmak için kiþinin(katýlýmcý) bilgilerini elde ediyoruz...
            foreach (IRTCParticipant p in oturumKatilimcilari)
            {
                if (p.UserURI != null)
                {
                    ad  = p.Name;
                    uri = p.UserURI;
                }
            }

            switch (oturumDurumu)
            {
            case RTC_SESSION_STATE.RTCSS_IDLE:     // oturum varsayýlan olarak idle olarak baþlar...
                Trace.WriteLine("Idle");
                break;

            case RTC_SESSION_STATE.RTCSS_HOLD:     // oturum varsayýlan olarak idle olarak baþlar...
                Trace.WriteLine("Hold");
                break;

            case RTC_SESSION_STATE.RTCSS_REFER:     // oturum varsayýlan olarak idle olarak baþlar...
                Trace.WriteLine("Refer");
                break;

            case RTC_SESSION_STATE.RTCSS_INCOMING:     // Uzaktan media oturumu isteði geliyor...
                Trace.WriteLine("incoming");

                // Media oturum isteði geldi
                if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))
                {
                    try
                    {
                        MediaOturumuIstegi(sessionEvent.Session, uri, ad);
                    }
                    catch (COMException hata)
                    {
                        this.anaPencere.MesajGoster(hata.ToString(), "Hata");
                    }
                }

                /* IM oturumu MessagingEvent de baþlatýlýyor */

                break;

            case RTC_SESSION_STATE.RTCSS_ANSWERING:
                Trace.WriteLine("answer");
                break;

            case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                Trace.WriteLine("progress");
                break;

            case RTC_SESSION_STATE.RTCSS_CONNECTED:
                Trace.WriteLine("connected");

                if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM || sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))
                {
                    try
                    {
                        Oturumlar.Add(sessionEvent.Session);
                        if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))     // media oturumu için uyarý göster
                        {
                            ((frmGorusme)htPencereler[mediaKatilimci]).UyariGoster(Sabitler.VIDEOSES_BASLADI);
                        }
                    }
                    catch (Exception hata)
                    {
                        Trace.WriteLine(hata.ToString());
                    }
                }

                break;

            case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                Trace.WriteLine("disconnected");

                // oturum nesnesini serbest býrak ki mesaj gönderildiðinde yeniden oturum yaratýlsýn ve pencere oluþturulsun
                if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM))
                {
                    if (Oturumlar.Contains(sessionEvent.Session))     // Ýki taraftan biri oturumu bitirdi.
                    {
                        Oturumlar.Remove(sessionEvent.Session);
                    }
                    else     // offline kullancýya mesaj gönderiliyor...
                    {
                        ((frmGorusme)htPencereler[IMKatilimci]).UyariGoster(Sabitler.IM_GONDERILEMEDI);
                    }
                }

                if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))
                {
                    if (Oturumlar.Contains(sessionEvent.Session))     // Ýki taraftan biri oturumu bitirdi.
                    {
                        Oturumlar.Remove(sessionEvent.Session);
                        ((frmGorusme)htPencereler[mediaKatilimci]).UyariGoster(Sabitler.VIDEOSES_SONLANDIRILDI);
                    }
                    else     // offline kullanýcýya video görüþmesi gönderiliyor veya kullanýcý görüþmeyi reddetti...
                    {
                        ((frmGorusme)htPencereler[mediaKatilimci]).UyariGoster(Sabitler.VIDEOSES_BASLAYAMADI);
                        ((frmGorusme)htPencereler[mediaKatilimci]).MediaGorusmesiAyarla();
                    }
                }

                /* Media oturumu MediaEvent de sonlandýrýlýyor... */
                break;
            }
        }
Ejemplo n.º 14
0
        private void SessionStateChangeEvent(IRTCSessionStateChangeEvent sessionEvent)
        {
            RTC_SESSION_STATE oturumDurumu = sessionEvent.State;
            IRTCCollection oturumKatilimcilari = sessionEvent.Session.Participants;

            string ad = String.Empty;
            string uri = String.Empty;

            // Uzaktan oturum açýlýnca oturumu baþlatmak için kiþinin(katýlýmcý) bilgilerini elde ediyoruz...
            foreach (IRTCParticipant p in oturumKatilimcilari)
            {
                if (p.UserURI != null)
                {
                    ad = p.Name;
                    uri = p.UserURI;
                }
            }

            switch (oturumDurumu)
            {
                case RTC_SESSION_STATE.RTCSS_IDLE: // oturum varsayýlan olarak idle olarak baþlar...
                    Trace.WriteLine("Idle");
                    break;
                case RTC_SESSION_STATE.RTCSS_HOLD: // oturum varsayýlan olarak idle olarak baþlar...
                    Trace.WriteLine("Hold");
                    break;
                case RTC_SESSION_STATE.RTCSS_REFER: // oturum varsayýlan olarak idle olarak baþlar...
                    Trace.WriteLine("Refer");
                    break;

                case RTC_SESSION_STATE.RTCSS_INCOMING: // Uzaktan media oturumu isteði geliyor...
                    Trace.WriteLine("incoming");

                    // Media oturum isteði geldi
                    if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))
                    {
                        try
                        {
                            MediaOturumuIstegi(sessionEvent.Session, uri, ad);
                        }
                        catch (COMException hata)
                        {
                            this.anaPencere.MesajGoster(hata.ToString(), "Hata");
                        }
                    }

                    /* IM oturumu MessagingEvent de baþlatýlýyor */

                    break;

                case RTC_SESSION_STATE.RTCSS_ANSWERING:
                    Trace.WriteLine("answer");
                    break;

                case RTC_SESSION_STATE.RTCSS_INPROGRESS:
                    Trace.WriteLine("progress");
                    break;

                case RTC_SESSION_STATE.RTCSS_CONNECTED:
                    Trace.WriteLine("connected");

                    if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM || sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))
                    {
                        try
                        {
                            Oturumlar.Add(sessionEvent.Session);
                            if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC)) // media oturumu için uyarý göster
                            {
                                ((frmGorusme)htPencereler[mediaKatilimci]).UyariGoster(Sabitler.VIDEOSES_BASLADI);
                            }
                        }
                        catch (Exception hata)
                        {
                            Trace.WriteLine(hata.ToString());
                        }
                    }

                    break;

                case RTC_SESSION_STATE.RTCSS_DISCONNECTED:
                    Trace.WriteLine("disconnected");

                    // oturum nesnesini serbest býrak ki mesaj gönderildiðinde yeniden oturum yaratýlsýn ve pencere oluþturulsun
                    if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM))
                    {
                        if (Oturumlar.Contains(sessionEvent.Session)) // Ýki taraftan biri oturumu bitirdi.
                        {
                            Oturumlar.Remove(sessionEvent.Session);
                        }
                        else // offline kullancýya mesaj gönderiliyor...
                        {
                            ((frmGorusme)htPencereler[IMKatilimci]).UyariGoster(Sabitler.IM_GONDERILEMEDI);
                        }
                    }

                    if ((sessionEvent.Session.Type == RTC_SESSION_TYPE.RTCST_PC_TO_PC))
                    {
                        if (Oturumlar.Contains(sessionEvent.Session)) // Ýki taraftan biri oturumu bitirdi. 
                        {
                            Oturumlar.Remove(sessionEvent.Session);
                            ((frmGorusme)htPencereler[mediaKatilimci]).UyariGoster(Sabitler.VIDEOSES_SONLANDIRILDI);
                        }
                        else // offline kullanýcýya video görüþmesi gönderiliyor veya kullanýcý görüþmeyi reddetti...
                        {
                            ((frmGorusme)htPencereler[mediaKatilimci]).UyariGoster(Sabitler.VIDEOSES_BASLAYAMADI);
                            ((frmGorusme)htPencereler[mediaKatilimci]).MediaGorusmesiAyarla();
                        }
                    }

                    /* Media oturumu MediaEvent de sonlandýrýlýyor... */
                    break;
            }
        }