2

I want to know how I can make a call, send dials, add pauses between the dials, and record the call.

I need something like this:

Call number: (123)234-3213 SendDigits: "1(pause for 3 seconds)34414(pause for 12 seconds)9492#(pause for 5 seconds)" Record: True

I look at their documentation for some hours and still can't figure it out. Also I've been having some problems with getting twilio to record the full conversation. It only records like 1 second of it. If someone could show me how they would do this in their respective programming languages I would really appreciate it.

1 Answers1

2

Twilio evangelist here. You can use the <Play> verb to play DTMF tones as well as 1/2 second waits:

<?xml version="1.0" encoding="UTF-8" ?>
<Response>
    <Play digits="wwww3"></Play>
</Response>

You can use the <Pause> verb to tell Twilio to pause processing TwiML for a specified number of seconds:

<?xml version="1.0" encoding="UTF-8" ?>
<Response>
    <Pause length="5"/>
    <Say>Hi there.</Say>
</Response>

You can use the <Record> verb to have Twilio start recording the call:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Record timeout="10" transcribe="true" />
</Response>

Hope that helps.

Devin Rader
  • 10,260
  • 1
  • 20
  • 32
  • Thanks for the comment, however that did not solve my problem. I'm having a problem with the recording as well. It's really weird. I set recording to be True and it does record, however it only record for a second or two even though the conversation was around 20 seconds long. What am I doing wrong? Here's a picture of one of the calls: https://i.imgur.com/e5LSuxp.png – Varand Abrahamian Apr 08 '17 at 18:44
  • Posting the code you are using to start the call and the TwiML you are giving back to Twilio would be very helpful. – Devin Rader Apr 09 '17 at 19:53
  • So I'm trying different options that I can do. I'm using the API Explorer and I'm a little confused on why I have to include a link when trying to make the call. Without including a link I can do basically what I want to do. All I need to be able to do is https://i.imgur.com/oQAJ4v0.jpg – Varand Abrahamian Apr 09 '17 at 20:10
  • Twilio uses the URL to get instructions on what to do with the live phone call once its answered. In your case you have Twilio play the DTMF tones but then it doesn't get any instructions so it hangs up. You need the URL to return TwiML that in your case includes the verb. Then you don't need the Record parameter in the curl request. – Devin Rader Apr 09 '17 at 21:59
  • 1
    Okay so I didn't add the Record = True in the Curl request and I made a new XML file with these contents: However I don't hear any DTMF tones. All I hear is a beep in the beginning of the call. How can I edit this XML file to allow me to record the whole conversation while being able to send DTMF tones? – Varand Abrahamian Apr 09 '17 at 23:02