The following attachment file is a lua script for calculate the leg B pickup time and hangup time. But the issue, the duration is calculating from the outbound initiate time.
How to get the leg B answered time from inside the lua script?
I'm not using cdr logs.