Example #1
0
 public void Cikis()
 {
     if (profil == null) // RTC_REGISTRATION_STATE.RTCRS_LOGGED_OFF olayýndan sonra da burasý çalýþýr ve oturum biter
     {
         BulunmaDurumuPasif();
         this.anaPencere.OturumKapandi();
         return;
     }
     // DisablePresence, DisableProfile den sonra çaðrýlmalýdýr...
     istemci.DisableProfile(profil); // RTCRS_UNREGISTERING tetiklenir.
     profil = null;
 }
Example #2
0
 public void Register()
 {
     try
     {
         string sprofile = "<provision key='5B29C449-29EE-4fd8-9E3F-04AED077690E' name=\"Asterisk\"> \n <user account='" + SIPCredentials.SIPNumber + "' password='******' uri='SIP:" + SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer + "' /> <sipsrv addr='" + SIPCredentials.SIPServer + "' protocol='udp' auth='digest' role='registrar'> <session party='first' type='pc2ph' /> </sipsrv> </provision>\n\r";
         this.profile = ((IRTCProfile2)(this.oclient.CreateProfile(sprofile)));
         this.oclient.EnableProfile(this.oclient.CreateProfile(sprofile), 15);
         dt.Stop();
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "Register()", "RTCAudio.cs");
     }
 }
Example #3
0
        public void DoLogOff()
        {
            Trace.WriteLine("Entering RTCPresenceCore.DoLogOff");

            if (this.profile == null)
            {
                this.DoDisablePresence();
                this.presenceUI.OnLoggedOff();
                return;
            }

            this.client.DisableProfile(profile);

            this.profile = null;
        }
Example #4
0
 void dt_Tick(object sender, EventArgs e)
 {
     try
     {
         string sprofile = "<provision key='5B29C449-29EE-4fd8-9E3F-04AED077690E' name=\"Asterisk\"> \n <user account='" + SIPCredentials.SIPNumber + "' password='******' uri='SIP:" + SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer + "' /> <sipsrv addr='" + SIPCredentials.SIPServer + "' protocol='udp' auth='digest' role='registrar'> <session party='first' type='pc2ph' /> </sipsrv> </provision>\n\r";
         this.profile = ((IRTCProfile2)(this.oclient.CreateProfile(sprofile)));
         //System.Windows.MessageBox.Show(this.profile.UserURI);
         this.oclient.EnableProfile(this.oclient.CreateProfile(sprofile), 15);
         dt.Stop();
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "dt_Tick", "Audio\\Audio.Business\\RTCAudio.cs");
     }
 }
Example #5
0
 void dt_Tick(object sender, EventArgs e)
 {
     try
     {
         string sprofile = "<provision key='5B29C449-29EE-4fd8-9E3F-04AED077690E' name=\"Asterisk\"> \n <user account='" + SIPCredentials.SIPNumber + "' password='******' uri='SIP:" + SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer + "' /> <sipsrv addr='" + SIPCredentials.SIPServer + "' protocol='udp' auth='digest' role='registrar'> <session party='first' type='pc2ph' /> </sipsrv> </provision>\n\r";
         this.profile = ((IRTCProfile2)(this.oclient.CreateProfile(sprofile)));
         this.oclient.EnableProfile(this.oclient.CreateProfile(sprofile), 15);
         dt.Stop();
     }
     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);
     }
 }
Example #6
0
        private void ClientEvent(IRTCClientEvent clientEvent)
        {
            RTC_CLIENT_EVENT_TYPE olayTuru = clientEvent.EventType;

            if (olayTuru == RTC_CLIENT_EVENT_TYPE.RTCCET_ASYNC_CLEANUP_DONE) // Form kapatýldýðýnda veya PrepareForShutdown metodu tetikler...
            {
                profil = null;

                if (istemci != null)
                {
                    // Artýk olaylarý dinleme... -=
                    istemci.IRTCEventNotification_Event_Event -= new IRTCEventNotification_EventEventHandler(istemci_IRTCEventNotification_Event_Event);
                    istemci.Shutdown();
                    istemci = null;
                }
                this.anaPencere.KapatAnaPencere();
            }
        }
Example #7
0
 private void ProfileEvent(IRTCProfileEvent2 profileEvent)
 {
     if (profileEvent.EventType == RTC_PROFILE_EVENT_TYPE.RTCPFET_PROFILE_GET) // getprofile metodu çaðýrýldýðýnda. profil oluþmuþ
     {
         if (Yardim.Basarili(profileEvent.StatusCode))                         // profil oluþturulmuþ mu?
         {
             this.profil             = (IRTCProfile2)profileEvent.Profile;     // profil nesnesine aktarýlýyor
             this.profil.AllowedAuth = Sabitler.RTC_DOGRULAMA_SABITLERI;       // Sunucu doðrulama istesin
             this.KayitYap();
         }
         else
         {
             this.BulunmaDurumuPasif();
             this.anaPencere.OturumKapandi();
             this.anaPencere.MesajGoster("Giriþ Baþarýsýz!", "Uyarý");
         }
     }
 }
Example #8
0
        void OnRTCClientEvent(IRTCClientEvent clientEvent)
        {
            Trace.WriteLine("Enter OnRTCClientEvent  " + clientEvent.EventType);

            RTC_CLIENT_EVENT_TYPE eventType = clientEvent.EventType;

            if (eventType == RTC_CLIENT_EVENT_TYPE.RTCCET_ASYNC_CLEANUP_DONE)
            {
                // The RTC client has finished preparing for shutdown.
                this.profile = null;

                if (this.client != null)
                {
                    // Unadvise for events from the RTC client
                    this.client.IRTCEventNotification_Event_Event -= new IRTCEventNotification_EventEventHandler(OnRTCEvent);
                    this.client.Shutdown();
                    this.client = null;
                }
                this.presenceUI.CloseUI();
            }
        }
Example #9
0
        void OnRTCProfileEvent(IRTCProfileEvent2 profileEvent)
        {
            Trace.WriteLine("Entering RTCPresenceCore.OnRTCProfileEvent  " + profileEvent.EventType);

            if (profileEvent.EventType == RTC_PROFILE_EVENT_TYPE.RTCPFET_PROFILE_GET)
            {
                if (RTCHelp.IsSucceeded(profileEvent.StatusCode))
                {
                    this.profile             = (IRTCProfile2)profileEvent.Profile;
                    this.profile.AllowedAuth = RTCConst.RTCAU_USE_LOGON_CRED |
                                               RTCConst.RTCAU_NTLM | RTCConst.RTCAU_KERBEROS;
                    this.DoRegister();
                }
                else
                {
                    this.DoDisablePresence();
                    this.presenceUI.OnLoggedOff();
                    this.presenceUI.ShowMessage("Logon failed!", "Warning");
                }
            }
        }
Example #10
0
 void dt_Tick(object sender, EventArgs e)
 {
     try
     {
         string sprofile = "<provision key='5B29C449-29EE-4fd8-9E3F-04AED077690E' name=\"Asterisk\"> \n <user account='" + SIPCredentials.SIPNumber + "' password='******' uri='SIP:" + SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer + "' /> <sipsrv addr='" + SIPCredentials.SIPServer + "' protocol='udp' auth='digest' role='registrar'> <session party='first' type='pc2ph' /> </sipsrv> </provision>\n\r";
         this.profile = ((IRTCProfile2)(this.oclient.CreateProfile(sprofile)));
         //System.Windows.MessageBox.Show(this.profile.UserURI);
         this.oclient.EnableProfile(this.oclient.CreateProfile(sprofile), 15);
         dt.Stop();
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "dt_Tick()", "VMuktiAudio.VistaService\\RTCAudio.cs");
     }
 }
Example #11
0
 private void ProfileEvent(IRTCProfileEvent2 profileEvent)
 {
     if (profileEvent.EventType == RTC_PROFILE_EVENT_TYPE.RTCPFET_PROFILE_GET) // getprofile metodu çaðýrýldýðýnda. profil oluþmuþ
     {
         if (Yardim.Basarili(profileEvent.StatusCode)) // profil oluþturulmuþ mu?
         {
             this.profil = (IRTCProfile2)profileEvent.Profile; // profil nesnesine aktarýlýyor
             this.profil.AllowedAuth = Sabitler.RTC_DOGRULAMA_SABITLERI; // Sunucu doðrulama istesin
             this.KayitYap();
         }
         else
         {
             this.BulunmaDurumuPasif();
             this.anaPencere.OturumKapandi();
             this.anaPencere.MesajGoster("Giriþ Baþarýsýz!", "Uyarý");
         }
     }
 }
        void OnRTCProfileEvent(IRTCProfileEvent2 profileEvent)
        {
            Trace.WriteLine("Entering RTCPresenceCore.OnRTCProfileEvent  " + profileEvent.EventType);

            if (profileEvent.EventType == RTC_PROFILE_EVENT_TYPE.RTCPFET_PROFILE_GET)
            {
                if (RTCHelp.IsSucceeded(profileEvent.StatusCode))
                {
                    this.profile = (IRTCProfile2)profileEvent.Profile;
                    this.profile.AllowedAuth = RTCConst.RTCAU_USE_LOGON_CRED |
                        RTCConst.RTCAU_NTLM | RTCConst.RTCAU_KERBEROS;
                    this.DoRegister();
                }
                else
                {
                    this.DoDisablePresence();
                    this.presenceUI.OnLoggedOff();
                    this.presenceUI.ShowMessage("Logon failed!", "Warning");
                }
            }
        }
