Execute System Command

How can I execute a System command in the dialplan at every incomming call? When someone calls I want to execute a program on the server which sends the calling information to a other program.

Use the Asterisk system command for example to call the program sendfax from a dialplan:

exten => s,n,system(sendfax -d 18005551212 /stupid.txt)

This calls the program sendfax the way that you would type it at the Linux command prompt:

sendfax -d 18005551212 /stupid.txt