WebRTC (Web Real-Time Communication) allows users to quickly move a conversation from text to voice calls and allows users to manual dial their customers. We've created a webrtc widget version of our webphone inside of the product. This allows you to add webrtc webphone capabilities in your CRM and internal systems.
What does it looks like?
Once the phone is installed into your system there are three modes for the phone.
The first is a full right-side push over to bring in the phone, but not overlap on any of your system.
Inbound Call
Once an inbound call comes in the user will be alerted by a temporary pop-up to be able to accept the call.
Phone Feature Breakdown
On the top left are the phone status:
Green indicates you are authenticated to the phone, available for inbound calls and want to place outbound calls if a phone number is clicked or manually dialed.
Checking the button under the phone number to unauthenticated the phone, so that all inbound is directed to the phone number url and outbound calls can not be placed.
Checking the phone icon to red sends all inbound calls to the phone number url, but allows for outbound calls to be placed.
Mute and Pause
Located under the dial pad are two icons. One if for muting live calls with no sound. The other is for placing a call on hold with default play music.
Authentication and Installing the phone
If you are ready to install the webrtc phone into your CRM or system there are a few elements to keep in mind.
-
Each webphone user must be created as a user inside of Ytel
-
Each webphone user must be assigned to a phone number in the account
-
Each webphone user must have at least the user role of webrtc
Installing the Phone
https://webphone-widget.ytel.com/readme/
Authentication for the phone
It is important to note that a single phone number will be assigned to each user through the Account Settings section of the Ytel interface or through use of the Ytel APIs.
User interface
Log-in to the Ytel platform and navigate to Settings and then User. If this is your first time creating a user, check out this article. Once you are in the user section, you will click onto the name of the user you want to edit. In that section you will see the web-phone setting where you can select from one of your Ytel owned numbers. Once you have assigned a number to a user it can only be utilize for the WebRTC platform for inbound calls and can only be assigned to one user at a time. Before you select a number, make sure you are not using that number in the Tracking feature or have a custom inbound url assigned. If you do, that inbound XML will be ignored and all calls will go to the WebRTC phone.
APIs
Ideally it is best to create users, assign the role and assign the webphone number through the API. That way you can add those API calls onto the existing calls you have in your system. When a user is created through your system, your customer just sees that they have access to a webphone as well.
-
Create a Long Lived Token
-
Create a user
-
Update Role
-
Purchase a phone number
-
Assign Webrtc phone
Create a Long Lived Token
The account owner role on the Ytel system is the only user who is able to create a Long Lived token. That token can be use for authentication to create and update users. For the account owner, log-in and navigate to the settings API Token section. From that section click on create token. You will be prompted to name your token and also limit the amount of days you want to token to exist for. Once you create the token it will be exposed for you to copy and store. Once you create a token it is only exposed on creation and will not longer be viewable by the Ytel user interface for security.
Create a user
Once you have your long lived token you will want to use our API to create users.
Creating a user:
https://api.ytel.com/ams/v2/users
Request payload:
{
“belongAcctId”: “ACCOUNTSID",
“clientId”: null,
“firstName”: “Annie”,
“lastName”: “Apple”,
“password”: “OneOneTwoTwo222”,
“phone”: “+1234567899”,
“roles”: [
“webrtc-agent”
],
“status”: “active”,
“username”: “example@dev.com”
}
Purchase a phone number
If you don't have any phone numbers in your account you can purchase a number inside of the application as well as through the API - https://api-docs.ytel.com/#953fe60c-bc5b-4dec-8be2-d85395c498d1
Assign Webrtc phone
POST
https://api.ytel.com/api/v4/number/webrtc/
Request payload:
{“phoneNumber”:“+1234567899”}
This api call needs to be made using the user's token. It can not use an owner's token at this time.
Code for buttons to allow manual click a phone number to open with the webrtc phone
Utilizing Sub-Accounts
Some customers like to organize their users under companies. To achieve this a sub-account can be created for a sub-organization and users can be created under that sub-account.
https://api.ytel.com/ams/v2/accounts
Request payload:
{
“domain”: “”,
“name”: “Apple Lending”,
“phone”: “+1234567899”,
“isParentAcct”: false,
“parentAcctId”: “ACCOUNT SID”,
“source”: “Customer”,
“status”: 1,
“id”: null
}
Click to Call functionality with your CRM
CRM customers like to add the quick click ability to pass a clicked phone number from their CRM into the webphone. You can accomplish that by adding the following to your code.
<a href="#" onclick="YtelWebphone.call('+12223334444')>+12223334444</a>