0

I am using the Tiwlio SDK to create a CallResource:

Dim tCall = CallResource.Create(toPhone,
                                        fromPhone,
                                        url:=New Uri("http://blah.com/api-callback")
                                        )

The Callback returns twiml. Once it is done recording, it never hits the Thank you section, instead starts over with the first Say.

Dim vr As New Twilio.TwiML.VoiceResponse()
        vr.Pause(1)
        vr.Say("Hello, please talk after the beep.", voice:="woman")
        vr.Record(trim:="trim-silence", maxLength:=10, recordingStatusCallback:=New Uri("http://blah.com/api-complete"))
        vr.Pause(10)
        vr.Say("Thank you for registering.", voice:="woman")
        vr.Hangup()

Any ideas?

BigPoppa
  • 1,205
  • 2
  • 13
  • 21

1 Answers1

1

yes, the the TwiML record verb needs an action URL, otherwise it will call the same TwiML URL, looping.

TwiML Voice: Record (Action URL)

"Keep in mind that by default Twilio will re-request the current document's URL, which can lead to unwanted looping behavior if you're not careful. Any TwiML verbs occurring after a Record are unreachable."

Alan
  • 10,465
  • 2
  • 8
  • 9