Author Topic: Request Query Call Error  (Read 10420 times)

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Request Query Call Error
« on: April 05, 2019, 06:06:05 PM »
I try to query call from T-server, I am able to open connection to T-server but when I do query call it return event error. Error Message = "Invalid connection id" What is wrong?

                tserverConfig = new Genesyslab.Platform.Commons.Connection.Configuration.PropertyConfiguration();
                tserverConfig.UseAddp = true;
                tserverConfig.AddpServerTimeout = 10;
                tserverConfig.AddpClientTimeout = 10;
                tserverConfig.AddpTrace = "both";

                tserverEndpoint = new Genesyslab.Platform.Commons.Protocols.Endpoint("T-Server", TServerHost, TServerPort, tserverConfig);
                tserverProtocol = new Genesyslab.Platform.Voice.Protocols.TServerProtocol(tserverEndpoint);

                //tserverConfig.IsLoggerInitialized
                tserverProtocol.Open();

                tserverProtocol.Received += TserverProtocol_Received;

                Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall requestQueryCall =
                    Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall.Create();

                Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent = tserverProtocol.Request(requestQueryCall);

                switch (respondingEvent.Id)
                {
                    case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventError.MessageId:    <-------- Here it goes to
                        break;
                    default:
                        break;
                }
« Last Edit: April 05, 2019, 06:36:39 PM by jkaewprateep »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Request Query Call Error
« Reply #1 on: April 05, 2019, 08:54:28 PM »
There are a set of mandatory parameters for a Query. You are querying in theory about a specific call and it needs to be identified by a ConnID. Where is it?


Enviado de meu SM-G9650 usando o Tapatalk


Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: Request Query Call Error
« Reply #2 on: April 06, 2019, 12:35:48 AM »
The method is allow to call without the CONID parameter but I also tried with CONID but result is same

                tserverConfig = new Genesyslab.Platform.Commons.Connection.Configuration.PropertyConfiguration();
                tserverConfig.UseAddp = true;
                tserverConfig.AddpServerTimeout = 10;
                tserverConfig.AddpClientTimeout = 10;
                tserverConfig.AddpTrace = "both";

                tserverEndpoint = new Genesyslab.Platform.Commons.Protocols.Endpoint("T-Server", TServerHost, TServerPort, tserverConfig);
                tserverProtocol = new Genesyslab.Platform.Voice.Protocols.TServerProtocol(tserverEndpoint);

                //tserverConfig.IsLoggerInitialized
                tserverProtocol.Open();

                tserverProtocol.Received += TserverProtocol_Received;

                Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryServer requestQueryServer =
                    Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryServer.Create();

                Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent0 = tserverProtocol.Request(requestQueryServer);

                Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall requestQueryCall =
                Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall.Create("5115",
                ((Genesyslab.Platform.Voice.Protocols.TServer.Events.EventServerInfo)respondingEvent0).ConnID, Genesyslab.Platform.Voice.Protocols.TServer.CallInfoType.StatusQuery);
                //Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryCall.Create();

                Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent = tserverProtocol.Request(requestQueryCall);

                switch (respondingEvent.Id)
                {
                    case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventError.MessageId:
                        break;
                    case Genesyslab.Platform.Voice.Protocols.TServer.Events.EventPartyInfo.MessageId:
                        break;
                    default:
                        break;
                }

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Request Query Call Error
« Reply #3 on: April 06, 2019, 12:45:03 AM »
From where do you get that you can Query a call without ConnID?



Requests the information specified by info_type about the telephony object specified by conn_id. If the query type is supported, the requested information will be returned in EventPartyInfo.


You are still querying without listening to an event which would provide the ConnID, Ringing for example.


What are you trying to achieve?

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: Request Query Call Error
« Reply #4 on: April 06, 2019, 01:52:37 AM »
Hi Cavanaro, I tried to get the current call in system. Is there anyway to do that? I search all the documents and Internet but not found the solution.

Thanks

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Request Query Call Error
« Reply #5 on: April 06, 2019, 02:12:39 AM »
Well for that you do a Register on the current DN and listen to all events.
When you do a Register, TServer will inform the current State of that DN, which could be a call.

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: Request Query Call Error
« Reply #6 on: April 06, 2019, 03:07:51 AM »
Is there any way to select existing call from the system? because I tried to do the web service that will add business data into some calls that requested by web service. I am avoiding to create another program to monitoring all call.

[b]Question:[/b]
1. Is there anyway to retrieve existing call from system?
2. The program that I tried to do is a web service program and avoid to create another program to monitoring calls in the system. Is there anyway to do this task to this task?

Thanks

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Request Query Call Error
« Reply #7 on: April 06, 2019, 03:22:46 AM »
That depends... Question is for what...
You have Infomart which already has all information about all calls in the system past and present, so you could query them.
But if you want to interact then short answer is no, unless you have a ConnID you can't get info from a DN by querying TServer.


Enviado de meu SM-G9650 usando o Tapatalk


Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: Request Query Call Error
« Reply #8 on: April 06, 2019, 03:38:19 AM »
Is there any additional configuration need for call established event and call ringing event? Rightnow I am able to receive the linkconneted event but after that there is no other event come to my program.

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: Request Query Call Error
« Reply #9 on: April 13, 2019, 05:16:03 PM »
I use this instead

Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryAddress requestQueryAddress =
                    Genesyslab.Platform.Voice.Protocols.TServer.Requests.Queries.RequestQueryAddress.Create("7012", Genesyslab.Platform.Voice.Protocols.TServer.AddressType.DN,
                    Genesyslab.Platform.Voice.Protocols.TServer.AddressInfoType.CallsQuery);

                Genesyslab.Platform.Commons.Protocols.IMessage respondingEvent1 = tserverProtocol.Request(requestQueryAddress);

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: Request Query Call Error
« Reply #10 on: April 14, 2019, 05:40:40 PM »
You would need a RequestRegisterAddress and an Event Handler for the asynchronous messages received