PureEngage On-Premises

 View Only

Sign Up

  • 1.  IWS Voice Channel EventRinging

    Posted 12-08-2015 14:23
    I am trying to customize some things in IWS and would like to tap into the various channels in order to present the user with some popup messages. I would like to listen for events like EventRinging so that I can trigger my popup based upon that event. I have done similar things outside of IWS with the platform sdk.
    I would like to know if there is a way to just listen for events coming into IWS without having to use the lower level APIs to connect to the servers. IWS already has all of the conneciton information and I just want to peek at the events. I cannot find anything in the documentation that gives a clear explaination of whether this is possible or not, and no examples are available.

    Any help would be appreciated.


  • 2.  RE: IWS Voice Channel EventRinging

    Posted 12-08-2015 17:48
    Hello Lonnie,

    You do not have connect to the any server, just use the commands and execute your code before/after this command, which is related to required action (Ringing in your case). All is described in available documentation very well, so try to follow the docs.

    Regards,
    --Jakub--


  • 3.  RE: IWS Voice Channel EventRinging

    Posted 12-10-2015 08:44
    There are a few ways to do this,  I normally use the IInteractionManager.


    private readonly IInteractionManager interactionManager = null;
    ...
    ...

    interactionManager = ContainerAccessPoint.Container.Resolve<IInteractionManager>();

    interactionManager.InteractionEvent += new EventHandler<EventArgs<IInteraction>>(eventHandler_InteractionEvent);
                interactionManager.InteractionCreated += new EventHandler<EventArgs<IInteraction>>(interactionManager__InteractionCreated);
                interactionManager.InteractionClosed += new EventHandler<EventArgs<IInteraction>>(eventHandler_InteractionClosed);
    ..
    ..
    ..

            /// <summary>
            /// Event handler for all Interaction events.
            /// </summary>
            public void eventHandler_InteractionEvent(object sender, EventArgs<IInteraction> e)
            {
                try
                {
                    IInteractionVoice interaction = e.Value as IInteractionVoice;

                    if (interaction == null)
                    {
                        log.Info(log_text + "Interaction Is NULL");
                        return;
                    }

    IMessage eventMsg = interaction.EntrepriseLastInteractionEvent;
                    if (eventMsg != null)
                    {