Twilio answer button -
instead of having browser calls answered immediately, how create answer or decline message? have decline stop incoming call or send voicemail if setup. setup mute/unmute button , keypad entering numbers need if call placed automated system, don't see examples in docs or quick start.
twilio.device.incoming(function (conn) { conn.accept(); });
you can prompt user call , give option accept or reject call, making use of connection.reject() function.
<script type="text/javascript"> twilio.device.incoming(function (connection) { if (confirm('accept incoming call ' + connection.parameters.from + '?')){ connection.accept(); } else { connection.reject(); });
see mute , senddigits functions of connection: https://www.twilio.com/docs/client/connection
Comments
Post a Comment