本文整理汇总了C#中IService.svcAddSIPUser方法的典型用法代码示例。如果您正苦于以下问题:C# IService.svcAddSIPUser方法的具体用法?C# IService.svcAddSIPUser怎么用?C# IService.svcAddSIPUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IService
的用法示例。
在下文中一共展示了IService.svcAddSIPUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FncRegister
public void FncRegister(object sender, VMuktiEventArgs e)
{
try
{
DataSet da = new DataSet();
if (VMuktiAPI.VMuktiInfo.strExternalPBX == "true")
{
try
{
//MessageBox.show("Sip Number is: " + e._args[0].ToString() + "and Sip server is: " + e._args[2].ToString());
if (blIsVista)
{
ClientNetP2PRTCVistaChannel.svcRegisterSIPPhone(e._args[0].ToString(), e._args[1].ToString(), e._args[2].ToString());
}
else
{
RClient = new RTCClient(e._args[0].ToString(), e._args[1].ToString(), e._args[2].ToString());
RClient.entstatus += new RTCClient.delStatus(RClient_entstatus);
RClient.NonHumanDetected += OnNonHumanDetected;
}
lblUserNumber.Content = e._args[0].ToString() + "@" + e._args[2].ToString();
}
catch (Exception ex)
{
VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncRegister()--1", "ctlDialer.xaml.cs");
}
}
else
{
//SNChannel = (IService)bhcSuperNode.OpenClient<IService>("http://210.211.254.132:80/SNService");
//string strSIPNumber = "2118";
///string strSIPServerIP = "210.211.254.132";
string strSIPNumber = "";
if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
{
VMuktiService.BasicHttpClient bhcSuperNode = new VMuktiService.BasicHttpClient();
SNChannel = (IService)bhcSuperNode.OpenClient<IService>("http://" + VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
strSIPServer = VMuktiInfo.CurrentPeer.SuperNodeIP;
strSIPNumber = SNChannel.svcAddSIPUser();
}
else
{
strSIPNumber = FncAddSIPUser();
strSIPServer = VMuktiAPI.VMuktiInfo.CurrentPeer.CurrentMachineIP.ToString();
}
if (blIsVista)
{
ClientNetP2PRTCVistaChannel.svcRegisterSIPPhone(strSIPNumber, strSIPNumber, strSIPServer);
}
else
{
RClient = new RTCClient(strSIPNumber, strSIPNumber, strSIPServer);
RClient.entstatus += new RTCClient.delStatus(RClient_entstatus);
RClient.NonHumanDetected += OnNonHumanDetected;
}
lblUserNumber.Content = strSIPNumber + "@" + strSIPServer;
}
}
catch (Exception ex)
{
VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncRegister()--2", "ctlDialer.xaml.cs");
}
}
示例2: bwRegisterSIPUser_DoWork
void bwRegisterSIPUser_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
try
{
TimeCounterCollection = new Hashtable();
for (int i = 0; i < 6; i++)
{
TimeCounterCollection.Add(i, "0:00:00");
}
VMuktiService.BasicHttpClient bhcSuperNode = new VMuktiService.BasicHttpClient();
SNChannel = (IService)bhcSuperNode.OpenClient<IService>("http://" + VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNService");
//**creating Supernode channel for SIP Numbers and SIP Conferencees
string strSIPServerIP = VMuktiInfo.CurrentPeer.SuperNodeIP;
string strSIPNumber = SNChannel.svcAddSIPUser();
strSoftPhoneSIPNumber = strSIPNumber;
strSoftPhoneSIPPassword = strSIPNumber;
strSoftPhoneSIPServer = strSIPServerIP;
}
catch (Exception ex)
{
VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncRegister()", "Audio\\ctlDialer.xaml.cs");
}
}
示例3: FncRegister
public void FncRegister(object sender, VMuktiEventArgs e)
{
try
{
if (VMuktiAPI.VMuktiInfo.strExternalPBX == "true")
{
try
{
RClient = new RTCClient(e._args[0].ToString(), e._args[1].ToString(), e._args[2].ToString());
lblUserNumber.Content = e._args[0].ToString() + "@" + e._args[2].ToString();
RClient.entstatus += new RTCClient.delStatus(RClient_entstatus);
RClient.NonHumanDetected += OnNonHumanDetected;
}
catch (Exception ex)
{
VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncRegister()--1", "ctlDialer.xaml.cs");
}
}
else
{
string strSIPNumber = "";
if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
{
VMuktiService.BasicHttpClient bhcSuperNode = new VMuktiService.BasicHttpClient();
SNChannelPredictive = (IService)bhcSuperNode.OpenClient<IService>("http://" + VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP + ":80/SNServicePredictive");
strSIPServerIP = VMuktiInfo.CurrentPeer.SuperNodeIP;
strSIPNumber = SNChannelPredictive.svcAddSIPUser();
}
else
{
strSIPNumber = FncAddSIPUser();
strSIPServerIP = VMuktiAPI.VMuktiInfo.CurrentPeer.CurrentMachineIP.ToString();
}
VMuktiHelper.CallEvent("SetAgentNumber", this, new VMuktiEventArgs(strSIPNumber, strSIPNumber, strSIPServerIP));
RClient = new RTCClient(strSIPNumber, strSIPNumber, strSIPServerIP);
lblUserNumber.Content = strSIPNumber + "@" + strSIPServerIP;
RClient.entstatus += new RTCClient.delStatus(RClient_entstatus);
RClient.NonHumanDetected += OnNonHumanDetected;
}
}
catch (Exception ex)
{
VMuktiHelper.ExceptionHandler(ex, "FncRegister()", "ctlPredictivePhone.xaml.cs");
}
}