Skip to main content

Swap participants

This event is used to swap on hold participant within a warm transfer or a concurrent call.

{
"type": "DIALER.SWAP_PARTICIPANT"
}

This event doesn't accept any payload, as we are already aware of the participants.

After sending this event, you should expect to receive a DIALER.CALL_STATUS event with the following payload:

In case you are in a warm transfer call

{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "swapping"
}
}

If everything goes well, you will receive the connected status.

{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "warmTransfer",
"status": "connected"
}
}

You will also receive a DIALER.SYNC event with activeParticipant and inactiveParticipant swapped.

If there is a problem during the exchange, the call will revert to the previous state.

See the Warm transfer flow in the DIALER.CALL_STATUS docs

In case you are in a concurrent call

{
"type": "DIALER.CALL_STATUS",
"payload": {
"flow": "concurrent",
"status": "swapping"
}
}