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:

http://www.voip-info.org/wiki/view/Asterisk+manager+API

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

http://www.voip-info.org/wiki/index.php?page=Asterisk+Manager+API+Action
+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.

http://www.voip-info.org/wiki-Asterisk+AGI


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

"""
 System(command)

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.


/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to