Skip to content

Instantly share code, notes, and snippets.

@neetso
Last active January 26, 2016 07:34
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/2ba8d946e95ec6875e7a to your computer and use it in GitHub Desktop.
Save neetso/2ba8d946e95ec6875e7a to your computer and use it in GitHub Desktop.
post '/' do
phonenumber = params[:from]
$redis.hset("call:#{params[:callId]}","from",phonenumber[0...-3]+'XXX')
headers 'Content-Type' => "application/xml"
xml = Builder::XmlMarkup.new(:indent => 2)
xml.instruct!
xml.Response("onAnswer" => settings.responseUrl + "answer",
"onHangup" => settings.responseUrl + "hangup")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment