[asterisk-users] dial extension and play sound file from shell on asterisk server?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Apr 8 06:12:36 CDT 2010


On Thu, Apr 08, 2010 at 07:00:11AM -0400, Brian J. Murrell wrote:
> I want to use Asterisk as a general message delivery system here.
> 
> That is, I want to be able to have a (shell, perl, etc.) script on my
> Asterisk server dial an extension, wait for it to be answered and then
> play a sound file and then hang up, or even wait for a response or
> reactions to some IVR.

# asterisk -rx 'help channel originate'
  There are two ways to use this command. A call can be originated between a
channel and a specific application, or between a channel and an extension in
the dialplan. This is similar to call files or the manager originate action.
Calls originated with this command are given a timeout of 30 seconds.

Usage1: channel originate <tech/data> application <appname> [appdata]
  This will originate a call between the specified channel tech/data and the
given application. Arguments to the application are optional. If the given
arguments to the application include spaces, all of the arguments to the
application need to be placed in quotation marks.

Usage2: channel originate <tech/data> extension [exten@][context]
  This will originate a call between the specified channel tech/data and the
given extension. If no context is specified, the 'default' context will be
used. If no extension is given, the 's' extension will be used.

See cli_permissions.conf (or whatever it is called) if you want to allow
other users to use that command. Note that it allows such a user to do
practically anything as the user running Asterisk.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list