ivr IVR Tutorial Table of Content << Previous  >> Next

5.6 Edit the Windows Batch File

As we show in the previous sections, the recorded audio file referred here is C:\Call List\recorded_message.wav. This file is submitted to Voicent Gateway when the application is deployed.

The Deployed Audio File

The deployed IVR applications are usually installed under:

C:\Program Files\Voicent\Gateway\apps\<deployed name>

Where <deployed name> for this sample is lesson5_msg.

The deployed audio file for recorded_message.wav is:

C:\Program Files\Voicent\Gateway\apps\lesson5_msg\webapps\recorded_message.wav

Since the actual recorded file is generated dynamically, we'll need to overwrite the deployed audio file with the actually message by the inbound IVR application. This can be accomplished in the Windows batch file easily.

The Original Batch File

This is the original runvcast.bat file under the folder C:\Call List.

REM delay for 30 seconds
REM use ping command as a workaround since there is no sleep command

ping 127.0.0.1 -n 30 -w 1000 > NUL

REM now launch broadcastbyphone
REM add -noexit if you want to keep the program up after broadcast

"C:\Program Files\Voicent\BroadcastByPhone\bin\vcast.exe"
     "C:\Call List\mylist.voc"
     -startnow -cleanstatus -wavfile %1

The %1 refers to the first argument when the batch file is invoked.

The New Batch File

The selected message for the call list has the outbound message set already. All we need to do here is rename the first argument, which is the recorded audio file, to the desired audio file.

REM delay for 30 seconds
REM use ping command as a workaround since there is no sleep command

ping 127.0.0.1 -n 30 -w 1000 > NUL

REM move and rename audio file

move /Y "%1" "C:\Program Files\Voicent\Gateway\apps\lesson5_msg\webapps\recorded_message.wav"

REM now launch broadcastbyphone
REM add -noexit if you want to keep the program up after broadcast

"C:\Program Files\Voicent\BroadcastByPhone\bin\vcast.exe"
     "C:\Call List\mylist.voc"
     -startnow -cleanstatus

The audio file no longer needs to be passed in from the command line (-wavfile %1).

As we can see this solution is not going to work if Voicent Gateway is on a remote computer. We'll solve this problem in lesson 6.

 

ivr IVR Studio Table of Content << Previous >> Next