Use the channel originate or originate CLI command (Tested on Asterisk 1.8) to connect a channel directly to an application.
Synatx:
1 2 3 4 | channel originate application [appdata] channel originate extension [@][] |
Example:
extensions.conf
1 2 3 4 5 | [from-pstn] exten => 123,1,Answer() exten => 123,3,MP3Player(/root/favi.mp3) |
Originate call from CLI:
1 2 3 | CLI*> channel originate DAHDI/1/0123456789 extension 123@from-pstn |
This can be used from external scripts like this:
1 2 3 | asterisk -rx "channel originate DAHDI/1/0123456789 extension 123@from-pstn"; |