我正在为 Skype for Business 使用 Microsoft UCMA 4.0 API QuickStart App AudioVideo Recorder。当我从组织内部呼叫用户时,我可以联系并录制语音。我们与外部 Skype 用户联合。当我尝试拨打外部 sip name.surname(gmail.com)@msn.com 时,我得到了例外:
An exception of type 'Microsoft.Rtc.Signaling.RegisterException' occurred in Microsoft.Rtc.Collaboration.dll but was not handled in user code
Additional information: The endpoint was unable to register. See the ErrorCode for specific reason.
这是程序:
private void EndEndpointEstablish(IAsyncResult ar)
{
LocalEndpoint currentEndpoint = ar.AsyncState as LocalEndpoint;
try
{
currentEndpoint.EndEstablish(ar);
}
catch (AuthenticationException authEx)
{
// AuthenticationException will be thrown when the credentials are invalid.
Console.WriteLine(authEx.Message);
throw;
}
catch (ConnectionFailureException connFailEx)
{
// ConnectionFailureException will be thrown when the endpoint cannot connect to the server, or the credentials are invalid.
Console.WriteLine(connFailEx.Message);
throw;
}
catch (InvalidOperationException iOpEx)
{
// InvalidOperationException will be thrown when the endpoint is not in a valid state to connect. To connect, the platform must be started and the Endpoint Idle.
Console.WriteLine(iOpEx.Message);
throw;
}
finally
{
// Again, just for sync. reasons.
_endpointInitCompletedEvent.Set();
}
}
我们如何接触外部用户?
几个小时后尝试第二次调用内部用户,但它不工作。现在收到消息:
An exception of type 'Microsoft.Rtc.Signaling.AuthenticationException' occurred in RecorderSample.exe but was not handled in user code
Additional information: Not authorized to perform the requested operation, request is refused
为什么我突然没有授权?