jamesh.BPI Report post Posted 10/10/2012 01:19 PM After making a recording to a local folder, I need to move it to a network share. What's the best way to do this? I take it that it's not a best practice to save the recording directly to the network share. Share this post Link to post
SupportTeam Report post Posted 10/10/2012 08:20 PM You can use a Run Program module to run a 'copy' command. eg: command.com /c copy $RV[MyRecordModuleTitle] x:\destinationfile.wav Please see: http://www.voiceguide.com/vghelp/source/html/modrunprogram.htm Share this post Link to post
jamesh.BPI Report post Posted 10/10/2012 09:01 PM Thanks. I'll try that. This is what I have tried so far. It does not work: I put in a VBS module after the recordings to move recordings to a drive mapped to a network share, but it doesn't appear to be working. Voiceguide is running as a domain user with appropriate permissions on the destination folder, and the .vbs file from voiceguide's temp folder moves the file in a second or so if run manually. I'm curious if the recorded file is locked until after the hangup or not. I put the .vbs module between the "action_callrec_stop" module and the "Hangup the Call" module. The .vbs is: ( made a variable called filename at the beginning of the recording process) dim filesys set filesys=CreateObject("Scripting.FileSystemObject") If filesys.FileExists("c:\recordings\$RV[filename]") Then filesys.MoveFile "c:\recordings\$RV[filename]", "z:\" End If Share this post Link to post
jamesh.BPI Report post Posted 10/10/2012 09:45 PM Run Program method specified above does not work either, using copy or move commands (tried both). Here are the relevant log entries. 162622.211 16 392 127 ev RecEnd 392 859328 162622.211 16 392 127 q scr add evScriptEvent 8003 EV_REC_FINISHED 162622.211 6 392 127 q scr run evScriptEvent sCode=[EV_REC_FINISHED] iActionID=0, crn=0[859328|0|0|0|0][|||||] 27|00:00:01.0626836 162622.211 6 392 127 scriptevent EV_REC_FINISHED 859328|0|0 || LineState=LS_EVALEXPR 162622.211 6 392 127 LsEvalExpr EV_REC_FINISHED lCode2Str=EV_REC_FINISHED 162622.211 6 392 127 LsEvalExpr action_callrec_stop EV_REC_FINISHED 859328 i1line_RecCall_RecId=0 162622.211 6 392 127 i1line_RecCall_RecId=0, iParam1=859328 162622.211 6 392 127 path {EV_REC_FINISHED} not found 162622.211 6 392 127 FindNextVgmTitleInPathList: next module title is=[recert_move_file_2] 162622.211 6 392 127 t timer clear (force=False) 162622.211 6 392 127 RunModule start Run Program, [recert_move_file_2], iModuleIdx=783, previous: vgm=607, vgs=4:4 162622.211 6 392 127 state [recert_move_file_2] Run Program 162622.211 6 392 127 rv replace start [command.com /c move c:\recordings\$RV[filename] z:\$RV[filename]] 162622.211 6 392 127 rv replace end [command.com /c move c:\recordings\947310_121010162123.547.wav z:\947310_121010162123.547.wav] 162622.226 6 392 127 File.Exists(command.com) is true 162622.226 6 392 127 running program=[command.com], arguments=[/c move c:\recordings\947310_121010162123.547.wav z:\947310_121010162123.547.wav], windowStyle=Hide, timeout=1 162622.226 6 392 127 ShellExe start [command.com][/c move c:\recordings\947310_121010162123.547.wav z:\947310_121010162123.547.wav] 162622.257 6 392 127 Run Program waiting... (processHandle=66256, pid=3000) 162622.257 6 392 127 moh file not specified 162622.273 6 392 127 t timer set 1 sec : EV_TIMEOUT_CHECKONSTATE 162623.164 21 392 127 timer EV_TIMEOUT_CHECKONSTATE 162623.164 21 392 127 q scr add evScriptEvent 9007 EV_TIMEOUT_CHECKONSTATE 162623.164 6 392 127 q scr run evScriptEvent sCode=[EV_TIMEOUT_CHECKONSTATE] iActionID=0, crn=0[0|0|0|0|0][|||||] 27|00:00:01.0626836 162623.164 6 392 127 scriptevent EV_TIMEOUT_CHECKONSTATE 0|0|0 || LineState=LS_RUN_WAITTILLFINISHED 162623.164 6 392 127 LsRunWaitTillFinished EV_TIMEOUT_CHECKONSTATE lCode2Str=EV_TIMEOUT_CHECKONSTATE 162623.164 6 392 127 Process.HasExited error when test (Process has exited, so the requested information is not available.). Assume completed. 162623.164 6 392 127 task completed. vgm=783, iRunWait=1, iRunWait_ExeResult_NextVgm=0=[] 162623.164 6 392 127 rv replace start [$RV[DoNotStopMOH]] 162623.164 6 rv dbg rv_retrieve did not find [DoNotStopMOH] ( 44 6f 4e 6f 74 53 74 6f 70 4d 4f 48) 162623.164 6 392 127 rv replace end [] 162623.164 6 392 127 ExeResult_NextVgm has not been set. check for Result file. 162623.164 6 392 127 no result file returned from program (VGRUNRESULT_392.TXT).command.com /c move c:\recordings\$RV[filename] z:\$RV[filename] 162623.164 6 392 127 FindNextVgmTitleInPathList: next module title is=[Hangup the Call] 162623.164 6 392 127 q tel add cmd_PlayStop [0,0,0,0,0][||||] 162623.164 6 392 127 play PlaySoundStop ok 162623.164 6 392 127 task completed LsRunWaitChooseNext iNextVgm=612 162623.164 7 392 127 q tel run cmd_PlayStop 8|00:00:07.7044561 162623.164 6 392 127 t timer clear (force=False) 162623.164 6 392 127 RunModule start Hangup the Call, [Hangup the Call], iModuleIdx=612, previous: vgm=783, vgs=4:4 162623.164 6 392 127 HangupCall, source=Hangup Module, WorkModeScript=Running_Normal, yLineStateAppPov=[Connected], lPlayId=152437, lRecId=0 162623.164 6 392 127 moduleTitle=[Hangup the Call] 162623.164 6 392 127 ScriptWorkingMode set Stopping, (called from HangupCall) 162623.164 6 392 127 ls set Disconnect_Pending (scriptstate=LS_ENDINGCALL) 162623.164 6 392 127 state Hanging up... [Hangup Module] 162623.164 6 392 127 rv add [Hangup Source]{Hangup Module} 162623.164 6 392 127 d added Hangup Source | Hangup Module 162623.164 6 392 127 d added Hangup Source | Hangup Module 162623.164 6 392 127 q tel add cmd_PlayStop [0,0,0,0,0][||||] 162623.164 6 392 127 play PlaySoundStop ok 162623.164 7 392 127 q tel run cmd_PlayStop 8|00:00:07.7044561 Share this post Link to post
SupportTeam Report post Posted 10/10/2012 11:44 PM The processes started by VoiceGuide (from Run Program/Run VBScript/etc.) run under same user as the main VoiceGuide service. However it looks like mapped drive letters cannot be used from Windows Services and from processes started by Windows Services. Universal Naming Convention (UNC) should be used instead : \\Server\Share... From http://msdn.microsoft.com/en-us/library/ms685143.aspx : A service (or any process running in a different security context) that must access a remote resource should use the Universal Naming Convention (UNC) name to access the resource. The service must have appropriate privileges to access the resource. If a server-side service uses an RPC connection, delegation must be enabled on the remote server. Also see: http://support.microsoft.com/kb/180362 Share this post Link to post
jamesh.BPI Report post Posted 10/11/2012 01:27 PM UNC paths do not appear to be the answer in either the VBS method or the RUN method. In the RUN, I tried with the path in quotes, or not in quotes (in this case escaping a space in a folder name by preceeding it with a ^ ) I'm torn between my feeling that this is because the file is locked by the IVR process until after the call hangs up ending the script, and my knowledge that that shouldn't prevent a 'copy' operation. I'm certain the permissions on the destination folder are correct, as manual copies work fine. I'm certain that VG is running as a user with correct permissions. Also, if I change the action_callrec_start to save the file directly to the network share, the file saves properly. I know streaming audio to a network share isn't a best practice, and I'd rather move the file after the caller completes the Q&A, so only calls which complete the script are retained. FWIW, I've tried copying the file to a different folder on the same system and that didn't work either. Share this post Link to post
jamesh.BPI Report post Posted 10/11/2012 10:21 PM Ok, we have worked through the issues by using 2 RUNAFTERHANGUP scripts, one to delete incomplete recordings (caller disco'd before finishing), and one to move the completed recordings to a different local folder with a hidden share. Our in-house app will just pick the completed recordings up from that share, and process them, rather than having VoiceGuide try to upload them to a network folder, which just wasn't working. I tried a different network share, with the same results. Tried various UNC and mapped drives, both RUN and VBS modules. None could write to a network folder. VoiceGuide is running as a domain admin account so I can only guess that the RUN or VBS modules were not executing as the domain admin account. Share this post Link to post
SupportTeam Report post Posted 10/12/2012 12:16 AM Windows Sysinternals Process Explorer ( http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx ) can be used to confirm under what User the started .exe/.vbs scripts are ran. For testing purposes it maybe necessary to start a .exe/.vbs that takes a while to complete, so that it may appear in the list of tasks in the Process Explorer and its User property can be viewed. Share this post Link to post
invoso.com Report post Posted 10/12/2012 12:02 PM I need this too, I didn't find way to execute this from VG. I'm moving using bat file with windows task manager schedule every 5 minutes (I convert wav to mp3 in VG before) move /Y \\192.168.0.004\source\*.mp3 \\192.168.0.005\target Share this post Link to post
SupportTeam Report post Posted 10/16/2012 07:44 AM To find out what is happening it may be a good idea to have the VBScript that tries to move/copy the file to determine what user privilege it is running as and then log this information (using Admin_TraceLogAdd http://www.voiceguide.com/vghelp/source/html/com_admin_tracelogadd.htm or log to own log file etc) It may be a good idea to also log the actual error when the copying is attempted. This may give better insight as to why the copy is failing. Instead a of a .VBS a .EXE could be built that attemtps to perform the move/copy - more information about the error could be obtained that way (.EXE would be logging progress to own log file). Share this post Link to post