none
Timeout on PersistenChatEndpoint Establish - for application endpoint only RRS feed

  • Question

  • Hi there,

    I have some PChat code, where up until now I have been using a UserEndpoint to establish the PersistentChatEndpoint. This works fine.

    I've just changed this so that an Application Endpoint does the establish, and the EndEstablish throws a Timeout Exception:

    Microsoft.Rtc.Signaling.OperationTimeoutException:This operation has timed out.
       at Microsoft.Rtc.Collaboration.PersistentChat.Internal.AsyncResultNoResult.EndInvoke(Int32 millisecondsTimeout)
       at Microsoft.Rtc.Collaboration.PersistentChat.PersistentChatEndpoint.EndEstablish(IAsyncResult asyncResult)
       at XXXXX.Repositories.ChatRoomManagement.UMCAPChatRoomManagement.<ConnectToRoomAndGetSession>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at XXXXX.ChatRoomManagement.UMCAPChatRoomManagement.<GetChatRoom>d__14.MoveNext()
    Detected at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Microsoft.Rtc.Signaling.RealTimeException..ctor(String message, Exception innerException)
       at Microsoft.Rtc.Signaling.SipInviteAsyncResult.InviteTimer_Expired(Object sender, EventArgs e)
       at Microsoft.Rtc.Signaling.QueueWorkItemState.ExecuteWrappedMethod(WaitCallback method, Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()

    I'm fairly confident that there is nothing wrong with the Application Endpoint - after all I'm using it to create the User Endpoints which work fine!

    Is there anything which I should know? Should you be able to establish PersistenChatEndpoints with Application Endpoints? Are any settings required to be set anywhere in Lync to make this happen? Why would it work with a User Endpoint, but not with an Application one?

    Any help much appreciated!

    thanks,

    -tom


    Tom Morgan Developing Lync



    Thursday, May 29, 2014 8:45 AM

Answers

  • Yeah I think you're right. Tracing shows this error (heavily edited):

    SIP/2.0 486 Busy Here
    FROM: "PChat Test"<sip:pchattest@XXXXX.com>
    TO: <sip:GC-1-PersistentChatService-xx@XXXXX.com
    RETRY-AFTER: 300
    SERVER: RTCC/5.0.0.0 PCS/5.0.8308.420
    ms-diagnostics: 20010;source="xxxxxx";reason="User rejected from the chat server due to provisioning of the user";component="PersistentChat"

    It's bad because of the way the PChat SDK is written. The PersistentChatEndpoint constructor takes a Microsoft.Rtc.Collaboration.LocalEndpoint as a parameter - meaning you can legitimatly pass through an application endpoint. Really, it should force a UserEndpoint if that's the only type of endpoint that PChat can accept.

    Any way the SDK can be updated?


    Tom Morgan Developing Lync

    • Marked as answer by Tom Morgan UK Tuesday, June 17, 2014 1:55 PM
    Tuesday, June 17, 2014 1:55 PM

All replies

  • I'm not sure if PChat is designed to work with an app endpoint.

    S4/Pchat tracing may show what is occurring.

    Saturday, June 14, 2014 5:24 AM
  • Yeah I think you're right. Tracing shows this error (heavily edited):

    SIP/2.0 486 Busy Here
    FROM: "PChat Test"<sip:pchattest@XXXXX.com>
    TO: <sip:GC-1-PersistentChatService-xx@XXXXX.com
    RETRY-AFTER: 300
    SERVER: RTCC/5.0.0.0 PCS/5.0.8308.420
    ms-diagnostics: 20010;source="xxxxxx";reason="User rejected from the chat server due to provisioning of the user";component="PersistentChat"

    It's bad because of the way the PChat SDK is written. The PersistentChatEndpoint constructor takes a Microsoft.Rtc.Collaboration.LocalEndpoint as a parameter - meaning you can legitimatly pass through an application endpoint. Really, it should force a UserEndpoint if that's the only type of endpoint that PChat can accept.

    Any way the SDK can be updated?


    Tom Morgan Developing Lync

    • Marked as answer by Tom Morgan UK Tuesday, June 17, 2014 1:55 PM
    Tuesday, June 17, 2014 1:55 PM