Hope it is OK to post this here. The HSPhone script forum hardly gets used and this script will need to use some Vbscript in homeseer.
This is what I am trying to do.
I have set up a cookie cutter type web site for several users. Everything is the same besides their basic info. Name, e-mail, etc.
What I am working on now is where these users can call up a phone number, enter in their ID number and record their own personal message that will appear on the front of their website in real time. I am using flash that plays back the mp3 file and allows the end user to control it, (Pause, Play, etc.).
I have it working but need to add some other features. I don't totally understand how you can use VBscripts in the IVR scripts to return values. After reading the Help file it is my understanding that I can only tell HomeSeer to run a script in homeseer or return only a TRUE or False statement. Is it possible to run some VBscript and actually get a value back? This is what I want and that would be great if anybody could help me.
1. Right now when they enter in their ID number it will read it back as "One Thousand Five Hundred and Eighty Six" instead of "One Five Eight Six"
How can I use a VBscript in IVR to do this?
2. Simple password based on ID number.
Right now the system allows you to punch in any ID number and put that recording on that persons website. After they enter in their ID number I want it so they have to put in a password for the ID number. I need some kind of algorithm where the password would be generated from the ID number. Something as simple as 9=0 8=1 7=2 6=3 5=4 would work. I do not need major security. I am not sure if I can do this in IVR with VBscript
3. MP3 conversion
Even though HomeseerPhone can save in MP3 format, you can not change the bitrate. it saves in 8khz but the file must be 11,22,44 for flash to stream it correctly (otherwise it plays back 6X as fast) - I was hoping that I could pass the path and filename onto a script in homeseer and have it run lame.exe (which homeseers uses, command line based) manually to set the correct bitrate.
If you could help me out, that would be great.
Below is the code that is currently working right now minus the speaking each digit back, password protection, and correct bitrate mp3 playback.
Also note that you MUST have the latest version of hsphone installed or playback of wav files outside of the homeseer dir will not work.
ftp://ftp.homeseer.com/updates/hsp176.zip
<pre class="ip-ubbcode-code-pre">
###########################################################
# ID number recorder #
# Version 1.0 #
###########################################################
LABEL:START
CLEAR_KEY:
SPEAK:Hello, Enter your ID Number. When you are finished, press the pound key.
WAIT_KEY:#
SPEAK:The Number you entered is
SPEAK:$DTMF
SET:$VAR1=$DTMF
LABEL:RECORDING
SPEAK:Start Recording.
CLEAR_KEY:
PLAY:beep.wav
RECORD:c:\temp\phone\$VAR1.wav
WAIT_KEY:#
END_RECORD:
CLEAR_KEY:
LABEL:MENU1
SPEAK:To hear your recording, press 1. To Try again Press 2. To save your recording, press 3 or hang up.
WAIT_KEY:123456789#*
IF:$DTMF_KEY=1;GOTO:HEAR_RECORDING;NEXT:
IF:$DTMF_KEY=2;GOTO:RECORDING;NEXT:
IF:$DTMF_KEY=3;GOTO:HANGUP;NEXT:
SPEAK:Sorry, that key is not an option. Please try again.
GOTO:MENU1
LABEL:HANGUP
SPEAK:Your Recording has been saved. Good Bye
HANGUP:
LABEL:HEAR_RECORDING
CLEAR_KEY:
PLAY:c:\temp\phone\$VAR1.wav
GOTO:MENU1
HANGUP:
</pre>
This is what I am trying to do.
I have set up a cookie cutter type web site for several users. Everything is the same besides their basic info. Name, e-mail, etc.
What I am working on now is where these users can call up a phone number, enter in their ID number and record their own personal message that will appear on the front of their website in real time. I am using flash that plays back the mp3 file and allows the end user to control it, (Pause, Play, etc.).
I have it working but need to add some other features. I don't totally understand how you can use VBscripts in the IVR scripts to return values. After reading the Help file it is my understanding that I can only tell HomeSeer to run a script in homeseer or return only a TRUE or False statement. Is it possible to run some VBscript and actually get a value back? This is what I want and that would be great if anybody could help me.
1. Right now when they enter in their ID number it will read it back as "One Thousand Five Hundred and Eighty Six" instead of "One Five Eight Six"
How can I use a VBscript in IVR to do this?
2. Simple password based on ID number.
Right now the system allows you to punch in any ID number and put that recording on that persons website. After they enter in their ID number I want it so they have to put in a password for the ID number. I need some kind of algorithm where the password would be generated from the ID number. Something as simple as 9=0 8=1 7=2 6=3 5=4 would work. I do not need major security. I am not sure if I can do this in IVR with VBscript
3. MP3 conversion
Even though HomeseerPhone can save in MP3 format, you can not change the bitrate. it saves in 8khz but the file must be 11,22,44 for flash to stream it correctly (otherwise it plays back 6X as fast) - I was hoping that I could pass the path and filename onto a script in homeseer and have it run lame.exe (which homeseers uses, command line based) manually to set the correct bitrate.
If you could help me out, that would be great.
Below is the code that is currently working right now minus the speaking each digit back, password protection, and correct bitrate mp3 playback.
Also note that you MUST have the latest version of hsphone installed or playback of wav files outside of the homeseer dir will not work.
ftp://ftp.homeseer.com/updates/hsp176.zip
<pre class="ip-ubbcode-code-pre">
###########################################################
# ID number recorder #
# Version 1.0 #
###########################################################
LABEL:START
CLEAR_KEY:
SPEAK:Hello, Enter your ID Number. When you are finished, press the pound key.
WAIT_KEY:#
SPEAK:The Number you entered is
SPEAK:$DTMF
SET:$VAR1=$DTMF
LABEL:RECORDING
SPEAK:Start Recording.
CLEAR_KEY:
PLAY:beep.wav
RECORD:c:\temp\phone\$VAR1.wav
WAIT_KEY:#
END_RECORD:
CLEAR_KEY:
LABEL:MENU1
SPEAK:To hear your recording, press 1. To Try again Press 2. To save your recording, press 3 or hang up.
WAIT_KEY:123456789#*
IF:$DTMF_KEY=1;GOTO:HEAR_RECORDING;NEXT:
IF:$DTMF_KEY=2;GOTO:RECORDING;NEXT:
IF:$DTMF_KEY=3;GOTO:HANGUP;NEXT:
SPEAK:Sorry, that key is not an option. Please try again.
GOTO:MENU1
LABEL:HANGUP
SPEAK:Your Recording has been saved. Good Bye
HANGUP:
LABEL:HEAR_RECORDING
CLEAR_KEY:
PLAY:c:\temp\phone\$VAR1.wav
GOTO:MENU1
HANGUP:
</pre>
Comment