Example #1
0
 public virtual void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             strRemoteURI = "SIP:" + number;
         }
         else
         {
             strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
         }
         osession            = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
         oparticipant        = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
         oSessionCallControl = (IRTCSessionCallControl)(osession);
     }
     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);
         System.Windows.MessageBox.Show("Could not make a call, Please refer Error Log");
     }
 }
Example #2
0
 public virtual void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             this.strNumber      = number;//my change
             strRemoteURI        = "SIP:" + number;
             osession            = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
             oparticipant        = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
             oSessionCallControl = (IRTCSessionCallControl)(osession);
         }
         else
         {
             this.strNumber      = number;
             strRemoteURI        = "SIP:" + number + "@" + SIPCredentials.SIPServer;
             osession            = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
             oparticipant        = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
             oSessionCallControl = (IRTCSessionCallControl)(osession);
         }
         //oclient.LocalUserURI = SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer;
         //oclient.LocalUserName = SIPCredentials.SIPNumber;
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "Connect()", "RTCAudio.cs");
     }
 }
Example #3
0
 public void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             strRemoteURI = "SIP:" + number;
         }
         else
         {
             strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
         }
         //oclient.LocalUserURI = SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer;
         //oclient.LocalUserName = SIPCredentials.SIPNumber;
         osession            = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
         oparticipant        = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
         oSessionCallControl = (IRTCSessionCallControl)(osession);
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "Connect()", "VMuktiAudio.VistaService\\RTCAudio.cs");
         System.Windows.MessageBox.Show("Could not make a call, Please refer to Error Log");
     }
 }
Example #4
0
        /// <summary>
        /// Uzak kullanýcý ile video/ses oturumu yaratýr.
        /// </summary>
        /// <param name="uri">Uzaktaki kullanýcýnýn sip adresi</param>
        /// <param name="ad">Uzaktaki kullanýcýnýn görünen adý</param>
        public void MediaOturumuYarat(string uri, string ad)
        {
            IRTCSession oturum = null;

            Trace.WriteLine("creating media session");

            mediaKatilimci = uri;
            ((frmGorusme)htPencereler[uri]).MediaGorusmesiAyarla();

            try
            {
                oturum = istemci.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PC, null, null, 0);
                ((frmGorusme)htPencereler[uri]).MediaOturumu = oturum;
                ((frmGorusme)htPencereler[uri]).UyariGoster(ad + Sabitler.VIDEOSES_DAVET_ETTI);
                oturum.AddParticipant(uri, ad);
            }
            catch (COMException exp)  // kiþi video görüþmesinde ise hata!!! Ayrýca RTC'de her istemci sadece bir video görüþmesi yapabilir...
            {
                Trace.WriteLine(exp.ToString());
                ((frmGorusme)htPencereler[uri]).UyariGoster(Sabitler.VIDEOSES_BASLAYAMADI);
                ((frmGorusme)htPencereler[uri]).MediaGorusmesiAyarla();
                ((frmGorusme)htPencereler[uri]).MediaOturumu = null;
                mediaKatilimci = String.Empty;
            }
        }
Example #5
0
        public void Connect(string number)
        {
            string strRemoteURI = string.Empty;

            try
            {
                strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;

                osession            = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PC, null, null, 0);
                oparticipant        = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
                oSessionCallControl = (IRTCSessionCallControl)(osession);
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Connect()", "RTCAudio.cs");
            }
        }
Example #6
0
        /// <summary>
        /// Ýlk mesaj gönderildiðinde uzak kullanýcý ile IM oturumu yaratýr.
        /// </summary>
        /// <param name="uri">Uzaktaki kullanýcýnýn sip adresi</param>
        /// <param name="ad">Uzaktaki kullanýcýnýn adý</param>
        public IRTCSession IMOturumuYarat(string uri, string ad)
        {
            Trace.WriteLine("creating im session");
            IRTCSession oturum = null;

            IMKatilimci = uri; // oturum YARATILMAZSA kullanýcýnýn penceresine disconnected sinyalinden eriþebilmek için

            try
            {
                oturum = istemci.CreateSession(RTC_SESSION_TYPE.RTCST_MULTIPARTY_IM, null, null, 0);
                oturum.AddParticipant(uri, ad); // RTC_SESSION_STATE.RTCSS_CONNECTED tetiklenir
            }
            catch (COMException)
            {
            }

            return(oturum);
        }
Example #7
0
 public void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             strRemoteURI = "SIP:" + number;
         }
         else
         {
             strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
         }
         //oclient.LocalUserURI = SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer;
         //oclient.LocalUserName = SIPCredentials.SIPNumber;
         osession = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
         oparticipant = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
         oSessionCallControl = (IRTCSessionCallControl)(osession);
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "Connect()", "VMuktiAudio.VistaService\\RTCAudio.cs");
         System.Windows.MessageBox.Show("Could not make a call, Please refer to Error Log");
     }
 }
Example #8
0
 public virtual void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             strRemoteURI = "SIP:" + number;
         }
         else
         {
             strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
         }
         osession = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
         oparticipant = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
         oSessionCallControl = (IRTCSessionCallControl)(osession);
     }
     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);
         System.Windows.MessageBox.Show("Could not make a call, Please refer Error Log");
     }
 }
Example #9
0
        public void Connect(string number)
        {
            string strRemoteURI=string.Empty;
            try
            {
               
                    strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
                
                osession = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PC, null, null, 0);
                oparticipant = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
                oSessionCallControl = (IRTCSessionCallControl)(osession);
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "Connect()", "RTCAudio.cs");                 
            }

        }
Example #10
0
 public void Connect(string number)
 {
     try
     {
         string strRemoteURI;
         if (number.Contains("@"))
         {
             strRemoteURI = "SIP:" + number;
         }
         else
         {
             strRemoteURI = "SIP:" + number + "@" + SIPCredentials.SIPServer;
         }
         //oclient.LocalUserURI = SIPCredentials.SIPNumber + "@" + SIPCredentials.SIPServer;
         //oclient.LocalUserName = SIPCredentials.SIPNumber;
         osession = oclient.CreateSession(RTC_SESSION_TYPE.RTCST_PC_TO_PHONE, null, null, 0);
         oparticipant = osession.AddParticipant(strRemoteURI, SIPCredentials.SIPNumber);
         oSessionCallControl = (IRTCSessionCallControl)(osession);
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "", "Audio\\Audio.Business\\RTCAudio.cs");
     }
 }