xTalk Twilio Call

I. Installation

Register account at Communication APIs for SMS, Voice, Email & Authentication | Twilio 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

 

Screen Shot 2023-02-28 at 14.06.24.png

b. Get an API Key

Go to the API Keys section under Account in the Twilio Console

Click on “Create a New API Key”

 

Screen Shot 2023-02-28 at 14.08.16.png
  • 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

  1. Model config call price per min

  2. You start a conversation with model. in top right header, you can see phone icon. click on it to send model a call request

 

  1. 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

 

  1. To end a call, click on hangup phone icon

 

Â