xTalk Twilio Call
I. Installation
Register account at https://www.twilio.com/ and login then get API keys below
1. API keys
Account → Keys & Credentials → API keys & tokens
a. Account SID and Auth token
Twilio uses the Account SID and Auth Token to authenticate API requests. The Auth Token can be rotated in the Console
b. Get an API Key
Go to the API Keys section under Account in the Twilio Console
Click on “Create a New API Key”
Add a friendly name
Choose "Standard" for the key type
c. Update all twilio settings in Admin
2. Setup Webhooks Notifications
Go to Video Room settings > webhook notifications or link https://console.twilio.com/us1/develop/video/manage/room-settings and add webhook URL as below
Callback URL: https://api.example.com/v1/talk/callback
HTTP Method: HTTP POST
3. Rooms Settings
Configure room as settings as Peer-to-peer as below
https://console.twilio.com/us1/develop/video/manage/room-settings
II. How to use
Model config call price per min
You start a conversation with model. in top right header, you can see phone icon. click on it to send model a call request
In model notificactions, list all pending call request. it redirect to the conversation. To start join a call room, click on pick up phone icon
To end a call, click on hangup phone icon