How to save the dialed number and use it later in call flow
The dialed number (the number you have called) is stored in the EXTEN variable at the beginning of the call flow. Later in the call flow the value of EXTEN variable is changing depending on the call routing. So, if you want to keep the value of the dialed number you should store initial EXTEN value in some other variable.
Here is an example how to save dialed number and use it later in callflow: