Skip to main content

Endpoints

  • Can I make an outbound call to the SIP URI of a Plivo application?

    Yes, you can make an outbound call to the SIP URI of a Plivo application. For example, you can make an HTTP POST request to originate an outbound call to “sip:example@app.plivo.com” which is the SIP URL used to identify the Plivo application.

    If you’re expecting to receive calls to your SIP URI, you must create an SIP endpoint that’s attached to your Plivo application in the ‘Endpoint’ tab. Share this endpoint with others, not the SIP URL of your application.

  • Can I register a single endpoint on different devices?

    Yes, you can register a single endpoint in different devices. However, we do not recommend this set up because the softphone, hard phone, Android app, iOS app, or the web app to which you have logged into most recently using your endpoint will be the default destination to make and receive calls. The last device to which you logged in will be the registered device ready to make/receive calls, which may cause some conflicts with other devices you wish to use to make or receive calls.

  • Troubleshooting Plivo Endpoints

    This guide will cover a few of the issues you may face while using Plivo Endpoints to make/receive calls:

    • Unable to login 
    • Unable to make calls
    • Unable to receive calls
    • Call disconnected 
    • Call quality

    Unable to login:

    Make sure that you are using the right credentials (which you can find here: https://console.plivo.com/voice/endpoints/) to log in. 

    Username endpoint field

    Username: <25 Alphanumeric characters are allowed> + 12 digit number (added by Plivo)

    For example: <username> + 123456788910 (added by Plivo). No special characters are allowed

    Password endpoint field

    Your password can be alphanumeric and contain special characters.

    Character limit: 32 characters

    Alias endpoint field

    Alphanumeric characters are allowed, special characters are not allowed. 

    Character limit: 50 characters

    Unable to make or receive calls: 

    Direct dial: http://plivodirectdial.herokuapp.com/response/sip/route/?DialMusic=real&CLID= PUT YOUR CALLER ID HERE 

    You should have this URL as answer_url for the application that is assigned to the Plivo endpoint.

    Call disconnected:

    • Check the session expiry time that is set up in the softphone, hard phone, or SDK session timeout expiration.
    • If everything is fine, and if the call is not disconnected by the caller or callee, then please contact support@plivo.com so that our Support Team can investigate this issue.

    Call quality:

    VOIP call quality depends on the following factors:

    • Caller and callee network connection
    • Local network setup
    • Caller and callee’s phone network
    • Headset functionality
    • Plivo’s partner carrier
  • What softphones are supported for Plivo endpoints?

    We support and recommend softphones from Xlite, Zoiper, etc. Due to security reasons, the following SIP user agent is not supported:

    regex (VaxSIPUserAgent|Ozeki)

    Note: You won’t be able to use Plivo endpoints with this softphone.

  • How do I receive calls on an SIP Endpoint?

    You can either directly receive calls on a softphone, hard phone, web app, Android app, or iOS app in which the Plivo Endpoint has been configured, or receive an inbound call to a Plivo DID that can be redirected to an Endpoint.

    Inbound calls directly to endpoints:

    You can make calls from a SIP Endpoint to another SIP Endpoint by dialing out to the SIP URI of the endpoint. Find the SIP URI for an endpoint here: https://console.plivo.com/voice/endpoints/ and click on the + sign for the Endpoint for which you need the SIP URI.

    Note: You can make calls to an Endpoint from a Plivo Endpoint or an external SIP endpoint as well (if the external VOIP provider supports that). Alternately, you can also make calls to an endpoint using our outbound call API (https://www.plivo.com/docs/api/call/#make-an-outbound-call): 

    Inbound call to DIDs redirected to endpoints:

    You can use the demo call forwarding application to redirect the inbound calls to a DID and then to an endpoint.

    Demo call forward:

    http://callforward.herokuapp.com/forward/?Users=sip:exampleendpoint12345@phone.plivo.com

    sip:exampleendpoint12345@phone.plivo.com → SIP URI of the endpoint to which you want calls to be redirected. Or, you can set up call forwarding with the help of a Dial XML, similar to the example laid out below, which can redirect calls to the endpoint.

    <Response>

        <Dial>

            <User sendDigits="wwww2410">sip:john1234@phone.plivo.com</User>

        </Dial>

    </Response>

    Answer_url attached to the Plivo DID should return an XML document like the example above.

    Note: The endpoint should be assigned with direct-dial application. 

    http://plivodirectdial.herokuapp.com/response/sip/route/?DialMusic=real&CLID= PUT YOUR CALLER ID HERE

    You can use your desired phone number as caller ID.

  • How do I make an outbound call using an Endpoint?

    You can use a Plivo Endpoint with an SIP phone, like Xlite and Zoiper, to make calls and receive calls. Likewise, you can also use our webSDK, Android SDK, iOS SDK to make calls and receive calls – learn how in this guide: https://www.plivo.com/docs/sdk/ 

    How to configure an SIP Endpoint with an SIP phone:

    1. To create an SIP endpoint, navigate to https://console.plivo.com/voice/endpoints/add/
    2. Add the direct dial app so as to make calls and receive calls, navigate to https://console.plivo.com/voice/applications/add/ and add the answer_URL of the application as http://plivodirectdial.herokuapp.com/response/sip/route/?DialMusic=real&CLID= PUT YOUR CALLER ID HERE. 
    3. Ensure that you replace the caller ID with your desired phone number.
    4. Assign the application to the SIP Endpoint created.

    Follow the instructions for Xlite or Zoiper or use our SDK to make calls and receive calls.

  • How do I register an Endpoint on my soft/VoIP phone?

    Overview

    Plivo Endpoint extends the capabilities of your existing SIP phones, allowing you to add custom business logic when calls are made or received. 

    Traditionally, SIP phones have had very basic functionality and need to be connected to a PBX. Plivo Endpoints eliminate the need to set up and manage a phone system. Any Plivo application can implement the business logic you need to control the SIP phone. Best of all, this business logic can be written using any of your favorite web languages without any telecom background knowledge needed. Plivo supports all popular SIP-based softphones and hardware phones like Bria, Cisco, Polycom etc. Below are some interesting examples to add to your existing SIP phones:

    1. Instant conferencing: calls made through a SIP phone registered with the Plivo can directly be added to a conference bridge.

    2. Access control: with a few lines of code, one can add the ability to restrict calls made from SIP phones or limit the phone to only receive calls.

    3. Monitoring and reporting: monitor and report all calls made or received using a SIP phone. Create custom dashboards to analyze the data collected using the APIs.

    4. Smart routing: add intelligent extensions and shortcuts which route calls to/from traditional phone networks and WebRTC enabled phones. 

    How it works

    Once your SIP phone is configured and set up, your device will register with and establish a connection to Plivo. When you initiate a call using the SIP Phone, you’re not connecting to another phone or extension directly. Rather, you’re instructing Plivo to fetch the XML from the attached application on your server to handle the call request. This is similar to the way Plivo handles incoming calls from a regular phone number. All Plivo XML elements are available to handle the call request. You can also use the <Dial> element to dial to a regular phone, WebRTC device or any other SIP phone.

    Getting started

    1. Sign up for a Plivo account.

    2. Create an Endpoint by visiting this link. Click on ‘New Endpoint’ and fill in the required details.

    3. Make a note of the username Plivo assigns you. Plivo will add random numbers in front of your username. Your username will appear to be yodaXXXXXX. For the purpose of this tutorial, Username - yodaXXXXXX, Password - obiwan, Alias - obiwan

    Configure your SIP phone

    Download and install a softphone. If you are on Mac or Windows, download X-lite. On Linux, you should download Blink. For this tutorial, we will use the X-Lite Softphone.

    Launch X-Lite and navigate to preferences. Click on the Accounts tab and hit the ‘+’ icon to add an account.

    Screenshot__5_.png

    Add the credentials of the endpoint you created during the final step from “Getting Started” - User ID - yodaXXXXXX, Password - obiwan, Domain - phone.plivo.com, Display Name - Yoda Authorization Name - yodaXXXXXX (same as your username)

    Note: Field names may vary based on the make and model of your SIP phone. All the configurations will remain in each case.

    Screenshot__4_.png

    Click OK when you’re done.

    Your endpoint entry in the list will as “enabled”. This indicates that your SIP phone has successfully registered with Plivo.

    Using a default dialer app

    To start making a call, attach the default direct-dial app to the Endpoint you just created now.

    If you have already created the Endpoint - go to the Endpoints tab and click on the Endpoint username. This will open an Endpoint edit window. Select the Direct Dial app from the “Application” dropdown list.

    end.png 

    Next steps: customizing the Endpoint app

    When a call is made from the softphone, Plivo will send a request to the ‘Answer URL’ of the application attached to the Endpoint with the parameters related to the call. Plivo expects a valid XML response from the answer URL in order to proceed with the call. 

    Let’s assume in our case, we want to create a simple dial application and make an outbound call to the number entered from the softphone. The answer URL will receive a request with the ‘From’ and ‘To’ parameter. We need to parse these parameters and return a Dial XML with the appropriate attributes.

    <Response>

    <Dial callerId="18004321321">

    <Number>18001231234</Number>

    </Dial>

    </Response>

    When the above XML is returned on the request, Plivo will make an outbound call to 18001231234 and connect it with the softphone.