How to build a Conference line with Twilio Functions
Time to read: 2 minutes
Another conference call, another app, another PIN, another log-in. Joining conference calls shouldn’t take more than simply dialing a phone number. Lets walk through how you can quickly build a conference line anyone and everyone can use with Twilio Functions.
Setting up a Twilio Function
You’ll need to create a Twilio account if you don’t already have one. From the Twilio Functions page in your Twilio Console, create a new Function and select the “Blank” template as seen in this image:
Give your function a name and a path.
Writing code to handle incoming calls
Now replace the default code in the function with the following code for our app, and click save:
In this code, we are responding to the HTTP request Twilio sends when a phone call is received with some TwiML that tells Twilio to greet the caller, and then dial them into a conference line. In a Twilio Function, you already have access to the Twilio Node library, so no more setup is necessary. When you're finished generating the TwiML in your code, you call the callback
function and pass null
for the error and the twiml
object you created for the response content.
Getting everything running
Now buy a Twilio number so you can link it up to your Function. After buying your number, scroll down to the “Voice and Fax” section and under "A CALL COMES IN" configure it to call your function whenever someone calls your Twilio number, as seen in this image:
You are now ready to receive a phone call to your new Twilio number. Give your new conference line a spin and have some friends join you to test it out!
Give your friends and colleagues a call
Now that you know how to create a basic conference call, try building off of it with other features from our Conference TwiML docs such as joining a Conference on mute, silently bridging calls, or making a conference call moderated.
I’m looking forward to seeing what you build. Feel free to reach out and share your experiences or ask any questions.
- Email: sagnew@twilio.com
- Twitter: @Sagnewshreds
- Github: Sagnew
- Twitch (streaming live code): Sagnewshreds
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.