All commands (APIs) you can execute from cli in the FreeSWITCH console are also available to be used in dialplan.
Many API commands are provided by mod_commands (search for it in http://freeswitch.org/confluence), but usually all modules add their own API commands you can execute from the console command line. From the console, type "help" for a quick overview.
The general form to execute an API command from dialplan is:
${api_command(argument01 argument02)}
You may use the "set" action, and assign to a channel variable (that you maybe will not use) the string returned from the console command line.
API commands' arguments are between parenthesis and separated by spaces; if there are no arguments, use empty parenthesis.
The third action line of this example extension will try to unload mod_verto from FreeSWITCH, and the fifth action line will give us the SIP dialstring to call the caller (if the call was originated by a registered phone):
<extension name="API">...