To set up the call forwarding application, you need to set up an XML response using the<Dial> element. A demo call forwarding app comes under the Application tab in the dashboard by default.
The logic of call forwarding at Plivo is simple. First you receive an incoming call to your Plivo number(s). Plivo will look for the answer_url from your call forwarding application which the number is attached to. The answer_url should respond to the Plivo’s request with an XML document which tells Plivo which number/ endpoint to forward the call.
You can also use our demo application which is available in your account named Call forward
Answer_URL of the application:
Number 1: Primary destination
Number 2: Failover destination
Add the priority destination and failover destination so that the inbound calls to the Plivo DID can be forwarded to the destinations set.
You can also forward the calls to a Sip endpoint using the same URL:
You can also refer to the step by step instructions available here
The same Use case can also be achieved using PHLO. Kindly check this link for more details.