We are developing an application,whenever we dial from application we are able to connect to other person successfully until when the caller doesn't lift and disconnected or ignore the call how do we find the call state whether it is disconnected,connected,ignored. We have tried
conversation state changed
void Conversation_StateChanged(object sender, ConversationStateChangedEventArgs e)
{
if (_Conversation.State == ConversationState.Terminated)
{
MessageBox.Show("Terminated....");
}
}
audiovideo Modality state changed
void _AVModality_ModalityStateChanged(object sender, ModalityStateChangedEventArgs e)
{
switch (e.NewState)
{
case ModalityState.Connected:
MessageBox.Show("Connected.");
break;
case ModalityState.Connecting:
MessageBox.Show("Connecting.");
break;
case ModalityState.ConnectingToCaller:
MessageBox.Show("ConnectingToCaller.");
break;
case ModalityState.Disconnected:
MessageBox.Show("Disconnected.");
break;
case ModalityState.Invalid:
MessageBox.Show("Invalid.");
break;
case ModalityState.Notified:
MessageBox.Show("Notified.");
break;
case ModalityState.Suspended:
MessageBox.Show("Suspended.");
break;
}
}
When we are using modality state changed event we able to get "connecting" and connected but when call is ignored or disconnected those are not firing and same also when conversation state changed. We are able to find the call state in the ucma application but we are unable to find the outgoing call state. Any suggestions is much appreciated.