Using Asterisk to Dial and Talk with Festival

Gabriel Gunderson gabe at
Fri Feb 22 16:09:18 MST 2008

On Fri, 2008-02-22 at 15:43 -0700, Chris Carey wrote:
> My second hurdle is how can you fire off an asterisk dial plan from
> the (bash) command prompt?

Usually if you want to tell Asterisk to do something, you connect to the
manager interface:

Telnet to the port and play around with it.  There are many commands,
but I think you are interested in "originate."

You would give the context of the dial plan that you want the call to
"start" in and the call flow would happen from there.

Once in the dial plan, you can use AGI to hand off the call flow to an
external app via STDIN and STDOUT.

Or if it's simple command that you want to run, try system()


Executes a command by using system(). 
System() passes the string unaltered to system(3). Running "man 3
system" will show exactly what system(3) does: 

  system()  executes  a command specified in string by calling
  /bin/sh -c string, and returns after the command has been completed.

> Asterisk has a -x command line switch that lets you fire off Asterisk
> CLI commands from the bash command line. However, I don't see anything
> that could trigger a dial plan to execute.
> Perhaps I'm looking in the wrong place. Maybe I should automate a SIP
> client that is connected to this Asterisk server and not try to do
> this from the Asterisk server itself?

No, let Asterisk do the work.

More information about the PLUG mailing list