Hello everyone and thanks for your help in advance. I am developing an MVC application that generates an outbound call from a web page. What I want to do is to allow the recipient of the phone call to be able to make DTMF selections on their keypad. I know there are methods within Twilio to respond to DTMF input for inbound calls, using the verb but I don't see any documentation for outbound calls and wonder if it can even be accomplished. When the outbound call is answered I created a simple web form that is called:
Dim header As String = "<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" & Chr(34) & "UTF-8" & Chr(34) & "?>"
Dim message As String = "<Response>"
message = message & "<Gather>"
message = message & "<Play loop=" & Chr(34) & "1" & Chr(34) & ">http://www.mydomain/Sounds/Call.wav</Play>"
message = message & "</Gather>"
message = message & "</Response>"
Response.Write(header & message)
which in turn generates a TwiML response:
So once the user presses 1 is where I am confused as to what to do. I did come across the article Respond to Incoming Phone Calls in C#
that speaks to responding to user input. I tried:
Dim response = New VoiceResponse()
response.Gather(New Gather(numDigits:=1, action:="/voice/gather"))
but am receiving a syntax error on the second line, even though I think it is the VB.Net equivalent C# version 5.x example. So it really seems like I should be able to accomplish my task, but I am stuck as to how to get his working. Any help would be appreciated.