VBScript → Lua
This function returns the duration (in seconds) of the current call.
Dim nDuration nDuration = CallDuration()
or if being used directly within a GSE property dialog, e.g. in a Say Number block to directly announce the duration to the caller:
This function returns an integer value.
This function can be called at any time within the call routing script.
The duration will be calculated from the CallStart() time and the current time. The start time and the current time will be request making use of the Server Script API function PBXUser.Now. This ensures that the location configuration (time zone) of the script user will be considered.
By Tom Wellige