Enable, disable, set and check a forwarding for a DID
You can configure the management of the forwarding for a DID using an IVR. The management can be done using a different DID, but let's do with the same DID, just to make things more complex.
Let's start from a very simple configuration, where the DID is pointed to a Queue. We'd like to forward this DID to an external number in case of needs, with the ability to set the external number.
To accomplish all the feature we need, an IVR accepting the several options will be needed:
1) activate the forwarding on the DID
2) deactivate the forwarding on the DID
3) play the forwarding number configured
4) set a forwarding number
The key to having this working will be to use a variable to hold the forwarding number. So we are going to create one, named "FORWARDNUMBER"
To set the forwarding number we need to create a small media file to ask for the forwarding number and then read and store the number in the variable using a custom destination
To play the forwarding number we can use another custom destination
To activate and deactivate the forwarding, we'll use the embedded special destination
We need now to create a custom destination to forward the call to the number contained in the variable, using the Forward To custom destination:
Let's organize all in the same IVR
Now, we can assign this DID to the IVR, but before we need to hide it, so it can be triggered when needed. We'll create a "Please wait while we connect to your destination" message and while this message is played, we'll read a pin code. If that is the correct one, the IVR will be activated, otherwise, the usual destination will be connected.
Let's see how the DID is now configured:
The resulting diagram will be