1

We are able to record voice mail with Twilio Voice and Node.js and we have the recording URL. We need this recording to be delivered to the user's voice mail inbox (carrier side).

This is what we've got so far.

Endpoint for recording:

twiml.say('Please leave a message on the call.\nPress the star key when finished.');
  twiml.record({
    action: `${serverURL}/voiceHangup`,
    method: 'POST',
    timeout: '180',
    maxLength: '20',
    finishOnKey: '*',
    recordingStatusCallback: `${serverURL}/voiceMailResponse`,
  });

endpoint for /voiceMailResponse

voiceMailURL = res.RecordingUrl;

The voiceMailURL is the URL with the recording that needs to be delivered to user voice mail inbox at carrier side.

Swimburger
  • 6,681
  • 6
  • 36
  • 63
Seby K P
  • 17
  • 4
  • You haven't shown us what `res` is defined as or where it's set, as it is currently written your post is unclear. – Aaron Meese Nov 11 '22 at 16:28
  • @AaronMeese hi, thanks for the reply. res is the response body in that endpoint /voiceMailResponse. We have the recordingURL received from the response body of the recordingStatusCallback url. – Seby K P Nov 14 '22 at 02:55
  • Can you elaborate on vm box at carrier side? – Swimburger Nov 14 '22 at 22:39
  • @Swimburger Actually the requirement is for Doctors to send voice message to patient, the voice message needs to be delivered to patient side voice mail box. Patient is having normal telephone. We have acheived the recording part and also we can able to call patient telephone and able to play the message, but we want the message to be delivered to the patient VM box so that patient can listen the same at a later time also. – Seby K P Nov 15 '22 at 04:53
  • Got it @SebyKP, I do not know, but I will do some digging. Thank you for clarifying! – Swimburger Nov 15 '22 at 05:04
  • @Swimburger One more point would like to get a logic: Currently the recording of voice is happening like record start after the beep and to finish, press any key (for eg. star). Can be the recording possible like it starts by pressing and holding a key and finish on release of that key ? – Seby K P Nov 16 '22 at 08:56
  • That's not possible, I'm afraid. – Swimburger Nov 16 '22 at 15:59

1 Answers1

1

Twilio does not provide a way to deliver voicemails straight to a voicemail inbox. However, this may also not be the best user experience, as the patient may actually want to pick up the call if they can.

Here are some alternative solutions that you could build:

  • Call the phone number and use Answering Machine Detection to detect a voicemail inbox. Based on whether it's a voicemail inbox, you can apply different logic.
  • Build your own voicemail inbox using node.js and Twilio that the patient can call and interact with. When a new voicemail message is added, you can call or text the patient.
Swimburger
  • 6,681
  • 6
  • 36
  • 63