2

I am using below code to place a call from agent(Web Browser interface) to customer(phone).

var response = new VoiceResponse();
var dial = new Dial(callerId: callerId,action : "https://ba2d9819.ngrok.io/voice/CallEnd");
if (Regex.IsMatch(to, "^[\\d\\+\\-\\(\\) ]+$"))
{
    dial.Number(to);
}
else
{
    dial.Client(to);
}

response.Dial(dial);

This works fine when customer picks up the call. I have a requirement to play a prerecorded audio message when customer do not pickup the call and it goes to voicemail. How can i achieve this?

Milind Anantwar
  • 81,290
  • 25
  • 94
  • 125

0 Answers0