1

I am using Twilio to create call tracking phone numbers that redirect to another number using the Dial verb. I am also recording these calls. Here is an example of my TWIML

<Response><Dial record="true" action="http://example.com/PostCall">555-555-5555</Dial></Response>

I want to be able to terminate the call recording but not the call using something like the Record verb's finishOnKey option. Is this possible?

The reason is, a call comes in to a call center and is transferred to a lawyer. I want to record the call center part of the call but not the attorney/client part of the call. If pressing # during the call could stop the recording but keep the call active it would solve my problem.

  • Is there a way to stop recording without terminating the call?
  • Can the record verb be used in conjunction with the dial verb?
ericdc
  • 11,217
  • 4
  • 26
  • 34

1 Answers1

1

The <Record> TwiML verb is best if you want to record one person talking. I'm assuming you want to record both parties connected via <Dial> in the call center so you would rely on the record attribute as you have above.

Read the FAQ for the full breakdown on the difference in recording settings.

Is there a way to stop recording without terminating the call?

Depending on the flow of your call center you might modify the live call via the REST API and redirect the call to new TwiML where you set recording to "false".

call = client.calls.update("CALL_SID", url="https://example.com/no-record.xml",
    method="POST")

Alternatively, you could add Twilio itself as a 3rd call leg in a <Conference> call, and let it handle recording. This way you can use the REST API to modify that leg without disrupting the primary 2 callers, including stopping recording of the call midway through while the other 2 callers are still live.

Megan Speir
  • 3,745
  • 1
  • 15
  • 25
  • The first option sounds good but doesn't quite work. Using RedirectCall with this XML just terminates the existing call and calls the person back. I will move on to the conference option and see how that goes. – ericdc Jun 16 '16 at 19:32
  • It seems you cannot stop a recording in a conference mid call per http://stackoverflow.com/questions/28666495/twilio-start-stop-recording-mid-call – ericdc Jun 16 '16 at 19:37
  • Correct, but the answer goes on to say you might be able to do so by dialing Twilio in as a participant that would essentially be there for the call center portion of the call and then drops leaving the caller and the lawyer on the line with no recording. – Megan Speir Jun 16 '16 at 21:11