Skip to content

Instantly share code, notes, and snippets.

@zackproser
Created October 20, 2019 17:15
Show Gist options
  • Select an option

  • Save zackproser/def0261ad69f4aea0bc7dc2f1a0afc17 to your computer and use it in GitHub Desktop.

Select an option

Save zackproser/def0261ad69f4aea0bc7dc2f1a0afc17 to your computer and use it in GitHub Desktop.
func handleInboundCall(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
log.Debug("handleInboundCall received call")
resp := twiml.NewResponse()
resp.Action(twiml.Say{
Voice: twiml.TwiMan,
Language: twiml.TwiEnglishUK,
Text: "Thank you for calling CatFacts!",
})
resp.Action(twiml.Play{
Url: renderServerRoot() + "/static/angryMeow.wav",
})
resp.Action(twiml.Say{
Voice: twiml.TwiMan,
Language: twiml.TwiEnglishUK,
Text: "Cat Facts is the number one provider of fun facts about cats! All of our representatives are currently assisting other cat lovers. Please remain on the feline! In the meantime, please listen carefully as our menu options have recently changed.",
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment