Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: jkaewprateep 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;
}
-
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
-
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;
}
-
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?
-
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
-
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.
-
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
-
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
-
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.
-
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);
-
You would need a RequestRegisterAddress and an Event Handler for the asynchronous messages received