This article will teach you how to set up Orderry integration with the Twilio Voice service.
Important: this integration is available starting with the Startup plan.
Сonfigure the Integration in Twilio
The first step is to create and activate a phone number in your Twilio account. You can do this on the Phone numbers > Manage > Active numbers page.
Step 1. Set Up Routing and Webhooks for Your Phone Number
Copy the Notifications address value in the integration configuration window in Orderry. To do this, go to the Settings > Integrations page in your Orderry account, find the Twilio Voice integration, and click the Configure button.
In your Twilio account, go to Phone numbers > Manage > Active numbers and click on the active phone number.
In the Voice Configuration section, set the needed routing.
Below, set the Webhook value in the A call comes in field. Next, paste the value you copied earlier from your Orderry account in the URL field. In the HTTP field, select the HTTP GET value.
Save your changes at the bottom of the page.
Step 2. Add Users (Credentials)
Go to Voice > Manage > Credential lists in your Twilio account and click the + button. To create a new user, you must provide a Friendly Name, Username, and Password.
After you create a user, you can move on to the next step.
Step 3. Create a SIP Domain
Go to the Voice > Manage > SIP Domains page in your Twilio account and click the + button.
You can enter any value in the Friendly Name field.
In the SIP URI field, you need to specify a unique value. You will use this value to add a sip domain to the softphone.
Next, select the user you created in the previous step in the Voice Authentication section > Credential lists field.
Next, enable SIP Registration and select a user in the Credential lists field. Save your changes at the bottom of the page.
Step 4. Connecting a SIP client
1. In this section, you need to create a TwiML Bin with the following code:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial answerOnBridge="true" callerId="Your_Twilio_Number">{{#e164}}{{To}}{{/e164}}</Dial>
</Response>
Remember by assigning a name to the "Outgoing" type.
2. In the section , enter this bin in the SIP domain properties and click Save.
Сonfigure the Integration in Orderry
1. Go to the Settings > Integrations page, find the Twilio Voice integration, and click Configure.
2. Fill in the Account SID and Auth Token fields. You can find the values for these fields in your Twilio account under Account Info.
3. Add a phone number.
Click the + Add phone button.
Enter your active Twilio phone number in the Number (Address) field. You can find it in your Twilio account under Account Info.
Please note that the phone number is unique, and you cannot add 2 handsets with the same phone number.
You can specify any name in the Handset Name field.
In the SIP field, specify the sip domain in the following format:
username is the user's Friendly Name from Twilio
domain-name is the SIP URI of the sip domain from Twilio
Next, you need to grant employees access to this phone number. Please note that if an employee does not have access, they cannot see the incoming call card for this number. Click the Create button.
4. Check the Integration enabled checkbox and save your changes.
Congratulations! The setup is now complete.
If everything is done correctly when clicking on the client's phone number, a list of handsets from which you can initiate a call appears. If a call is received on this handset, an incoming call card appears in the lower right corner of the screen.
How to Connect a SIP Domain from Twilio to Your Softphone
When you add a sip domain to your softphone, the Domain field should have the following value:
domain-name.sip.us1.twilio.com
domain-name is the SIP URI of the sip domain from Twilio
us1 is the routing value that you selected in Twilio
In the Username and Password field, you must enter the information you provided when you created the user in your Twilio account under Credential lists.