Do not hang up transferrer until transfer completes. Also, the user could delay the phone hangup as it is a very tight window for the race condition to occur.
Sure you can but it's a topic predestined for CTI.. so you're going to have to familiarize yourself with TAPI or JTAPI. Then making and disconnecting calls will be a breeze.
Getting Started
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: