private InteractionState getInteractionState(SwitchInteractionState state)
        {
            InteractionState result = InteractionState.Active;

            switch (state)
            {
            case SwitchInteractionState.Waiting:
            case SwitchInteractionState.Completed:
            case SwitchInteractionState.Queued:

                break;

            case SwitchInteractionState.Active:
                result = InteractionState.Active;
                break;

            case SwitchInteractionState.Held:
                result = InteractionState.Held;
                break;

            case SwitchInteractionState.Conferenced:
                result = InteractionState.Conferenced;
                break;

            case SwitchInteractionState.Consulting:
                result = InteractionState.Consulting;
                break;

            case SwitchInteractionState.Disconnected:
                result = InteractionState.Disconnected;
                break;

            case SwitchInteractionState.Offered:
                result = InteractionState.Ringing;
                break;

            case SwitchInteractionState.RingingOut:
                result = InteractionState.RingingOut;
                break;

            default:
                throw new InvalidEnumArgumentException();
            }

            return(result);
        }
示例#2
0
 private void notifyInteractionState(CtiServiceSwitch @switch, SwitchInteraction interaction, SwitchInteractionState state)
 {
     interaction.State = state;
     @switch.SendMessage(interaction.Agent.Device, new InteractionMessage {
         Interaction = interaction,
         Action      = InteractionMessageAction.StateChanged
     });
 }