Call status
This event is dispatched from bus
🚌 when the status of the ongoing call changes.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"status": "String!",
"flow": "String!"
}
}
Usage​
Outgoing call​
Let's say you want to dial a number, you shall expect to receive the following DIALER.CALL_STATUS
events in this chronological order.
First, You shall receive DIALER.DIALING
acknowledging your dial
{
"type": "DIALER.DIALING",
"payload": {
"from": "PhoneNumber",
"to": "PhoneNumber"
}
}
And then, we'll perform the dialing and the machine will transition to the connecting
status.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "regular",
"status": "connecting"
}
}
Once the call has been created, you'll receive the ringing
status. This indicates that the call is being routed to the called number.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"status": "ringing",
"flow": "regular"
}
}
If the call is answered, you will receive the connected
status.
Incoming call​
If you receive an incoming call, and if you decide to answer it, you will receive the following DIALER.CALL_STATUS
events in this chronological order.
First, you will receive the accepting
status. This indicates that we are trying to connect you with the other party.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"status": "accepting",
"flow": "regular"
}
}
Once the communication has been established, you will receive the connected
status.
Connected flow​
When you receive this event, it means you are connected and most probably speaking with the other party:
{
"type": "DIALER.CALL_STATUS",
"payload": {
"status": "connected",
"flow": "regular"
}
}
At this time you may perform various actions, like tagging a call, muting it, or holding the participant.
You can also initiate a warmTransfer
flow. See how to start a Warm transfer and the statuses during a Warm transfer
Shared flow​
If the call is hung up, you'll receive the hanging
status and after that depending on your line configuration you might either enter mandatoryTagging
or the ended
state which indicates that the call has been terminated.
Mandatory tagging flow​
With the mandatory_tagging_activated
setting turned on, if a call has not been tagged yet, the system will enter the mandatoryTagging
state as indicated in the following JSON payload:
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "regular",
"status": "mandatoryTagging"
}
}
Entering this state, means that your agent availability will change to after_call_work
and you shall receive USER.AVAILABILITY_CHANGED
event with the following payload:
{
"type": "USER.AVAILABILITY_CHANGED",
"payload": {
"userId": 41123,
"status": "after_call_work",
"updatedAt": 1591884384650050
}
}
This requires you to tag the call before making or receiving any further calls. You can find instructions on how to set tags here.
Once the call has been properly tagged, the system will send a ended status, allowing you to proceed with making or receiving calls.
Ended flow​
You can receive the ended
status in different scenarios:
- If the callee/caller hung up the call
- If the callee rejects the incoming call
- If the call drops for connectivity issues (connection lost, etc.)
Staying on the ended
state, allows you to receive in realtime the DIALER.SYNC
event containing the call details (call duration, call recording etc ...).
From within the ended
state, you can either make or receive calls and you can also reset
the context to transition to the idle
state.
Warm transfer​
If you start a Warm transfer call, and if you decide to answer it, you will receive the following DIALER.CALL_STATUS
events in this chronological order.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "regular",
"status": "startingWarmTransfer"
}
}
If starting the transfer was successful, you will receive the ringing
status and the flow will change to warmTransfer
.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "ringing"
}
}
From this moment on, the from
or to
property will point only the initial call and never the call transferee. We recommend using activeParticipant
and/or inactiveParticipant
from the DIALER.SYNC
event when referring to any call information and only use it if the DIALER.SYNC
event has not been received yet.
In case when the transfer is answered, you will receive the connected
status.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "connected"
}
}
If you swap the participants, the following events will come:
First, you enter the swapping
state.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "swapping"
}
}
Regardless of the swapping result, you will once more receive the connected
status as confirmation that it is finished.
You will see it only in the DIALER.SYNC
payload - the activeParticipant
and inactiveParticipant
will be "swapped" or not depending on the swapping result.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "connected"
}
}
If you merge the transfer, the following events will come:
First, you enter the merging
state.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "merging"
}
}
If merging is successful, you will receive the ended
status as well as the regular
flow.
{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "regular",
"status": "ended"
}
}
Reference​
status
: The status of the ongoing call.- Possible values:
idle
,connecting
,ringing
,accepting
,connected
,hanging
,mandatoryTagging
,ended
.
- Possible values:
flow
: The flow type of the ongoing call.- Possible values:
regular
,warmTransfer
.
- Possible values: