Author Topic: How to get the number of the caller in IW(C#)  (Read 8127 times)

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
How to get the number of the caller in IW(C#)
« on: May 14, 2014, 03:07:00 AM »
[b]Hello [/b]:)
please tell me how to get the caller's phone number? I need to develop functionality for registering callers (extended set of fields, and options). And the same remains to be done by email.
I can not find examples in the network so little information...maybe anyone have examples

[i]I understand that the questions are simple and stupid, but I'm a novice, I apologize ...[/i]

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to get the number of the caller in IW(C#)
« Reply #1 on: May 14, 2014, 04:41:45 AM »
And what is not clear for you? Is your modul visible or do you want to make it through the commands? Show your current code and we can help you with it. DO not see any reason for doing this on clientapp level, but you of course have a practical need for that model. Because there are lot of any components/solution which stores call center information about each interaction.

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: How to get the number of the caller in IW(C#)
« Reply #2 on: May 14, 2014, 06:33:24 AM »
Module visible, it will work with the operator. In the standard tab "contacts" (by the way, how to hide it?) required no additional fields and functionality (there are several integrations). I need for an incoming call\email get a number\address of the applicant and further work with him.
Code I do not have, because I can not understand where to start  :(
I hope clearly explained very hope for your help!

it should look something like this:
[URL=http://radikal.ru/fp/9f54bdd99d89407f885486e6887acaf3][IMG]http://i057.radikal.ru/1405/3b/14ef7a0c5972t.jpg[/img][/URL]
« Last Edit: May 14, 2014, 06:38:52 AM by GnomE »

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to get the number of the caller in IW(C#)
« Reply #3 on: May 14, 2014, 06:43:53 AM »
I think that you can disable it through the roles in GA (or GAX).

First step which I would strongly recommend is read the developer guide for IWS and install IWS Samples, where you can find some examples of most common "modules" types within IWS. One of this is "custom" panel (like panel with contacts which you have mentioned). From this sample you should be able to understand how it works (you need knowledge of WPF,MVVM pattern and DI/IoC) and you can modify that code as you need. If you will have some problems with it, feel free to ask here.

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: How to get the number of the caller in IW(C#)
« Reply #4 on: May 14, 2014, 08:29:53 AM »
I was watching examples, and what you see on the screenshot, it's my panel that I created based on examples. If I understand correctly, to get the number or address of the applicant, I have inherited from some interface, right? The question from what exactly and how to do it correctly? I watched at the instructions but did not see anything there, please tell me, or give direction.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to get the number of the caller in IW(C#)
« Reply #5 on: May 15, 2014, 01:42:08 PM »
Direction -> dev guide, SDK help and at least you can check requested library like a Genesys.Desktop.Modules.Voice. etc.

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: How to get the number of the caller in IW(C#)
« Reply #6 on: May 20, 2014, 11:23:40 AM »
The fact that possible get the phone from the interface IInteractionVoice I understood from the API. Inherit my class from the interface
[code]class CallerInfoModel : ICallerInfoModel, INotifyPropertyChanged, IInteractionVoice[/code]
I receive an error
[code]The type or namespace name 'IChainRecord' does not exist in the namespace 'Genesyslab.Enterprise.Model.Interaction'[/code]
I can not understand where to find IChainRecord
How to get a phone, I can not understand. Please prompt I'm at an impasse....  :'(
[code]public string PhoneNumber
        {
            get { throw new System.NotImplementedException(); }
        }[/code]
here we need to write the logic to get the caller's number, right? write and what I do not understand
Read about the technologies that you wrote, looked manual .... I can not find an example of receipt.

[i]Read all manual was hard for me, it is in English. some fragments of the examples easier  :-\[/i]

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to get the number of the caller in IW(C#)
« Reply #7 on: May 20, 2014, 11:36:00 AM »
You do not understand DI/IoC principle, which are used within IWS. I really suggest to read dev guide carefully - there you can find description of processes and mechanism using in IWS (page nr.5 for example).

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: How to get the number of the caller in IW(C#)
« Reply #8 on: May 22, 2014, 09:56:43 AM »
Thanks for another hint!
Tell me please, I can not understand where I need to initialize the variable IInteractionVoice that it was not empty? Or do I need still some event to intercept?
I tried two ways:
[code]        public void Create()
        {
            Model.Case = (Context as IDictionary<string, object>).TryGetValue("Case") as ICase;
            //Model.InteractionVoice = (Context as IDictionary<string, object>).TryGetValue("InteractionVoice") as IInteractionVoice;
            Model.InteractionVoice = container.Resolve<IInteractionVoice>();

            viewEventManager.Subscribe(ActionEventHandler);
        }[/code]
this event IView button to display my module. And tried to model constructor:
[code]        readonly IObjectContainer container;

        public CallerInfoModel(IObjectContainer container)
        {
            this.container = container;
            IInteractionVoice interactionVoice = container.Resolve<IInteractionVoice>();
        }[/code]

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How to get the number of the caller in IW(C#)
« Reply #9 on: May 26, 2014, 01:26:52 PM »
I am using the second way - through the constructor.

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: How to get the number of the caller in IW(C#)
« Reply #10 on: May 28, 2014, 03:38:32 AM »
As I said it was impossible to initialize. I was told how to do it:
[code]//IView Members
        public object Context { get; set; }
        public void Create()
        {
            Model.Case = (Context as IDictionary<string, object>).TryGetValue("Case") as ICase;
            if (Model.Case != null)
            {
                if (Model.Case.MainInteraction != null)
                {
                    if (Model.Case.MainInteraction is IInteractionVoice)
                    {
                        Model.InteractionVoice = Model.Case.MainInteraction as IInteractionVoice;
                        //MessageBox.Show(Model.InteractionVoice.PhoneNumber);
                    }
                    else if (Model.Case.MainInteraction is IInteractionInboundEmail)
                    {
                        Model.InteractionInboundEmail = Model.Case.MainInteraction as IInteractionInboundEmail;
                        //MessageBox.Show(Model.InteractionInboundEmail.EntrepriseEmailInteractionCurrent.From);
                    }
                }
            }         
        }[/code]
I hope it will be useful to someone...

Offline GnomE

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: How to get the number of the caller in IW(C#)
« Reply #11 on: May 28, 2014, 11:46:09 AM »
[quote author=Kubig link=topic=8334.msg36744#msg36744 date=1401251932]
Do not see any reason for doing this like that, but if is enough for you and you are happy with it, it is done.
[/quote]
I'm not experienced in this topic, if it's a bad version, please tell us what exactly? And how to make it better?
Thanks in advance!