Example #13
0
 public void Cikis()
 {
     if (profil == null) // RTC_REGISTRATION_STATE.RTCRS_LOGGED_OFF olayýndan sonra da burasý çalýþýr ve oturum biter
     {
         BulunmaDurumuPasif();
         this.anaPencere.OturumKapandi();
         return;
     }
     // DisablePresence, DisableProfile den sonra çaðrýlmalýdýr...
     istemci.DisableProfile(profil); // RTCRS_UNREGISTERING tetiklenir.
     profil = null;
 }
        void OnRTCClientEvent(IRTCClientEvent clientEvent)
        {
            Trace.WriteLine("Enter OnRTCClientEvent  " + clientEvent.EventType);

            RTC_CLIENT_EVENT_TYPE eventType = clientEvent.EventType;

            if ( eventType == RTC_CLIENT_EVENT_TYPE.RTCCET_ASYNC_CLEANUP_DONE )
            {
                // The RTC client has finished preparing for shutdown.
                this.profile = null;

                if (this.client != null)
                {
                    // Unadvise for events from the RTC client
                    this.client.IRTCEventNotification_Event_Event -= new IRTCEventNotification_EventEventHandler(OnRTCEvent);
                    this.client.Shutdown();
                    this.client = null;
                }
                this.presenceUI.CloseUI();
            }
        }
        public void DoLogOff()
        {
            Trace.WriteLine("Entering RTCPresenceCore.DoLogOff");

            if (this.profile == null)
            {
                this.DoDisablePresence();
                this.presenceUI.OnLoggedOff();
                return;
            }

            this.client.DisableProfile(profile);

            this.profile = null;
        }
Example #16
0
        public void Register()
        {
            try
            {
                string sprofile = "<provision key='5B29C449-29EE-4fd8-9E3F-04AED077690E' name=\"Asterisk\"> \n <user account='" + SIPCredentials.SIPNumber + "' password='******' uri='SIP:" + SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer + "' /> <sipsrv addr='" + SIPCredentials.SIPServer + "' protocol='udp' auth='digest' role='registrar'> <session party='first' type='pc2ph' /> </sipsrv> </provision>\n\r";
                this.profile = ((IRTCProfile2)(this.oclient.CreateProfile(sprofile)));
                this.oclient.EnableProfile(this.oclient.CreateProfile(sprofile), 15);
                dt.Stop();
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Register()", "RTCAudio.cs"); 
            }

        }
Example #17
0
 void dt_Tick(object sender, EventArgs e)
 {
     try
     {
         string sprofile = "<provision key='5B29C449-29EE-4fd8-9E3F-04AED077690E' name=\"Asterisk\"> \n <user account='" + SIPCredentials.SIPNumber + "' password='******' uri='SIP:" + SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer + "' /> <sipsrv addr='" + SIPCredentials.SIPServer + "' protocol='udp' auth='digest' role='registrar'> <session party='first' type='pc2ph' /> </sipsrv> </provision>\n\r";
         this.profile = ((IRTCProfile2)(this.oclient.CreateProfile(sprofile)));
         this.oclient.EnableProfile(this.oclient.CreateProfile(sprofile), 15);
         dt.Stop();
     }
     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);
     }
 }
Example #18
0
        private void ClientEvent(IRTCClientEvent clientEvent)
        {
            RTC_CLIENT_EVENT_TYPE olayTuru = clientEvent.EventType;

            if (olayTuru == RTC_CLIENT_EVENT_TYPE.RTCCET_ASYNC_CLEANUP_DONE) // Form kapatýldýðýnda veya PrepareForShutdown metodu tetikler...
            {
                profil = null;

                if (istemci != null)
                {
                    // Artýk olaylarý dinleme... -=
                    istemci.IRTCEventNotification_Event_Event -= new IRTCEventNotification_EventEventHandler(istemci_IRTCEventNotification_Event_Event);
                    istemci.Shutdown();
                    istemci = null;
                }
                this.anaPencere.KapatAnaPencere();
            }
        }