VBScript → Lua
This function records a message as a temporary .wav file on the server.
PBXCall.RecordMessage ( nTimeout )
This function returns an integer value of PBXSuccess (0) on success or PBXTimeout (2) on reaching the given timeout. See list of defined return values.
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 obtain via PBXCall.LastRecordedMessageLength.
Dim nReturn nReturn = PBXCall.RecordMessage (180) If (nReturn = PBXSuccess) Or (nReturn = PBXTimeout) Then ' simply replay the recorded message PBXCall.PlayMessage (PBXCall.LastRecordedMessage) End If
By Tom Wellige