0

我正在为 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

为什么我突然没有授权?

4

1 回答 1

0

我觉得你越来越糊涂了。

UCMA 应用程序创建和服务 sip 端点。sip 端点就像一个“电话”,它可以拨打和接收音频/视频呼叫、IM 等。

UCMA 应用程序可以创建两种类型的端点:

这两种类型的端点都是 Lync 中预定义的用户类型。

SIP 端点需要向 sip 注册器(Lync 前端)注册,这就像将电话插入墙上一样。上面写着我在这里,如果你接到任何要“X”的电话,请按我的方式发送。

因此,您所做的是尝试使用本地 Lync 前端“注册”一个名为“name.surname(gmail.com)@msn.com”的 sip 端点。这是非法的,这就是您收到“Microsoft.Rtc.Signaling.RegisterException”错误的原因。

您可能想要做的是注册“本地”Lync 用户,然后“拨打”联合帐户或让联合帐户拨打您的电话。

于 2016-05-31T22:39:32.460 回答