Blind transfers let a callee transfer a call to another person by pressing a special button and entering another person's number (usually an extension number). It is called this way because the person who transfers the call does not talk with the person to whom he transfers it.
A lot of traditional telephony services rely on this SIP phones-/SIP trunks-designed functionality. Earlier, a blind transfer requested by a third-party SIP started a call in a new session and the third call leg (transfer target) always saw the transferor as caller ID.
Now, one can use the handleBlindTransfer(bool) mode to control the third call leg within an existing session, which makes such communications more flexible. You can change the caller ID to be shown to the transfer target by setting displayName, for example. And also, you can pass custom headers to the transfer target.
When handleBlindTransfer is enabled, the CallEvents.BlindTransferRequested event is triggered to request for the transfer target within an existing session and to notify the transferor of the result.
Here are the two methods we can use to notify the transferor of the result:
The event has the following parameters:
call – the active call
transferTo – username/phone number of the transfer target
headers – optional SIP headers received with the message
name – the name of the event
Pay attention to the transferTo parameter which we use to transfer the call.
If handleBlindTransfer set to false, the old logic is used. We receive the info about our transfer target the same way (REFER), but there are two sessions created and here we work with CallEvents.TransferComplete and CallEvents.TransferFailed.