Plivo RESTXML Request

When there is an incoming call on FreeSWITCH, Plivo makes a synchronous HTTP request to the Answer URL, and waits to receive RESTXML in response. Plivo sends call parameters to your application that you can act upon before responding.

Request Parameters

Plivo sends the following parameters with its request:

Parameter Description
CallUUID A unique identifier for this call.
From The phone number of the party that initiated the call along with the country code. E.g. For USA 15671821841. If the call is inbound, then it is the caller’s caller ID. If the call is outbound i.e. initiated via a request to the RESTAPI, then this is the phone number you specify as the caller ID.
CallerName The caller name of the party that initiated the call.
If the call is inbound, then it is the caller’s caller name. If the call is outbound i.e. initiated via a request to the RESTAPI, then this is the caller name you specify as the caller Name.
To The phone number of the called party with the country code. E.g., For USA 15671821841. If the call is inbound, then it’s your incoming phone number. If the call is outbound, then it’s the phone number you provided to call.
ForwardedFrom This parameter is set only when the call received by Plivo is a forwarded call. Its value depends on the caller’s carrier. Not all carriers pass this information. E.g. For USA 15671821841.
CallStatus This parameter depicts the status for the call. The value is one of ringing, in-progress, completed.
Direction Indicates the direction of the call. In most cases this will be inbound, wherein the call would be in a ringing state. If you are using RESTAPI Call or BulkCall it will be outbound, wherein the call with be in an answered state.
ScheduledHangupId This will contain the unique identifier returned by Plivo when using the ScheduleHangup API of Plivo Element. This is useful to cancel the scheduled hangup, if needed. This parameter will not be present in cases when it’s not applicable.
ALegUUID This contains a unique identifier which identifies the First Leg of the call in case it is outbound. In case the call direction is inbound, this parameter will not present.
ALegRequestUUID This contains a unique request identifier which is returned by Plivo in case of a RESTAPI request during an outbound call. In case the call direction is inbound, this parameter will not be present.
HangupCause This contains the reason for hangup of a call (Inbound/Outbound). In case the call is not hung up, this parameter will not be present.

Comments are closed.