I am looking for a solution for dynamically changing the channel_variable, destination_number without needing to reloadxml (as it might affect ongoing or incoming call). So basically, FS has to wait till I provide it with appropriate destination_number. Till now, I have been doing it XML way (editing XML files) and then reloadxml command at FS prompt. But that is not viable for my requirement
You can use Lua(or any other freeswitch supported scripting language) script for this. Using Lua you can write custom script with very sophisticated logic.
More details:
https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference