" /> Established? RequestQueryCall + CallInfoType.StatusQuery = EventPartyInfo? - Genesys CTI User Forum

Author Topic: Established? RequestQueryCall + CallInfoType.StatusQuery = EventPartyInfo?  (Read 1728 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline roman.smirnov

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Advertisement
Hi,

I want on DN registration phase to understand which calls are currently active and in which state they are.

In EventRegistered I receive a list of conn-ids which I can use to query single call.
I do it with [b]RequestQueryCall [/b]with [b]CallInfoType.StatusQuery[/b] set.
As a response I get [b]EventPartyInfo[/b].

Now. [b]How to understand whether the call was etablished or not?[/b]

I can understand whether it was an incoming or an outgoing call:
       
        EventPartyInfo pi = ...;
        boolean isIncoming = DNRole.RoleDestination.equals(pi.getThisDNRole());

But how to recognize [b]isEstablished[/b]?

And a bonus question - how to recognize a consult or transferred or a conference call?

There is a field named [b]CallState[/b], but it seems to be for the already released calls. And it stays 0 ("OK") both for Ringing/Dialing and for Established.

Does anyone has a clue for this?

Thank you in advance!

Regards,
Roman


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Established? Against what?

Enviado de meu SM-S918B usando o Tapatalk


Offline roman.smirnov

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
I beg your pardon, I can't understand your question.

Each call starts with Ringing/Dialing, then if the call is answered the new talking state is signalized with EventEstablished.

I need to understand whether the call is in the talking state or it is still on Ringing/Dialing. In other words - was the call established or not. 

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
So this is for outbound, right?
If so, you need to monitor Extension DN, right?
Or are you trying to monitor queues like RP?


Enviado de meu SM-S918B usando o Tapatalk


Offline roman.smirnov

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Yep, I'm monitoring Extension DNs.
And no, I don't need to monitor any queues or RPs.

I want to let the agent know, which calls are currently active on the Extension DN the agent trys to log in to.

Not sure in which meaning you use the word "outbound" - as "outgoing" or as "campaign" - but I'm talking about all kinds of calls. The agent should be able to control them. To release or to transfer or what ever.


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Outbound is the term for outgoing calls, outbound, inbound.
As per outbound campaign calls, you have 2 types, preview which are started by Agent DN and Progressive/predictive which is started by OCS directly, no need to use a DN. So those calls once answered by customer go to a RP and if there is an agent free, will route the call using the strategy.
So calls there, in the RP, are established against the customer, he could wait and go to an agent, abandon or be dropped.
If goes to the agent, it is again an agent extension DN.
I explain this for you to get a better idea on what and how you need to monitor events because saying "everything" is quite not a good business need definition, technically speaking.
About Agents DNs, I remember some code was shared here in the forum about call state or DN querying.
Take a look. Later will also check my notes and see if can find something on it. Or maybe someone else answers faster.

Regards


Enviado de meu SM-S918B usando o Tapatalk


Offline roman.smirnov

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Thank you very much for you answer and I'm really sorry to ask that, but what do you not undestand in my question?

Once again with all the details.

- It's all about Platform SDK. Voice functionality.
- An application, working with Extension DNs, which is used to help agents in a call center to handle the calls.
- This application sends RequestRegisterAddress to get notified about the state of the Extension DN and about of calls, going through this extension. No matter what kind of calls - if it can ring - it's a call. Agent should be able to answer it, to hang it up or also to initiate a new one.
- After the EventRegistered comes, the Agent should know if there are already some active calls handled by his Extension. In the EventRegistered there are special fields for that, in the example below it's the "conn-1":

[code]01:00:42.658|DEBUG|n.g.d.uad.genesys.TServerActor - <<: message='EventRegistered' (53) attributes:
AttributeAddressInfoType [int] = 8 [AddressType]
AttributeAddressInfoStatus [int] = 1
AttributeReferenceID [int] = 14
AttributeThisDN [str] = "6001"
AttributeReasons [bstr] = KVList:
'GCTI_NOT_READY_COMMENT' [str] = "CC"
'GCTI_NOT_READY_ACTIVATION' [str] = "CC-NR"
'GCTI_NOT_READY_NAME' [str] = "CC-NR"
'CC-NR' [str] = "CC-NR"
AttributeExtensions [bstr] = KVList:
'AgentStatus' [int] = 0
'AgentStatusTimestamp' [int] = 0
'fwd' [str] = "6002"
'conn-1' [str] = "0078035cf0522034"
'call-uuid-1' [str] = "EEHUBVTIH57K169FS17T7TSITO00001P"
'ct-1' [int] = 2
'ps-1' [int] = 12
'party-uuid-1' [str] = "K6K04IPJHL16NC28H72OQNCO5O0000N7"
'status' [int] = 1
AttributeAddressType [int] = 1 [DN]
AttributeEventSequenceNumber [long] = 3434
TimeStamp:
AttributeTimeinSecs [int] = 1693868443
AttributeTimeinuSecs [int] = 474000
[/code]

Here is the documentation for that, in this case the EventRegistered works same as the EventAddressInfo:
https://docs.genesys.com/Documentation/System/Current/GenEM/QueryEvents#EventAddressInfo

[code]NumberOfCalls conn-%d string The connection ID of a call (converted into a string).[/code]

Using this mechanics I can see all the active calls of the Extension DN.

Now. My question.
If I query the call information with RequestQueryCall and getting EventPartyInfo, how to understand, was the call answered or it is still ringing? In terms of Voice PSDK it is called established.

Here is an example of this event, where I maybe cannot see this information or where it is missing:

[code]21:53:42.843|DEBUG|n.g.d.uad.genesys.TServerActor - <<: message='EventPartyInfo' (109) attributes:
AttributeConnID [long] = 0078035cf0522035
AttributePropagatedCallType [int] = 2 [Inbound]
AttributeUserData [bstr] = KVList:
'KVP_URL' [str] = "http://community.demo.genesys.com/"
'KVP' [str] = "Hello das ist ein Anruf für:  Sales request"
'KVP_1' [str] = "Harry Hirsch"
'KVP_2' [str] = "Yes"
'RTargetsWaited' [str] = "CustomerCareCenter@.GA"
'RVQID' [str] = "714SC5QIOH5JLDMJDGQDSOV3MS00001U"
'RVQDBID' [str] = "125"
'RTargetTypeSelected' [str] = "2"
'RTargetRuleSelected' [str] = ""
'RTargetObjectSelected' [str] = "CustomerCareCenter"
'RTargetObjSelDBID' [str] = "142"
'RTargetAgentSelected' [str] = "jukra"
'RTargetAgSelDBID' [str] = "101"
'RTargetPlaceSelected' [str] = "SIP_6001"
'RTargetPlSelDBID' [str] = "101"
'RTenant' [str] = "Germany"
'RTenantDBID' [str] = "101"
'RStrategyName' [str] = "Voice_Inbound"
'RStrategyDBID' [str] = "199"
'CBR-actual_volume' [str] = ""
'CBR-Interaction_cost' [str] = ""
'CBR-contract_DBIDs' [str] = ""
'CBR-IT-path_DBIDs' [str] = ""
'RRequestedSkillCombination' [str] = ""
'RRequestedSkills' [lst] = KVList:
'RTargetRequested' [str] = "CustomerCareCenter"
'CustomerSegment' [str] = "default"
'ServiceType' [str] = "default"
'ServiceObjective' [str] = ""
'PegAGCustomerCareCenter' [int] = 1
'ContactId' [str] = "0005NaE6NTVR000S"
'IR_ALIAS_CHECKED' [str] = "true"
'IR_ALIAS_TYPE' [str] = "0"
'IR_CALLER_TYPE' [str] = ""
'IW_BundleUid' [str] = "fd55bf7a-fa61-4d5e-a226-5d803fc4e965"
'IW_CaseUid' [str] = "7a750447-2957-4f1a-a6c0-ab9c12286fa9"
AttributeCallID [int] = 16777274
AttributeCallType [int] = 2 [Inbound]
AttributeCallUuid [str] = "EEHUBVTIH57K169FS17T7TSITO00001Q"
AttributeThisDN [str] = "6001"
AttributeExtensions [bstr] = KVList:
'party-1' [str] = "+4915116726129"
'party-2' [str] = "6001"
'BusinessCall' [int] = 1
AttributeOtherDNRole [int] = 1 [RoleOrigination]
AttributeCallInfoType [int] = 1 [StatusQuery]
AttributeAddressInfoStatus [int] = 2
AttributeReferenceID [int] = 20
AttributeDNIS [str] = "7000"
AttributeThisQueue [str] = "7000"
AttributeThisDNRole [int] = 2 [RoleDestination]
AttributeAgentID [str] = "1601"
AttributeANI [str] = "+4915116726129"
AttributeCallState [int] = 0
AttributeOtherDN [str] = "+4915116726129"
AttributeEventSequenceNumber [long] = 3485
AttributePartyUuid [str] = "K6K04IPJHL16NC28H72OQNCO5O0000NP"
TimeStamp:
AttributeTimeinSecs [int] = 1693943623
AttributeTimeinuSecs [int] = 162000[/code]

I have a very good understanding of what I'm doing, at least I'm hoping so. Finally I'm a certified PSDK developer.
I only what to know how to find out, whether a call was answered (established). Nothing more.

Thank you in advance!

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Ok i see.
So think with me. In which scenario you would query an Agent DN and get information about a call (in your sample, inbound with a connID and even CustomerID) without being there?
In the no call scenario at a DN you would get another information but not all that information.
So for me you have it already, just missing what you are looking at. ;)

