0

How emulate press the button during a call to put the incoming call to the extension number of the employee in twilio (php)?

API or smth else, if you know. Thank you.

Example. Our sub-division call to central office and then our system must send "something pressed buttons"

Salavat
  • 111
  • 1
  • 11
  • possible duplicate of [Twilio - Outgoing call - play DTMF tones](http://stackoverflow.com/questions/24561006/twilio-outgoing-call-play-dtmf-tones) – Devin Rader Jul 31 '14 at 17:10

2 Answers2

3

You can use the sendDigits attribute when dialing your number.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number sendDigits="1231">888-123-1234</Number>
    </Dial>
</Response>
I wrestled a bear once.
  • 22,983
  • 19
  • 69
  • 116
0

I did this when setting up my Twilio apartment front door control. I got the right mp3 files for each button and simply played them back. I used this message twimlet:

http://twimlets.com/message?Message[0]=http://jetcityorange.com/dtmf/DTMF-9.mp3&Message[1]=Thank+You+For+Using+The+Callbox
Peter
  • 1
  • 1
  • There are multiple ways to play DTMF tones in Twilio without playing any MP3s. Infact, since you're using the PLAY verb already you can just add a "digits" attribute, no MP3 required. `` will play the dial tone for 123. – I wrestled a bear once. Jul 31 '14 at 17:19
  • 1
    Good to know! It was a quick weekend hack. Trying to get into the flow of actually answering questions on Stack instead of just reading them. You're solution is more useful. If I ever go back to add functionality to my door system I'll use the digits attribute on the play verb. – Peter Jul 31 '14 at 17:21