Skip to content

Instantly share code, notes, and snippets.

@johntdyer
Created May 3, 2011 12:29
Show Gist options
  • Select an option

  • Save johntdyer/953238 to your computer and use it in GitHub Desktop.

Select an option

Save johntdyer/953238 to your computer and use it in GitHub Desktop.
starttime = nil
call 'tel:+14805551212', {
:onAnswer => lambda { starttime = Time.new }
}
log "starttime====> #{starttime}"
record ".", {
:beep => false,
:timeout => 10,
:silenceTimeout => 1,
:maxTime => 10
}
endtime = Time.now
log "endtime====> #{endtime}"
difference = endtime - starttime
log "difference====> #{difference}"
if difference < 3
say "human"
else
say "answering machine"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment