Author Topic: Get IInteractionVoice having IInteraction  (Read 3582 times)

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Get IInteractionVoice having IInteraction
« on: January 27, 2015, 06:17:34 AM »
I have IInteraction interaction = Model.Interaction; But what I need is information from IInteractionVoice. For example I need AttributeCallType, AttributeUserData. How do I extract that from IInteraction? I know its in, as while debugging in immediate window I type "?interaction" I see its there, but how to save it to string on run time? Thanks.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Get IInteractionVoice having IInteraction
« Reply #1 on: January 27, 2015, 09:54:22 AM »
You can get requested information (callType, userData, etc) from IInteraction object - so you do not need IInteractionVoice object type.

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Re: Get IInteractionVoice having IInteraction
« Reply #2 on: January 27, 2015, 10:13:50 AM »
How to do that? Tank you.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Get IInteractionVoice having IInteraction
« Reply #3 on: January 27, 2015, 10:35:53 AM »
When you check namespace genesyslab.desktop.modules.core.model.interactions you will see which methods and properties this calls has.

There are methods like:
[list]
[li]GetAllAttachedData[/li]
[li]GetIWCallType[/li]
[/list]

or properties like:
[list]
[li]UserData[/li]
[li]Type[/li]
[/list]

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Re: Get IInteractionVoice having IInteraction
« Reply #4 on: January 28, 2015, 08:02:45 AM »
Can please give me an example line how to retrieve AttributeCallType and AttributeUserData? While having IInteraction interaction = Model.Interaction; Thanks.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Get IInteractionVoice having IInteraction
« Reply #5 on: January 28, 2015, 09:44:30 AM »
Little bit more effort,man :)

[code]string callType = interaction.Type;
            IDictionary<string, object> userData = interaction.UserData;
            KeyValueCollection attachedData = interaction.GetAllAttachedData();[/code]

Offline innspiron

  • Newbie
  • *
  • Posts: 10
  • Karma: -1
Re: Get IInteractionVoice having IInteraction
« Reply #6 on: January 28, 2015, 11:14:22 AM »
Sorry, man. Now I get it. All good. Thanks  :)