I'm implementing warm-transfer in my App suggested by Twilio.
I need all this feature as follows:
https://www.twilio.com/docs/voice/tutorials/warm-transfer
I downloaded this sample from Github to check if this approach will be suitable:
https://github.com/TwilioDevEd/warm-transfer-csharp
Now the problem I'm facing is, I cannot put the first caller on hold listening to some music while 1st agent calls to 2nd agent and tell them about caller's problem and hang up themselves(i.e. 1st agent)
I have added this piece of code in the sample code to put caller on hold:
public async Task<ActionResult> CallAgent2(string agentId)
{
var call = await _callsRepository.FindByAgentIdAsync(agentId);
var participant = ParticipantResource.Update(
pathConferenceSid: call.ConferenceId,
pathCallSid: call.ConferenceId,
hold: true,
holdUrl: new System.Uri("http://twimlets.com/holdmusic?Bucket=com.twilio.music.classical")
);
var callBackUrl = GetConnectConfereceUrlForAgent(agentId, call.ConferenceId);
_callCreator.CallAgent("agent2", callBackUrl);
return new EmptyResult();
}
But I'm getting error of "Error 20404" by Twilio.
Please let me know how can I achieve this or if I can use some other better approach to fulfill my requirement.