Using asterisk, you can easily create a call file using a shell script. Here is a basic example that i have used in the past. When you run the shell script it creates the call file in the asterisk outgoing call directory, asterisk automatically reads the file and dials the number and connects it to an extension.
echo -e "Channel: SIP/PeerName/+14125551212\nCallerID: Test <4125550000>\nMaxRetries: 1\nWaitTime: 5\nContext: sip\nExtension: 15555551234\nPriority: 1\nArchive: Yes" > /var/spool/asterisk/outgoing/4125551212.call
Hope this may help get you going.