Enviado de meu SM-S918B usando o Tapatalk


Offline roman.smirnov

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Case 1.
Morning. Agent comes to his work place. Starts a call with a real phone on his desk.
Simulteneuosly starts the application.

Case 2.
An outage. Our server restarts. Agent is in ongoing call. Server comes back and tries to restore it's state and the sessions.

Can we now come to the answer to my question?

Marked as best answer by roman.smirnov on September 07, 2023, 06:28:06 AM

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13
Hi Roman,

In the EventRegistered Event you will see some info such as:

conn-x and ps-x, where x is an integer..

[code]'EventRegistered' ('53')
message attributes:
AttributeThisDN [str] = "7003"
AttributeAddressType [int] = 1 [DN]
AttributeExtensions [bstr] = KVList:
'AgentStatus' [int] = 0
'AgentStatusTimestamp' [int] = 0
'conn-1' [str] = "010a035f2228c003"
'call-uuid-1' [str] = "B4JTCSBJLD3OPCRR6MPS6IDD1G000003"
'ct-1' [int] = 2
'ps-1' [int] = 10
'party-uuid-1' [str] = "59HUF97UG94QH7LU4FNGH1K83400000B"
'status' [int] = 1
AttributeEventSequenceNumber [long] = 2939
AttributeReferenceID [int] = 2
Time            = ComplexClass(TimeStamp):
AttributeTimeinuSecs [int] = 585000
AttributeTimeinSecs [int] = 1694008508
AttributeCustomerID [str] = "Environment"
AttributeAddressInfoStatus [int] = 1
AttributeAddressInfoType [int] = 8 [AddressType][/code]

the conn-1 gives you the ConnId of the call.
The ps-1 gives you the PartyState of that call, for example 10 is ringing, 12 is established, 14 is held.

[code]EventRegistered ev = (EventRegistered) message;
KeyValueCollection extensions = ev.getExtensions();
....
boolean checkCalls = true;
int i = 1;
while (checkCalls) {
if (extensions.containsKey("conn-" + i)) {
String connID = extensions.getString("conn-1");
int status = extensions.getInt("ps-" + i);
PartyState ps =  PartyState.valueOf(status);
log.debug("Call Active, ConnID: " + connID + " Status: " + ps.name());
i++;
} else {
checkCalls = false;
}
}
[/code]


Offline roman.smirnov

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: Established? RequestQueryCall + CallInfoType.StatusQuery = EventPartyInfo?
« Reply #10 on: September 06, 2023, 05:34:28 PM »
Thank you very much!
It is just what I was looking for!

I've also found it yesterday and made some tests. Here how it is signalized in my environment:

[code]Ringing:
'ps-1' [int] = 10
01:49:23.473|WARN |n.g.de.uad.middleware.DNActor  - Active calls for DN 6001: Success(List((0078035cf0522038,Alerting)))

Established:
'ps-1' [int] = 12
01:49:56.662|WARN |n.g.de.uad.middleware.DNActor  - Active calls for DN 6001: Success(List((0078035cf0522038,Connected)))

Released:
01:51:38.624|WARN |n.g.de.uad.middleware.DNActor  - Active calls for DN 6001: Success(List())

---
Dialing:
'ps-1' [int] = 65548
01:52:26.182|WARN |n.g.de.uad.middleware.DNActor  - Active calls for DN 6001: Success(List((0078035cf0522039,null)))

Established:
'ps-1' [int] = 12
01:53:28.963|WARN |n.g.de.uad.middleware.DNActor  - Active calls for DN 6001: Success(List((0078035cf0522039,Connected)))

On hold:
'ps-1' [int] = 14
02:19:42.896|WARN |n.g.de.uad.middleware.DNActor  - Active calls for DN 6001: Success(List((0078035cf052203b,Held)))

Retrieved = Established
Released = None
[/code]

Somehow for Dialing it is returned following value:
'ps-1' [int] = [b]65548[/b]

instead of defined in the PartyState:
    public static final PartyState Dialing = new PartyState("Dialing", [b]65536[/b]);

but all other values seem to be OK.

This is definitely much much better than before!