Use can use Delay and Call Redirect. Or Include If staments and used a counter to keep track of how long the user has been holding. For both of these examples you'll need to include the hold message and Delay time to get the total hold time.
Attached is a simple script that gives a quick example of these options.
These are the paths to get to each CCX logs through CLI. They may be helpful if you are having issues accessing RTMT or downloading logs through it.
If you want to download them you have to prefix "file get " and you can add one of the options (re...