Genesys CTI User Forum > Genesys-related Development

Request Query Call Error

(1/3) > >>

jkaewprateep:
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;
                }

cavagnaro:
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

jkaewprateep:
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;
                }

cavagnaro:
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?

jkaewprateep:
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

Navigation

[0] Message Index

[#] Next page

Go to full version