Twilio developer evangelist here.
When you return an empty <Response>
that tells Twilio that there's nothing left to do, so the call will end. You need to add some TwiML to tell Twilio what to do next with the call. If a user is on hold, then perhaps <Play>
some music?
Let me know if that helps at all.
Edit
OK, there might be a few things going on here.
First up, your <Record>
has no action
attribute. This means that when the user finishes their recording Twilio will make a request to the current URL to see what to do next. This can lead to looping behaviour.
Secondly, the default value for the <Record>
tag's finishOnKey
attribute is '1234567890*#', any character. So, when a user presses a key the recording will end and as far as I can see, the call will loop.
You are saying in the comments that you want to continue the call. If you mean continue taking the recording, then perhaps you need to set finishOnKey
to an empty string, so that hitting a key doesn't stop the recording. Alternatively, if you expect the call to carry on with something else, then you should add an action
URL to the <Record>
tag and implement some new TwiML that does something else for that URL. I suggested using <Play>
but you have the choice of all available TwiML to carry the call on.