Author Topic: Get custom view on voice event  (Read 3102 times)

Offline asfmDPTE

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Get custom view on voice event
« on: February 25, 2016, 12:28:15 PM »
Hi!

I'm facing troubles when getting a custom view, defined previously and linked in the initialize method off the module.
I get in the right way when I call another extension, but, I get errors when I receive a call in the WDE.

[code]
InteractionVoiceToolbarView toolbarView = interaction.UserData["InteractionView"] as IInteractionVoiceToolbarView; // get a ref to some view we see on the screen
            IDictionary<string, object> contextDictionary = (toolbarView.Context as IDictionary<string, object>); // turn its Context into a dictionary
            object caseViewObject;
            if (contextDictionary.TryGetValue("CaseView", out caseViewObject))
            {
                ICaseView caseView = caseViewObject as ICaseView;
                CustomView v = (CustomView)viewManager.GetViewInRegion(caseView, "InteractionWorksheetRegion", "InteractionForm");[/code]

The problem I have is that when an incoming call is received in the WDE, InteractionVoiceToolbarView toolbarView is null.

Thanks.

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: Get custom view on voice event
« Reply #1 on: March 03, 2016, 11:10:40 AM »
Wich event are you using to retrieve this view?

Maybe on the time of this event the view is nulll, and you have to try it later.

Regards.

Offline asfmDPTE

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Get custom view on voice event
« Reply #2 on: March 03, 2016, 11:56:57 AM »
I'm recovering the view in the EventEstablished event. It works fine on outgoing calls made from the WDE, but it fails when an incoming call arrives.
A little weird thing.

qtalal

  • Guest
Re: Get custom view on voice event
« Reply #3 on: November 08, 2016, 10:17:52 AM »
hi, Did you manage to fix this?

[quote author=asfmDPTE link=topic=9382.msg42371#msg42371 date=1456403295]
Hi!

I'm facing troubles when getting a custom view, defined previously and linked in the initialize method off the module.
I get in the right way when I call another extension, but, I get errors when I receive a call in the WDE.

[code]
InteractionVoiceToolbarView toolbarView = interaction.UserData["InteractionView"] as IInteractionVoiceToolbarView; // get a ref to some view we see on the screen
            IDictionary<string, object> contextDictionary = (toolbarView.Context as IDictionary<string, object>); // turn its Context into a dictionary
            object caseViewObject;
            if (contextDictionary.TryGetValue("CaseView", out caseViewObject))
            {
                ICaseView caseView = caseViewObject as ICaseView;
                CustomView v = (CustomView)viewManager.GetViewInRegion(caseView, "InteractionWorksheetRegion", "InteractionForm");[/code]

The problem I have is that when an incoming call is received in the WDE, InteractionVoiceToolbarView toolbarView is null.

Thanks.
[/quote]