call forwarding twilio
Hi! I'm working on a Twilio integration for handling phone calls and everything is working fine so far . I have a question about call forwarding (I haven't finished setting it up yet):
Let's say:
A person (P) calls my company's Twilio number (L1).
During the call, P asks to speak with a human agent.
I want to forward the call to a real employee (H1).
Question:
Can Twilio initiate an outbound call from L1 to H1 while it's still handling the inbound call from P?
In other words, is it possible for L1 to "bridge" or connect both calls (inbound + outbound) together?
Or do I need a second Twilio number/line to do the forwarding?
Thanks in advance!
1 Reply
Yes – you can keep everything on the same Twilio number (L1).
Inside your Voiceflow agent you simply insert a Custom Action step that returns a short piece of TwiML. When the caller (P) reaches that step, Twilio pauses the current leg, places a new outbound leg to your human agent’s phone (H1) from the same phone number, and bridges the two legs together as soon as H1 answers.
How to drop this into Voiceflow
1. Add a Custom Action block after the user says “speak to a human”.
2. Set Action Type →
twiml
and Body Type → Text
.
3. Paste the <Response>
snippet above (replace the number with H1’s real number).
4. Publish your agent – that’s it.
Because Twilio is running both legs, you do not need to purchase or assign a second phone number. The original caller keeps seeing L1 on their screen, while your employee sees L1 as the caller-ID of the bridged call.
If you ever want to forward to a SIP desk phone instead of a PSTN number, use the same approach but put a <Sip>
tag inside <Dial>
(see the “SIP Forwarding” section in our docs).
Docs for reference
• Voiceflow – SIP Forwarding example (shows the same Custom Action pattern): https://docs.voiceflow.com/docs/sip-functionality#sip-forwarding
• Twilio – <Dial>
verb details: https://www.twilio.com/docs/voice/twiml/dial
Hope this helps! 🎉