Outbound Trunk

Plivo can be used as an outbound trunk to make calls from your soft switch like FreeSWITCH or Asterisk.

Prerequisites

Sign up for a Free Developer account at plivo.com, and verify your phone number.

Set up your Plivo Application

We’ve deployed a custom trunking application for you to get started. You will have to create a Plivo application and link it to your Plivo number.

  1. Navigate to the Application page on your Plivo dashboard.

  2. Click on ‘Create’ to create a new application.

  3. Enter the following URL in the ‘Answer URL’ field and set the Answer Method as ‘GET’. Replace {auth} with a auth string which you will send us on the SIP INVITE. We’ll explain this in much more detail below. For now lets assume AUTH=plivo

    http://easytrunk.plivo.com/response/sip/route/?AUTH={auth}

    Create Application

  4. Check the “Public URI” checkbox before click “Create” to save the application.

  5. Make a note of your application SIP URI. You soft switch should send calls to this URI.

    Application SIP URI

Forward Calls from your Soft Switch

You will have to forward calls to the application SIP URI with the following custom SIP headers.

X-PH-auth={auth}

X-PH-destination={destination}

X-PH-clid={clid}

X-PH-dial_music={dial_music}

Replace {auth} with the auth string you added to the application Answer URL in the above steps.

Replace {destination} with the destination mobile or landline number.

(Optional) Replace {clid} with a valid number to be used as the Caller ID.

(Optional) Replace {dial_music} with “real” which will play the real ringtone of the called party.