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

Offline jkaewprateep

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Request Query Call Error
« on: April 06, 2019, 03:06:05 AM »
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 06, 2019, 03:36:39 AM by jkaewprateep »
เด็กเอ๋ยเด็กดีนั้นมีหน้าที่สิบอย่างด้วยกัน

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7622
  • Karma: 56330
Re: Request Query Call Error
« Reply #1 on: April 06, 2019, 05:54:28 AM »
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, 09: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: 7622
  • Karma: 56330
Re: Request Query Call Error
« Reply #3 on: April 06, 2019, 09: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, 10: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: 7622
  • Karma: 56330
Re: Request Query Call Error
« Reply #5 on: April 06, 2019, 11: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, 12:07:51 PM »
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.

Question:
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: 7622
  • Karma: 56330
Re: Request Query Call Error
« Reply #7 on: April 06, 2019, 12:22:46 PM »
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, 12:38:19 PM »
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 14, 2019, 02:16:03 AM »
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: 539
  • Karma: 29
Re: Request Query Call Error
« Reply #10 on: April 15, 2019, 02:40:40 AM »
You would need a RequestRegisterAddress and an Event Handler for the asynchronous messages received