I'm trying to create an customized Music for Call forwarding.
When someone calling the it's redirecting to Enqueue named by "support".
<Response>
<Enqueue waitUrl="waitMusic.xml"></Enqueue>
</Response>
waitMusic.xml (Playing the audio)
<Response>
<Play>http://audio_file.mp3</Play>
</Response>
I don't know how to continue, I tried all out of things, and nothing works. Please help!
You have 2 legs, the user leg and the agent leg.
When the user calls to Twilio's number, Twilio will do a request to your server which should return (same TwiML as you are using, but with a queue name):
This puts the user in hold playing the music from waitMusic.xml if there are no agents available.
But you also need the logic for the agent. The agent will call to a Twilio phone, and in this case you'll return a different TwiML:
This is a "dial queue" (docs) that automatically dequeues any user that is on the the queue "support" and connects them together. If there are no users in the queue, the agent will be put on hold, playing the music from "agentWaitMusic.xml".
It's important to use the same queue name (in this case "support") for both, the "enqueue" and the "dial queue" actions.