To set up the call forwarding application, you need to set up an XML response using the <Dial> element. A demo call forwarding app can be found under the “Application” tab in your Plivo dashboard.
The logic of call forwarding at Plivo is simple. First, you will receive an incoming call to your Plivo number(s). Plivo will look for the answer_url from your call forwarding application with which the number is associated. The answer_url should respond to the Plivo’s request with an XML document which tells Plivo which number or endpoint to forward the call.
You can also use our demo application which is available in your account. Look for the application named “call forward.”
Answer_URL of the application:
Number 1: the primary destination
Number 2: the failover destination
Add the priority destination and failover destination so that the inbound calls to the Plivo DID can be forwarded to a set destination. You can also forward calls to an 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 the PHLO. Please read more at this link.