0

Say I have a user on OCS who represents my application endpoint, and I try to message them from a web application locally (I built on top of the BasicIMCall sample application), and at some point they close the chat window, how do I resume the InstantMessagingCall? I have looked all over the web for the answer but I can't figure it out. Once the user closes the window, the call state becomes Terminated. How do I recover the call along with its call history and continue or restart the terminated conversation?

4

2 回答 2

1

如果他们关闭了与您的聊天,将收到一个事件状态,告诉您状态已终止。这取决于你当时想做什么。

如果您想再次与他交谈,BeginEstablish则需要再次交谈InstantMessagingCall。然后他需要在他身边接受你才能再次聊天。

于 2012-02-01T20:08:57.403 回答
0

为传入的 IM 呼叫注册呼叫状态更改事件:

call.StateChanged +=new EventHandler<CallStateChangedEventArgs>(call_StateChanged);

此外,您可以获得呼叫状态,当它终止时,您可以发起新呼叫:

protected void call_StateChanged(object sender, CallStateChangedEventArgs e)
        {

              if (e.State == CallState.Terminated)
                {
                     //Initiate new call again
                }

         }

要恢复通话记录,我认为您必须存储以前对话的记录。

于 2012-05-03T07:42:25.850 回答