To generate a call using the Asterisk Manager Interface (AMI), first you will need to write a dialplan context in /etc/asterisk/extensions.conf that performs the desired actions after the call is connected. (Playback a sound, then hangup.) From the external system, use AMI to Login and Originate a call to the desired destination. In the originate action, point the call to the context and extension of the dialplan you created. When the call connects, Asterisk will perform the actions you specified in the dialplan.
To answer a call and record it, create another dialplan context that uses the Answer and Record applications. When the extension is called, Asterisk will answer and begin recording.