Last active
January 26, 2016 07:35
-
-
Save neetso/f07e0f674c1740b3c470 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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