Endpoints

Endpoints is a term used with the Vonage Voice API to describe the different destinations a call could be connected to. Each endpoint type has its own addressing format and other related metadata that can be sent along with the call. The most common type of endpoint used is phone, which is for making phone calls to regular phone numbers anywhere in the world. This network of phones is known as the Public Switched Telephone Network (PSTN).

When making a call (using the Make a Call REST API or Connect action), your application defines the endpoint and its type. When your application receives a call, the endpoint type is provided within the endpoint parameter of the Answer webhook.

Phone

The phone endpoint takes a required value of number, which is the number to be called in E.164 format. E.164 format is the full international format without any leading zeros or + signs, for example 447700900123 for the UK or 14155550100 for the US.

Learn more about number formatting in the Numbers guide.

SIP

SIP (Session Initiation Protocol) is used to connect a call to your own SIP system, such as an office PBX or other telephony service using the standards laid down in RFC3261. To connect to a SIP endpoint, you should provide the address in SIP URL format: sip:user@example.com.

Learn more in the NCCO Reference.

WebSockets

Vonage offers the ability to connect a call to a WebSocket endpoint where the audio of the call is sent and received in real-time over a long-lived HTTP connection.

With WebSockets, Vonage acts as the HTTP client and makes an HTTP request to your web server, which should then upgrade that connection to a WebSocket.

The endpoint is addressed via a uri parameter, which should be a standard WebSocket URL starting with either ws:// for plain HTTP or wss:// for TLS enabled servers.

Learn more in the WebSockets guide.

WebRTC (In-app)

Vonage offers a Client SDK to embed voice calls within your web or mobile applications using WebRTC technology. The call can be triggered from your client application using the SDK serverCall method or from your backend application with the Create an outbound call API or Connect action, depending on your desired call flow. The endpoint type for in-app calls is app.

To make an in-app call via REST API, you should use the v2 version of /calls API.

Learn more in the In-app Voice Overview guide.