Skip to content

Instantly share code, notes, and snippets.

@PeterBloom
Created June 18, 2010 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PeterBloom/444040 to your computer and use it in GitHub Desktop.
Save PeterBloom/444040 to your computer and use it in GitHub Desktop.
# This script is called via HTTP.
options = { :channel => "VOICE",
:answerOnMedia => false,
:timeout => 30.0,
:callerID => "6502916707"
}
# Make an outbound call with the above options.
event = call 'tel:+1' + $numberToCall, options
if event.name == 'answer'
log 'Outgoing call gets answered by ' + event.value.calledID
wait(2000)
say ("<prosody rate='-40%'>This is a test application from Peter Bloom
</prosody>",{:voice => "allison"})
wait(800)
say ("<prosody rate='-40%'>This is a sound file
</prosody>",
{:voice => "dave"})
wait(500)
say ("http://hosting.tropo.com/46294/www/audio/Whoareyou.mp3")
wait(800)
say ("This is fast speech",{:voice => "allison"})
wait(800)
say ("<prosody rate='-80%'>This is slower speech
</prosody>",
{:voice => "allison"})
wait(800)
event = record('Say something after the beep.',
{ :beep => true,
:recordFormat => "audio/wav",
:timeout => 5,
:recordURI => 'ftp://ftp-internal.voxeo.net/www/audio/testtemp.wav',
:recordUser => 'PeterBloom',
:recordPassword => '123456',
:transcriptionID => event.value.calledID,
:transcriptionOutURI=> 'mailto:peter.bloom@bloombusiness.com'
})
wait(800)
say ("<prosody rate='-40%'>I am going to play back your recording now</prosody>",{:voice => "dave"})
wait(800)
say ("http://hosting.tropo.com/46294/www/audio/testtemp.wav")
wait(800)
say ("<prosody rate='-50%'>Thank you goodbye</prosody>",{:voice => "allison"})
hangup
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment