Distinguish between attended and blind transfer

Hello everybody.

is there a way to understand if an incoming tranferred call is generated by a blind or an attended transfer?

A calls B and wants to speak with C
now B can do a blind or an attended tranfer to C.

how can i distinghish it in extensions.conf?

SIP attended transfers are indistinguishable from second line outgoing calls when the dialplan is running. For features transfers and SIP blind transfers, you might be able use various dialplan functions to look for hints in the SIP headers and channel variables.

There may be some channel variable set when a SIP attended transfer completes, but that would not be available for the actual call, until complete, unless you looked at it from, say, AMI. AMI should see events that may give a clue.

Why do you need to distinguish?

because in the attended case asterisk answers an employer call while in the unattended asterisk answers directly the customer, so different messages etc…

i found that:
TRANSFERERNAME variable has value after an attended transfer.
BLINDTRANSFER variable after an unattended one.

i think this could be the solution.

thanks