Brian J. Murrell
2010-Apr-08 11:00 UTC
[asterisk-users] dial extension and play sound file from shell on asterisk server?
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. Certainly if I had a SIP library, I could have the script simply look like a SIP extension but that seems like it should be an unnecessary added complication. Instead I am looking for a more direct API to Asterisk which allows a process to interact like a "phone" but not actually be one. Is this at all possible? Anyone done anything like this? b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20100408/88506d56/attachment.pgp
Tzafrir Cohen
2010-Apr-08 11:12 UTC
[asterisk-users] dial extension and play sound file from shell on asterisk server?
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
Godson Gera
2010-Apr-08 11:16 UTC
[asterisk-users] dial extension and play sound file from shell on asterisk server?
AGI and AMI is what you need for this. AMI is for originating the call between extensions AGI for playing file of your choice. Both these APIs are well documented http://www.voip-info.org/wiki/view/Asterisk+AGI http://www.voip-info.org/wiki/view/Asterisk+manager+API -- Thanks & Regards, Godson Gera Asterisk Consultant India <http://godson.in> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100408/bd254005/attachment.htm
Duncan Turnbull
2010-Apr-08 11:28 UTC
[asterisk-users] dial extension and play sound file from shell on asterisk server?
Have a look at the call files examples of voipinfo http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out Its not too hard to do what you want Cheers Duncan On 8/04/2010, at 11:00 PM, 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. > > Certainly if I had a SIP library, I could have the script simply look > like a SIP extension but that seems like it should be an unnecessary > added complication. Instead I am looking for a more direct API to > Asterisk which allows a process to interact like a "phone" but not > actually be one. > > Is this at all possible? Anyone done anything like this? > > b. > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users