Lua → VBScript SwxWare v13.10
This function records a message as a temporary .wav file on the server.
local nReturn = PBXCall.RecordMessage(nTimeout)
This function returns a PBXResult value of PBXSuccess or PBXTimeout.
Parameter
nTimeout
Maximum number of seconds until recording will be stopped. Valid values are 3 to 600.
After the recording as finished the recorded file can be accessed via PBXCall.LastRecordedMessage() and its length (in seconds) can be obtained via PBXCall.LastRecordedMessageLength().
local nReturn = PBXCall.RecordMessage(180) if ((nReturn == PBXSuccess) or (nReturn == PBXTimeout)) then -- simply replay the recorded message PBXCall.PlayMessage(PBXCall.LastRecordedMessage) end
By Tom Wellige