api_after_bridge is a channel variable, so using setVariable works just fine. If you need to sched_api is an API only. Check these out:
http://wiki.freeswitch.org/wiki/Mod_commands#Misc._CommandsSo you need an API object in order to use it. I don't know the syntax for creating an api obj in Java but in Lua it goes like this:
api = freeswitch.API();
res = api:execute("sched_api","+300 none my_api my_api_args")
Remember, if the method you are using isn't found in the dial plan tools then it isn't a dial plan application. Make sure it's on the list:
http://wiki.freeswitch.org/wiki/Mod_dptoolsOn the other hand, API commands are listed here:
http://wiki.freeswitch.org/wiki/Mod_commands
dptools require a session object, api commands require an api object...
-MC