Asterisk-ra uses asterisk manager interface.
You can use it to originate calls, redirect them, hang up calls,...etc.
From
http://wiki.java.net/bin/view/Communications/MobicentsAsteriskRA:
in addition, through the use of
CommandActions
(which encapsulate CLI commands) further functionality is available, in
particular regarding asterisk configuration and status; this includes
several methods of getting information regarding various aspects
(codecs, channels, mappings, dialplan, applications�) and also the
ability to change some, such as adding or removing extensions �on the
fly�.
For a list of manager commands you can see:
http://www.voip-info.org/wiki/view/Asterisk+manager+APIUnfortunately, asterisk manager interface is not interesting as the agi interface which is not implemented in the asterisk-ra.
With the agi, you can pass your call to a script (php, perl, python,...) and implement the logic that you want. The commands available for the agi are described here:
http://www.voip-info.org/wiki/view/Asterisk+AGI