WebRTC
During this introductory period, WebRTC is the only kind of Endpoint supported.
WebRTC Endpoint Behaviors
WebRTC Endpoints in Bandwidth's Real-Time Communications Platform have unique behaviors and lifecycle considerations. Understanding these is crucial for building robust, real-time applications.
Endpoint Creation and Authentication
When you create a WebRTC Endpoint, you receive a JWT (JSON Web Token). This token is required to connect a device to Bandwidth's BRTC platform. You are responsible for securely distributing these tokens to the devices that need to interact with BRTC.
Devices must be registered as endpoints before they can be used in calls. This means that you must create an endpoint and distribute the associated token to the device before it can connect and participate in calls.
Endpoint Lifetime and Expiration
WebRTC Endpoints are valid for 24 hours from creation. After this period:
- Any existing tokens, device connections, and ongoing calls associated with the endpoint will be terminated.
- If the endpoint is in a call with a PSTN call at expiration, the PSTN call will persist and continue to the next BXML verb execution.
Connection Management and Cost
There is no cost associated with an endpoint unless it is actively connected to a call or another endpoint. For optimal performance:
- Connect devices early and keep them connected between calls when possible.
- Maintaining a persistent connection reduces negotiation time when calls are initiated or disconnected.
Outbound Connection Requests
WebRTC Endpoints can request outbound connections to a target (specified by type and ID). When this occurs:
- The request is forwarded to the customer as a notification.
- The customer must review the request and, if approved, make the necessary API calls to create the other call leg and connect it.