Grant Bagdasarian
2013-May-30 09:46 UTC
[asterisk-users] Executing a dynamic sequence of applications
Hello, I'm researching the possibilities of multiple communication platforms like Asterisk and FreeSwitch for handling a dynamic sequence of applications to execute, like Playback, Read, etc. This only applies to originating a call from an external application by using the AMI Manager and the Originate action. I need to know the following: 1) Does the Originate action support multiple Application keys? If so, how does it handle the order in which they're added to the Originate action? 2) If it does not support multiple Application keys, I'll have to instruct the Originate action to enter a context in the dialplan, and pass the sequence of applications in its Variable key. How would I configure the dialplan context to dynamically handle the sequence of applications to execute? I was thinking of creating a separate priority label for each required Application and have each application in the Variable key routed to the correct priority label. Is this possible? Are there alternatives for doing what I require? Regards, Grant -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130530/27880ffe/attachment.htm>
Yves A.
2013-May-30 10:19 UTC
[asterisk-users] Executing a dynamic sequence of applications
Hi, I would recommend an AGI-script or a realtime dialplan for this purpose. yves Am 30.05.2013 11:46, schrieb Grant Bagdasarian:> > Hello, > > I'm researching the possibilities of multiple communication platforms > like Asterisk and FreeSwitch for handling a dynamic sequence of > applications to execute, like Playback, Read, etc. > > This only applies to originating a call from an external application > by using the AMI Manager and the Originate action. > > I need to know the following: > > 1)Does the Originate action support multiple Application keys? If so, > how does it handle the order in which they're added to the Originate > action? > > 2)If it does not support multiple Application keys, I'll have to > instruct the Originate action to enter a context in the dialplan, and > pass the sequence of applications in its Variable key. How would I > configure the dialplan context to dynamically handle the sequence of > applications to execute? I was thinking of creating a separate > priority label for each required Application and have each application > in the Variable key routed to the correct priority label. Is this > possible? Are there alternatives for doing what I require? > > Regards, > > Grant > > > > -- > _____________________________________________________________________ > -- 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-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130530/d1e49afc/attachment.htm>
Matthew Jordan
2013-May-30 11:55 UTC
[asterisk-users] Executing a dynamic sequence of applications
On 05/30/2013 04:46 AM, Grant Bagdasarian wrote:> Hello, > > > > I?m researching the possibilities of multiple communication platforms > like Asterisk and FreeSwitch for handling a dynamic sequence of > applications to execute, like Playback, Read, etc. > > > > This only applies to originating a call from an external application by > using the AMI Manager and the Originate action. > > > > I need to know the following: > > 1) Does the Originate action support multiple Application keys? If > so, how does it handle the order in which they?re added to the Originate > action?No it does not. Originating to an application is a convenience mechanism for when you want to spawn a channel, have a single application execute against it, and hang it up when the application is finished.> 2) If it does not support multiple Application keys, I?ll have to > instruct the Originate action to enter a context in the dialplan, and > pass the sequence of applications in its Variable key. How would I > configure the dialplan context to dynamically handle the sequence of > applications to execute? I was thinking of creating a separate priority > label for each required Application and have each application in the > Variable key routed to the correct priority label. Is this possible? Are > there alternatives for doing what I require? >That's not how the dialplan works. The dialplan is a configured sequence of actions that you take on a channel; it is not meant for external manipulation of the channel. As noted by Yves, external manipulation of channels can be done using AGI. In AGI, the actions executed on a single channel are all performed externally. Your dialplan ends up being quite simple in that case: [default] exten => originated_channel,1,AGI( ... ) And you simply originate your channel to that context, extension, priority tuple. In your particular case, since you're using AMI for call control, you may want to look into AsyncAGI as well. When the channel enters into an AGI application using AsyncAGI, the same AMI connection can be used to control the channel. Matt -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org