One way would be to configure 3CX to generate CDR files -- chose one file per call. The CDR will provide a list of extensions that touched the phone call.
The CDR file is only created when the call is finished (disconnected).
If you need data in real-time, then the CFD is not going to be a solution for you. Once the call leaves the CFD any further updates are not available.
For example, if the call comes to your CFD, and the CFD transfers the call to a queue, and then the queue distributes the call to an agent, you will NOT be able to capture who answered the call because the CFD is no longer involved with the call once it is transferred to the queue.
There are two ways to get real-time events:
(1) have the agent's computer send the update. Would it be feasible to have the agent's 3CX web client call a web page (when the agent answers the call) and supply to the page the Caller ID number and name? Your page would need to update your application.
(2) subscribe to 3CX real-time events. The only way to subscribe to real-time events today is via the 3CX Call Control API, or through the VoIPTools Events API. Both of these options require a 3rd-party service that subscribes to the events and pushes the updates to your application.
Consegui enviar os dados de CallerNumber e CallerDisplayName mas como posso enviar o número do ramal que atendeu? Esta informação é relevante para minha aplicação.