Start a new topic

Real-Time Incoming Call data by Agent

Hi there


Thank you for this useful and straightforward API.


I am trying to find an API call which allows data for incoming calls to be received in Real-Time. For example: while the call is in progress, the API should be able to provide the phone number of the caller. 


The GetQueueCalls and GetInboundCallingHistory endpoints do provide the details I am looking for but not in real-time.

Looking forward to your response.

Thanks
Paul

Hey Paul!


Most api calls for realtime data is at a queue level. This means if you are trying to get the details for agents that are assigned to multiple queues, you will have to get the details of each queue individually.


I would suggest having a look at the GetCallActivity API call first.

If you are familiar with our TMS, this is the api call we use in our Current Calls page (Realtime Monitor > Current Calls).

The api call organizes the calls in 1 of 4 categories: QueueCall, InboundCall, OutboundCall, ExtensionCall.

Another nice feature the response offers is whether the call is connected(AKA  bridged) with any endpoint user. This means the details of an incoming call can be seen without it yet being connected to any agent.


The documentation of this api call may be found at https://apidocs.euphoria.co.za, under Calls > GetCallActivity


If this api call still doesnt meet your needs please let me know.


Chiao!

Thanks Pieter, sounds good, I will give this a try.

Hi Pieter
Thanks for your suggestion regarding the getcallactivity API.

It does return caller information for incoming calls. Just a few things I would like clarity on please:

1) What is the meaning of these 4 call types & which of these categories can contain incoming calls:
QueueCall, InboundCall, OutboundCall, ExtensionCall

2) The call data does not seem to include dates of the calls. Therefore I would like clarity on the following: for which dates does the call return call data?

Your assistance with the above would be appreciated.

 

Hi Paul!


1)

The types of calls can be defined as follows:

QueueCall = An incoming call that entered a queue.

InboundCall = An incoming call that has not yet connected to a queue or agent.

OutboundCall = An extension making an outbound call

ExtensionCall = A call from an extension to another extension


2)

Ah yes I see there isnt a date field, however there are Duration fields, which is the duration based on the local time.

This is a real time method so all calls returned are current.


Chiao!

 Thanks Pierre

That is helpful.


I'd just like to know the answers to the following please


1) Incoming calls will start off as InboundCall type and then if answered, they will go to the QueueCall type? So, if I run the getcallactivity endpoint while someone is busy calling in and the agent hasn't answered, then the call is of the type InboundCall?

If the agent then answers the call, and then I run the call again, that call will now be of type Queue call?

Is that correct?


2) Is there anyway to get a filtered response from the getcallactivityapi by say agentid? This is not essentila but would be helpful


3) Which call will give me a list of agents by tenant?


Thanks

Paul


Hey Paul!

1) From my understanding an incoming call would appear as an InboundCall-type.
As the call navigates through your inbound route to a queue, it will then change to a QueueCall-type, even if it has not been connected to an agent yet.
However, if your inbound route was set up in such a way to send the call straight to an extension it would remain an InboundCall-type call.

2) No unfortunately the GetCallActivity API call doesnt allow you to filter. It only gives you a global view of the activity on your PBX. You might need to perform some post processing to filter for a number or extension once you received the response.

3) You can get a list of agents/extensions using the GetExtensions API call. You can find the details of this API call in the API documentation (https://apidocs.euphoria.co.za/) under Extensions > GetExtensions and GetTenantExtensions

Chiao!

Hi Pieter


Very helpful information, thanks.


I am getting closer to completing the frame of reference that I need.


 A few more questions would help me, if you can bear with me!


My requirement: To know in real-time who is calling a particular agent


Question 1:

I see by the IsQueue flag in the getExtensions call, that an extension can also be queue? Is that correct?


Question 2:

If I am a call centre agent and also a developer who knows how to use the Euphoria API and a customer calls my extension and I want to know their number, how would I go about this? Would I call the GetCallActivityAPI and then search for my extension number in the array that is returned? Or would I search for the Queue name?


Thanks
Paul

Hey Paul!

Question 1 - Yes the IsQueue flag states if this extension has permissions to participate in a queue.

Question 2 - Yes you can simply just search for your own extension.

Just a few questions to get a better idea what you are trying to achieve on your side.
1) Are your agents using the agent workspace or desk phones?
2) Do you plan to monitor activity on extensions that are all assigned to a specific queue, or any extension on your pbx?

Chiao!

Hi Pieter, 


They are making some progress with the info you are sending them, thank you so much. 


here is the next question that Im hoping you can help with. 


Now the goal is to understand how I can find the original store which the caller called. Perhaps there is another endpoint which reveals that.  


Can you let me know if there is a specific call that can pull that info out for them. 


tThanks

Hi Aidan!


Not sure what you mean by which store, do you mean the original DID that was used to enter the system?


Chiao!

So, I should have explained better, 


They have a whole lot of store numbers on a single PBX (Pedros-UID 13860), when someone calls a store number, it goes through to an IVR, which has two options, 1 to a call centre to place an order and 2 to the actual store to put through a complaint, or change, or cancel the order. 


They want to find to be able to pull the origional number the caller called from that call. 


What call would they use for that. 


i hope that helps. 


Thanks

Hey Aidan!

They can use the GetInboundRouteCallLogs api call for that.
This can be found in the API docs (https://apidocs.euphoria.co.za/) under Inbound Routes > GetInboundRouteCallLogs.

Simply include the number to search for and the response will give the basic details of the call, along with a breakdown of the different steps the call went through.
Here they can simply read the "Did" and "DidDescription" fields.


Here is an example of the api call. Note this API call still required their AccountID (13860) to be passed in the sipAccountID field:
<?xml version="1.0" encoding="UTF-8"?>
<XML>
<Tenant>
<Name>Pedrospbx</Name>
<Auth></Auth>
</Tenant>
<ActionName>GetInboundRouteCallLogs</ActionName>
<startDate><![CDATA[2023-10-20 00:00:00]]></startDate>
<endDate><![CDATA[2023-10-20 23:59:59]]></endDate>
<callerID><![CDATA[+27217885532]]></callerID>
<startAt><![CDATA[0]]></startAt>
<pageSize><![CDATA[50]]></pageSize>
<sipAccountID><![CDATA[13860]]></sipAccountID>
</XML>


Chiao!

Thanks so much, will let them know. 

Hi Pieter, 


Here is the follow up question, 


please can you confirm, what is the "sipAccountId" that I must use? The one in your email is just an example I am assuming? 


Thanks

Login or Signup to post a comment