Outbound Trunk - Easytrunk
Plivo can be used as an outbound trunk to make calls from your soft switch like FreeSWITCH or Asterisk.
Sign up for a Plivo account
When you sign up with Plivo, we give you a free trial account and free credits to experiment with and learn about our services. You can add a number to your account to start testing the full range of our Voice and SMS service features.
Follow these steps to get a free trial account:
- Sign up with your work email address.
- Check your inbox for an activation email message from Plivo. Click on the link in the message to activate your account.
- Enter your mobile number to complete the phone verification step.
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.
Navigate to the Voice Application page on your Plivo console.
Click on ‘Add New Application’ to create a new application.
Enter the following URL in the ‘Primary 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}
Check the “Public URI” checkbox before click “Create Application” to save the application.
Make a note of your application SIP URI. You soft switch should send calls to this 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.