Trigger an Asterisk command over shell

Hello,
i have a new project.
I want to trigger an command like to call a number over shell. Is that possible?
more accurate: we have an door system what is connected with out customize asterix system.
If anyone rings, the door calls a number, anyone answer the call and push *2 on the phone to open the door.

I want to create a shell script what trigger this.

Any ideas?

There are two steps to this. First look at the command line options to see how to issue a CLI command, then look at the originate CLI command (help originate).