Twilio call forwarding just hangs up - twilio

I'm just following the instructions. From my Twilio dashboard, it shows the call incoming but no calls outgoing. What am I missing? Do I have to set a call forwarding option somewhere? I don't see any.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Number>+6612345678</Number>
</Dial>
</Response>

Related

Twilio client not receiving incoming event

I am trying to build a phone component that can handle twilio calls and I got outgoing working but when I try to receive phone calls no events are fired and my console shows no answer from the client, my token is given identity test, this is the twiml returned
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial answerOnBridge="true" callerId="(my twilio phone number)">
<Client>
<Identity>
test
</Identity>
</Client>
</Dial>
</Response>
The browser has a console.log added to the device.on("incoming") event but it does not fire, what am I doing wrong?

Twilio <Pay> Error: No callsid in the DTMF message

When I'm trying to make a test call from TwiML Apps page (https://www.twilio.com/console/phone-numbers/runtime/twiml-apps/) for Pay TwiML:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Pay/>
</Response>
During pressing of first DTMF button I get error message No callsid in the DTMF message and end of call.
Has anyone met such a problem?
Solved!
PCI Mode should be set to Enabled.
Such an unobvious error response :(

Twilio outbound call didn't wait the agent to answer and add client to call

Here is the logic :
a client is filling a quiz and once he finished twilio will call one of the customer agent using webhook then add the client to the call using twiml Dial. I'm sending the client number as a parameter to the twiml file it look like this https://handler.twilio.com/twiml/EH15xxxxxxxxxxxxxxxxx?clientnumber=+1234567890
And here is my twiml code :
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial answerOnBridge="true">
<Number>
{{clientnumber}}
</Number>
</Dial>
</Response>
The problem here is that twilio calls both the agent and the customer at the same time but what I need is to call the agent first then not call the customer until the agent answer the phone.

Call Twilio Client from Twimlet

Dialing a Twilio client app requires the <client> twiml noun. Is there a way to generate the Twiml necessary to forward a call to a client using a Twimlet? Ideally, the simulring would accept client OR numbers, but it does not appear to.
You can use something like this to simulring a mixture of clients
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial callerId="+1234567890">
<Client>Bob</Client>
<Client>Steve</Client>
<Client>Ted</Client>
</Dial>
</Response>
Remember that you must provide a valid callerId when calling out to a client or the call will fail.
If you want something like the sumulring TwiMLet you can host this code by pasting your TiwML into the Echo TwiMLet https://www.twilio.com/labs/twimlets/echo or by using TwiMLbin http://twimlbin.com/.

Receive call and dial single digit back with twilio?

I'm trying to answer a phone call and dial a single digit back depending on an input from the user, is this even possible with twilio?
edit: thanks for the downvote, if you knew the twilio API you would've known this is a valid question.
Twilio developer evangelist here.
After using <Gather> to collect your user input you can respond with Twiml containing the <Play digits="1"> verb to play DTMF tones during a call.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action="/process_gather" method="GET">
<Say>
Please enter a digit
</Say>
</Gather>
</Response>
At /process_gather your server would respond with:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play digits="digit to play..."></Play>
</Response>
Please let me know if I can help further!

Resources