The card server receives events from the card that the trunk must be recorded (start) and when it terminates (stops). This recording will have no extension details. The only call details it will have is provided by D channel information received from the recording card.
To have extension details, this is provided by the call details the PABX sends. These call details can be received by SMDRLink (network or serial), AMTMitel (Mitel Mitai port) or TAPI.
If the PABX sends of call details for the trunk that is being recorded, it will slice the trunk recording and tie the call details to that part of the recording. To link the call details to the recording, the trunk number must match. Call details is typically send off when the call ends on an extension, but some PABX units also sends it for when a call is placed on hold.
If the conversation continues on the trunk line, the cardserver will continue to record until either call details is received for the trunk number or the recording card sends off events that the recording should terminate.
For example if you receive a call on your extension and you transfer it to another extension and this extension place the call on hold and speak to the person again, you will end up with 4 recordings:
the first on your extension number,
the second on the transferred extension,
the third on the 'on hold' extension and
the fourth on the transferred /'on hold' extension.
NOTE: this will only be sliced as explained if call details was received, else it could be one continuous recording. Also note that not all PABX units sends off on hold call details. If so, then you will have 2 recordings(your extensions and transferred extension).