2

I put the twilio call on hold by following snippet

var twilio = new TwilioRestClient(Settings.AccountSid, Settings.AuthToken);
        twilio.RedirectCall(callSid, Settings.HoldMusic, "GET");

But i want to retrieve the holded call back.. Can you please any one help me with code snippet

HiDeoo
  • 10,353
  • 8
  • 47
  • 47

1 Answers1

0

It sounds to me like what you'd like to achieve is tracking the status of a call that is on hold as described in this FAQ.

You can use the StatusCallbackEvent parameter on outbound calls made via the REST API. If you're indeed using the C# helper library it would look something like this:

var options = new CallOptions();
options.Url = "http://demo.twilio.com/docs/voice.xml";
options.From = "+18668675309";
options.Method = "GET";
options.StatusCallback = "https://www.myapp.com/events";
options.StatusCallbackMethod = "POST";
options.StatusCallbackEvents = new string[] { "initiated", "ringing", "answered", "completed" };

Also, depending on your use case, there is now a dedicated Hold feature available when using <Conference> as detailed in this post.

Megan Speir
  • 3,745
  • 1
  • 15
  • 25