Tom Wellige 60 Report post Posted November 29, 2015 This property returns the name (incl. path) of the last recorded message (by the Record Message block). PBXCall.LastRecordedMessage This function returns a string value. When making use of the Record Message functionality the SwyxServer defines the unique name of the WAV file to take the recording. After a recording this name can be requested from the server i.e. by this property. The Record Message block also provides a variable the name will be written in. The file is named Rec_yyyyMMddhhmmss.wav where yyyMMddhhmmss is the time and date of the recording. The PBXCall.SendEmail function deletes the last recording. So retrieve it beforehand. If you got a file name it remains valid until the script is finished. After that the file will be deleted by the server. If you need to know how many seconds were recorded in that WAV file you can use the PBXCall.LastRecordedMessageLength function. The following example copies the last recorded message to a given file server and rename it. Copy the first code snippet into the Start block of your script. The second code snippet can be used afterwards in a Script Code block. function Get2Digits ( s ) if Len(s) > 1 then Get2Digits = s else Get2Digits = "0" & s end if end function Dim sRecording, sTarget sTarget = "\\fileserver\recordings\%callid%_%date%_%time%.wav" sTarget = Replace(sTarget, "%callid%", PBXCall.CallID) sTarget = Replace(sTarget, "%date%", Year(Now) & Get2Digits(Month(Now)) & Get2Digits(Day(Now))) sTarget = Replace(sTarget, "%time%", Get2Digits(Hour(Now)) & Get2Digits(Minute(Now)) & Get2Digits(Second(Now))) sRecording = PBXCall.LastRecordedMessage if sRecording <> "" then Dim fso Set fso = CreateObject("Scripting.FileSystemObject") fso.CopyFile sRecording, sTarget Set fso = Nothing end if 0 Share this post Link to post Share on other sites