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 to forward the call to.
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 refer to the step by step instructions available here