0

this is my twiml what I m using to connect the call-

<Response>
 <Dial action="dailemptyqueueurl"> 
<Client statusCallbackEvent="initiated ringing answered completed" statusCallback="twilio_call_notification_handler.php" statusCallbackMethod="POST">cleint</Client> 
</Dial>
 <Redirect>holdmusic</Redirect> 
</Response>
John Ambrose
  • 167
  • 1
  • 11

1 Answers1

1

Twilio developer evangelist here.

This is a slight hangover from my previous advice, so sorry for that.

Firstly, when <Dial> has an action, it will go onto that URL instead of continuing with the TwiML and going to the <Redirect> in this case. So watch out for that.

Secondly, because we have used this technique then calls don't just end. However, you are using, I believe, Twilio Client with your agent. So, when you hangup the call on the agent end, you could make a request to your server to use the REST API to hang up the user end too.

philnash
  • 70,667
  • 10
  • 60
  • 88