Skip to content

Instantly share code, notes, and snippets.

@neetso
Last active January 26, 2016 07:35
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 neetso/f07e0f674c1740b3c470 to your computer and use it in GitHub Desktop.
Save neetso/f07e0f674c1740b3c470 to your computer and use it in GitHub Desktop.
post '/answer' do
user = params[:user]
if user == "voicemail"
notifier.ping "Call from: " + $redis.hget("call:#{params[:callId]}","from") + ". Hotline off.",
attachments: [call_details]
end
end
post '/hangup' do
hangupCause = "#{params[:cause]}"
if hangupCause == "cancel"
notifier.ping "Missed call from: " + $redis.hget("call:#{params[:callId]}","from") + ". Hotline on.",
attachments: [call_details]
end
$redis.del("call:#{params[:callId]}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment