I need to create an event on a windows computer when I picked up a phone.
But:
The call can been direct, can been an overflow from a queue or can been attended transfer to the device.
I need to see not the internal number on transfer but when the call is transfered, the real callers external number.
In dialplan terms, what do you mean by “an overflow from a queue”? (I’m wondering if this is being asked in the context of a dialplan provided as part of a GUI, as “overflow from queue” sounds like a GUI abstraction, rather than a basic Asterisk event.
How are you initiating the transfer?
Which channel technology are you using? Note that SIP native attended transfers look like unrelated second line calls, so will not present the transferred party caller ID until the call is actually transferred. If you want the original caller at the point when the enquiry starts, you need to add your own logic to deduce that the call is not really a second line call, and associate it with the original call.
Features transfers may be similar, but I haven’t used them myself.
What is an “inbound route”. It sounds like you want the the FreePBX forum: https://community.freepbx.org/ One of the FreePBX abstractions is an inbound route.
Whilst it might be possible to give some guidance on transfers here, the full details of the events received will depend on the details of the FreePBX dialplan. I think your queues logic is too fundamentally linked to FreePBX to give sensible answers outside the context of FreePBX.