使用 Twilio 配置 ICE 服务器

Odoo Discuss uses WebRTC API and peer-to-peer connections for voice and video calls. If one of the call attendees is behind a symmetric NAT, you need to configure an ICE server to establish a connection to the call attendee. To set up an ICE server, first, create a Twilio account for video calls, and then, connect that Twilio account to Odoo.

创建一个 Twilio 帐户

First, go to Twilio and click Sign up to create a new Twilio account. Next, enter your name and email address, create a password, and accept Twilio’s terms of service. Then, click Start your free trial. Verify your email address with Twilio, as per their instructions.

Next, enter your phone number into Twilio. Then, Twilio will send you an SMS text message containing a verification code. Enter the verification code into Twilio to verify your phone number.

After that, Twilio redirects to a welcome page. Use the following list to answer Twilio’s questions:

  • For Which Twilio product are you here to use?, select Video.

  • For What do you plan to build with Twilio?, select Other.

  • For How do you want to build with Twilio?, select With no code at all.

  • For What is your goal today?, select 3rd party integrations.

The Twilio welcome page.

如有必要,更改帐单国家/地区。 最后,单击:guilabel:Get Started with Twilio

找到 Twilio 帐户 SID 和身份验证令牌

To locate the Account SID and Auth Token, go to the Twilio account dashboard. Then, click Develop on the sidebar. In the Account Info section, locate the Account SID and the Auth Token. Both of these are needed to connect Twilio to Odoo.

The Twilio Account SID and Auth Token can be found uner the Account Info section.

将 Twilio 连接到 Odoo

打开 Odoo 数据库并转到:菜单选择:设置 --> 总的设置 --> 讨论。 选中 Use Twilio ICE servers 旁边的框并输入 Twilio 帐户的 Account SID 和 Auth Token。 最后,单击 Save 以应用这些更改。

Enable the "Use Twilio ICE servers" option in Odoo General Settings.

定义自定义 ICE 服务器列表

Twilio 配置不需要此步骤。 但是,如果 Twilio 未配置或在任何给定时刻不工作,Odoo 将退回到自定义 ICE 服务器列表。 用户必须定义自定义 ICE 服务器列表。

In Settings ‣ General Settings ‣ Discuss, click the ICE Servers button under Custom ICE server list.

The "ICE Servers" button in Odoo General Settings.

Odoo will redirect to the ICE servers page. Here you can define your own list of ICE servers.

The "ICE servers" page in Odoo.