コード例 #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");
     }
 }
コード例 #2
0
ファイル: RTCAudio.cs プロジェクト: xiaoliukai/VMukti
 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");
     }
 }
コード例 #3
0
ファイル: RTCAudio.cs プロジェクト: xiaoliukai/VMukti
 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");
     }
 }
コード例 #4
0
ファイル: RTCAudio.cs プロジェクト: xiaoliukai/VMukti
 public void fncAnser()
 {
     try
     {
         if (osession != null)
         {
             osession.Answer();
             oSessionCallControl = (IRTCSessionCallControl)(osession);
         }
     }
     catch (Exception ex)
     {
         VMuktiHelper.ExceptionHandler(ex, "fncAnser()", "RTCAudio.cs");
     }
 }
コード例 #5
0
ファイル: RTCAudio.cs プロジェクト: xiaoliukai/VMukti
        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");
            }
        }
コード例 #6
0
ファイル: RTCAudio.cs プロジェクト: jiangguang5201314/VMukti
 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");
     }
 }
コード例 #7
0
ファイル: RTCAudio.cs プロジェクト: jiangguang5201314/VMukti
 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");
     }
 }
コード例 #8
0
ファイル: RTCAudio.cs プロジェクト: jiangguang5201314/VMukti
        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");                 
            }

        }
コード例 #9
0
ファイル: RTCAudio.cs プロジェクト: jiangguang5201314/VMukti
 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");
     }
 }
コード例 #10
0
ファイル: RTCAudio.cs プロジェクト: jiangguang5201314/VMukti
        public void fncAnser()
        {
            try
            {
                if (osession != null)
                {
                    osession.Answer();
                    oSessionCallControl = (IRTCSessionCallControl)(osession);
                }
            }
            catch (Exception ex)
            {
                VMuktiHelper.ExceptionHandler(ex, "fncAnser()", "RTCAudio.cs");
            }

        }